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 up the menu for the page
protected function _config(){ parent::_config(); Raxan::loadLangFile("info-module"); $this->mnuItem = "RQHIST"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function init_menu()\n {\n // it's a sample code you can init some other part of your page\n }", "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "public function initMenu()\n {\n add_menu_page(\n 'Flickr Group Gallery',\n 'Flickr Group Gallery',\n 'administrator',\n 'flickr-group-gallery',\n array($this, 'render'),\n 'dashicons-admin-generic'\n );\n }", "protected function menus()\n {\n\n }", "public function setPageMenu() {\n\t\t\tglobal $factory_impressive_page_menu;\n\n\t\t\t$dashicon = ( ! empty( $this->page_menu_dashicon ) ) ? ' ' . $this->page_menu_dashicon : '';\n\t\t\t$short_description = ( ! empty( $this->page_menu_short_description ) ) ? ' ' . $this->page_menu_short_description : '';\n\n\t\t\tif ( is_multisite() && is_network_admin() && ! $this->network ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$factory_impressive_page_menu[ $this->getMenuScope() ][ $this->getResultId() ] = [\n\t\t\t\t'type' => $this->type, // page, options\n\t\t\t\t'url' => $this->getBaseUrl(),\n\t\t\t\t'title' => $this->getPageTitle() . ' <span class=\"dashicons' . $dashicon . '\"></span>',\n\t\t\t\t'short_description' => $short_description,\n\t\t\t\t'position' => $this->page_menu_position,\n\t\t\t\t'parent' => $this->page_parent_page\n\t\t\t];\n\t\t}", "public function setUpMenuItems()\n {\n $Menu = new DModuleMenu();\n $Menu -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $MenuItem = new DModuleMenuItem( \"show\" , \"Monedas\" );\n $MenuItem -> setIcon( '<i class=\"fa fa-money\"></i>' );\n $Menu -> addItemObject( $MenuItem );\n $this -> setMenu( $Menu );\n }", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public function setup_menus()\n\t{\n\t\tregister_nav_menus( $this->_get_menu_locations() );\n\n\t\t// add default items to the menus\n\t\t$this->_add_default_menus();\n\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"RAD Facility\", \"LIBRARIES\", \"_rad_facility\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_dxcodes\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "protected function setup_menu() {\n\t\t$nag = '';\n\n\t\tif ( $this->has_notices() ) {\n\t\t\t$nag = \" <span class='wp-shp-browser-info dashicons dashicons-info' style='line-height: 0.8em'></span>\";\n\t\t}\n\n\t\t$defaults = array(\n\t\t\t'menu_title' => __( 'Showcase', 'wp-shp-browser' ),\n\t\t\t'page_title' => $this->get_page_title(),\n\t\t\t'page_slug' => $this->page_slug,\n\t\t\t'action_link' => false,\n\t\t\t'admin_action_priority' => 99,\n\t\t);\n\t\t$this->args = wp_parse_args( $this->args, $defaults );\n\n\t\t$this->args['menu_title'] .= $nag;\n\t}", "function emb_menu_setup() {\n\t /*\n\t * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected\n\t * @param string $menu_title The text to be used for the menu\n\t * @param string $capability The capability required for this menu to be displayed to the user.\n\t * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)\n\t * @param callback $function The function to be called to output the content for this page.\n\t\t*/\n\t\tadd_menu_page ('Mobile Builder' , 'Easy Mobile Builder' , 'manage_options' , 'emb' , 'emb_admin_setting_gui' );\n\t}", "public function add_menus()\n {\n }", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "public function initializePage()\n\t{\n\t\tadd_menu_page('Thema opties', 'Thema opties', 'manage_options', 'theme-options');\n\t}", "public function makeMenu() {}", "function setup_menus() {\n\n\telgg_unregister_menu_item('topbar', 'elgg_logo');\n\n\telgg_register_menu_item('topbar', array(\n\t\t'name' => 'logo',\n\t\t'href' => false,\n\t\t'text' => elgg_view('page/elements/topbar_logo'),\n\t\t'item_class' => 'name',\n\t\t'section' => 'title-area',\n\t));\n\n\telgg_register_menu_item('topbar', array(\n\t\t'name' => 'toggle',\n\t\t'href' => '#',\n\t\t'text' => '<span>' . elgg_echo('menu') . '</span>',\n\t\t'item_class' => 'toggle-topbar menu-icon',\n\t\t'priority' => 900,\n\t\t'section' => 'title-area',\n\t));\n\n\tif (elgg_is_admin_logged_in()) {\n\t\t$counter = '';\n\t\t$admin_notices = elgg_get_entities(array(\n\t\t\t'types' => 'object',\n\t\t\t'subtypes' => 'admin_notice',\n\t\t\t'count' => true\n\t\t));\n\t\tif ($admin_notices) {\n\t\t\t$counter = '<span class=\"messages-new\">' . $admin_notices . '</span>';\n\t\t}\n\t\telgg_register_menu_item('topbar', array(\n\t\t\t'name' => 'administration',\n\t\t\t'href' => 'admin',\n\t\t\t'text' => elgg_view_icon('dashboard') . elgg_echo('admin') . $counter,\n\t\t\t'priority' => 100,\n\t\t\t'section' => 'alt',\n\t\t));\n\t}\n}", "public function add_menu() {\n\t\t\tadd_menu_page(\n\t\t\t\t'Amazon Affiliate | Products',\n\t\t\t\t'Products',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\tarray( &$this, 'load_product_page' ),\n\t\t\t\tplugins_url( 'amz-affiliate/img/icon.png' ),\n\t\t\t\t50\n\t\t\t);\n\t\t\tadd_submenu_page(\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\t'Amazon Affiliate | Tables',\n\t\t\t\t'Tables',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/table.php',\n\t\t\t\tarray( &$this, 'load_table_page' )\n\t\t\t);\n\t\t}", "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "public function addMenu(){\n\t\tadd_menu_page(\n\t\t\t$this->plugin->name,\n\t\t\t$this->plugin->name,\n\t\t\t'publish_pages',\n\t\t\t$this->plugin->varName,\n\t\t\tarray($this, 'page'),\n\t\t\t$this->plugin->uri . 'assets/images/icn-menu.png'\n\t\t);\n\t}", "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "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 }", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "public function setLoadControllerMenu()\r\n {\r\n add_menu_page(\r\n $_SESSION['controller_data_current']['page_title'], // Title of the page\r\n $_SESSION['controller_data_current']['page_menu_text'], // Text to show on the menu link\r\n $_SESSION['controller_data_current']['page_capability'], // Capability requirement to see the link\r\n $_SESSION['controller_data_current']['page_slug'],\r\n $_SESSION['controller_data_current']['page_render'],\r\n $_SESSION['controller_data_current']['page_menu_icon'],\r\n $_SESSION['controller_data_current']['page_menu_position']\r\n );\r\n }", "function zdtw_init_menu() {\n add_options_page(\n 'Zing Design Testimonials',\n 'ZD Testimonials',\n 'manage_options',\n $this->settings_page_id,\n array($this, $this->prefix . '_menu_options_callback')\n );\n }", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "public function admin_menu() {\n\t\t// Load abstract page class.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-page.php';\n\t\t// Load page classes.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-general.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-accounts.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-messages.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-categories.php';\n\n\t\t// Init menu classes.\n\t\tnew SocialFlow_Admin_Settings_General();\n\t\tnew SocialFlow_Admin_Settings_Accounts();\n\t\t// new SocialFlow_Admin_Settings_Categories.\n\t\t// new SocialFlow_Admin_Settings_Messages.\n\t}", "private function set_admin_menu() {\n $TSB_settings_admin_menu = new Admin_Menu( Initial_Value::TSB_main_settings_page() );\n $this->loader->add_action( 'admin_menu', $TSB_settings_admin_menu, 'add_admin_menu_page' );\n\n// $plugin_name_sample_admin_sub_menu1 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page1() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu1, 'add_admin_sub_menu_page' );\n//\n// $plugin_name_sample_admin_sub_menu2 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page2() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu2, 'add_admin_sub_menu_page' );\n\n }", "public static function menu()\n\t\t\t{\n\t\t\t\t// Create menu tab\n\t\t\t\tadd_options_page(HE_PLUGINOPTIONS_NICK.' Plugin Options', HE_PLUGINOPTIONS_NICK, 'manage_options', HE_PLUGINOPTIONS_ID.'_options', array('HiddenEmpirePluginOptions', 'options_page'));\n\t\t\t}", "public function create_menu() {\n\t\tif ( get_network()->site_id !== get_current_blog_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//create new top-level menu\n\t\tadd_management_page(\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t'manage_options',\n\t\t\t'sync-newsletter',\n\t\t\tarray( $this, 'display_submenu_page' ),\n\t\t\t6\n\t\t);\n\t}", "public function createBackendMenu(){\n\t\tadd_menu_page( 'Stackoverflow', 'Stackoverflow', 'manage_options', 'stackoverflowStats', array($this, 'settingsPage') );\n\t}", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "function scfw_menu(){\n add_menu_page('SCFW - Order List', 'SCFW', 'manage_options', 'scfw-options', 'scfw_orders_list');\n add_submenu_page( 'scfw-options', 'Settings page title', 'Teste Ajax', 'manage_options', 'scfw-op-settings', 'scfw_theme_func_settings');\n add_submenu_page( 'scfw-options', 'FAQ page title', 'FAQ menu label', 'manage_options', 'scfw-op-faq', 'scfw_theme_func_faq');\n}", "function jn_menu_setup() {\n register_nav_menu('primary', __('Primary Menu', 'jn'));\n}", "static function create_menu() {\n add_submenu_page('plugins.php', 'Luminous Settings', 'Luminous settings',\n 'administrator', 'luminous-handle', 'luminouswp::settings_view');\n }", "public function setUp() {\r\n //$this->setRootMenuPage( 'sdfgfgdfg' ); # set the top-level page, ie add a page to the Settings page\r\n $this->setRootMenuPageBySlug(self::MENU_ROOT_MENU_PAGE); //add submenu page under hoangweb theme options\r\n #add sub-menu pages\r\n $this->addSubMenuItem(\r\n array(\r\n 'title' => 'Menu',\r\n 'page_slug' => self::page_setting_slug,\r\n )\r\n );\r\n\r\n //modify apf hwskin fieldtype\r\n //add_filter('apf_hwskin', array($this, '_apf_hwskin'),10,2);\r\n add_filter('hwskin_field_output', array($this, '_apf_hwskin_field_output'),10,3); //hack field output\r\n add_filter('renderOptionField_APF', array($this, '_apf_renderOptionField'), 10,2); //before output skin options\r\n }", "function compileMenu() {\n\t\tglobal $page;\n\t\tSession::setMenu($page->getNavigationItems(0));\n\t}", "protected function registerMenu()\n {\n }", "public function fera_ai_create_menu() {\n add_menu_page('Fera ai Settings', 'Fera ai', 'administrator', 'fera-ai', array ($this, 'fera_ai_settings_page' ) , plugins_url('/images/fera_ai_icon.png', __FILE__), 30 );\n }", "public function add_menus() {\n add_action( 'admin_menu', array( 'Hotmembers3\\Admin_Pages_Creator', 'create_pages') );\n }", "public function set_menu_list()\r\n {\r\n $controllerData = $this->setUrlController;\r\n $controllerData = urldecode($controllerData);\r\n $getUrlSegment = explode('/', $controllerData);\r\n $controllerSet = isset($_GET['page']) && trim($_GET['page']) !== '' ?\r\n $_GET['page'] : $this->config['controller_default'];\r\n\r\n $methodSet = isset($_GET['method']) && trim($_GET['method']) !== '' ?\r\n $_GET['method'] : $this->config['method_default'];\r\n\r\n $realControllerName = ucfirst($controllerSet);\r\n $realControllerName = str_replace('-', '_', $realControllerName);\r\n\r\n include $this->bootstrap->base_config_dir . 'Routes.php';\r\n\r\n //add menu by foreach all menu list item array\r\n // list main menu plugin\r\n $xCounterMenu = 0;\r\n foreach ($menu_list as $keyItem => $valueItem) {\r\n if ($valueItem['menu_item']['page_slug'] !== $controllerSet) {\r\n add_menu_page(\r\n $valueItem['menu_item']['page_title'], // Title of the page\r\n $valueItem['menu_item']['page_menu_text'], // Text to show on the menu link\r\n $valueItem['menu_item']['page_capability'], // Capability requirement to see the link\r\n $valueItem['menu_item']['page_slug'], // The 'slug' - file to display when clicking the link,\r\n $valueItem['menu_item']['page_render'],\r\n $valueItem['menu_item']['page_menu_icon'], // icon plugin\r\n $valueItem['menu_item']['page_menu_position'] // item position\r\n );\r\n }\r\n $xCounterMenu++;\r\n }\r\n\r\n // list sub main menu plugin\r\n $yCounterMenu = 0;\r\n foreach ($menu_list_sub as $keyItem => $valueItem) {\r\n\r\n if ($valueItem['menu_item']['page_slug'] !== $controllerSet) {\r\n add_submenu_page(\r\n $valueItem['menu_item']['page_slug_current'], // slug current menu\r\n $valueItem['menu_item']['page_title'], // Title of the page\r\n $valueItem['menu_item']['page_menu_text'], // Text to show on the menu link\r\n $valueItem['menu_item']['page_capability'], // Capability requirement to see the link\r\n $valueItem['menu_item']['page_slug'], // The 'slug' - file to display when clicking the link,\r\n $valueItem['menu_item']['page_render'],\r\n $valueItem['menu_item']['page_menu_position'] // item position\r\n );\r\n }else{\r\n add_submenu_page(\r\n $_SESSION['controller_data_sub']['page_slug_current'], // slug current menu\r\n $_SESSION['controller_data_sub']['page_title'], // Title of the page\r\n $_SESSION['controller_data_sub']['page_menu_text'], // Text to show on the menu link\r\n $_SESSION['controller_data_sub']['page_capability'], // Capability requirement to see the link\r\n $_SESSION['controller_data_sub']['page_slug'], // The 'slug' - file to display when clicking the link,\r\n $_SESSION['controller_data_sub']['page_render'], // render\r\n $_SESSION['controller_data_sub']['page_menu_position'] // item position\r\n );\r\n }\r\n \r\n $yCounterMenu++;\r\n }\r\n }", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "public function menuConfig() {}", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "function at_try_menu()\n{\n add_menu_page('signup_list', //page title\n 'Sign Up List', //menu title\n 'manage_options', //capabilities\n 'Signup_List', //menu slug\n Signup_list //function\n );\n}", "public function menu()\n\t{\n\t\t$partial = new Inoves_Partial('Content/view/menu/contentMain.phtml');\n\n\t\t$partial->slug = Inoves_URS::$params[0];\n\t\t\n\t\tInoves_View::prepend('#content', $partial);\n\t}", "function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}", "function setup_menus() {\n\t$icon = '';\n\tadd_menu_page('Site Features', 'Site Features', 'publish_pages', 'pop_site_features', '', $icon, 36);\n\tadd_submenu_page('pop_site_features','','','publish_pages','pop_site_features','homepage_touts_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Features', 'Homepage Features', 'publish_pages', 'pop_homepage_features', 'homepage_features_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Ticker', 'Homepage Ticker', 'publish_pages', 'pop_homepage_ticker', 'homepage_ticker_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Touts', 'Homepage Touts', 'publish_pages', 'pop_homepage_touts', 'homepage_touts_page');\n\tadd_submenu_page('pop_site_features', 'Movement Touts', 'Movement Touts', 'publish_pages', 'pop_movement_touts', 'movement_touts_page');\n\tadd_submenu_page('pop_site_features', 'PoP & Local Events', 'PoP & Local Events', 'publish_pages', 'pop_events', 'movement_events_page');\n\tadd_submenu_page('pop_site_features', 'Season of 1000', 'Season of 1000 Promises', 'publish_pages', 'season1000', 'season_1000_page');\n}", "function initAdminMenu() {\r\n\r\n\t\t$accounts_hook = $this->addMenu('accounts', ShoppWholesale::SHOPP_MENU_ROOT);\r\n\t\t$this->addMenu('account-review', $accounts_hook);\r\n\t\t$this->addMenu('account-settings', $accounts_hook);\r\n\t\t$this->addMenu('account-shortcode-help', $accounts_hook);\r\n\r\n\t\t//reorder menus\r\n\t\t$this->sendToBottom('Settings');\r\n\r\n\t}", "public function add_menu() {\n\t\tadd_menu_page( 'Custom Table', 'Custom Table', 'manage_options', 'custom-table', [ $this, 'display_page_contents' ] );\n\t}", "public function init()\n\t{\n\t\t$this -> view -> navigation = $navigation = Engine_Api::_() -> getApi('menus', 'core') -> getNavigation('advmenusystem_admin_main', array(), 'advmenusystem_admin_global_settings');\n\t}", "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "public function create_menu() {\n\n global $canvys;\n\n $page = add_theme_page(\n __( 'Background', 'canvys' ),\n __( 'Background', 'canvys' ),\n 'edit_theme_options',\n 'cv-background',\n array( $this, 'render_page' )\n );\n\n // Add the help tab\n add_action( 'load-' . $page, array( $this, 'render_help' ) );\n\n }", "public function initPage( OutputPage $out ) {\n\t\tparent::initPage( $out );\n\n\t\t$out->addModules( 'skins.nimbus.menu' );\n\t}", "function omega_register_menus() {\n\tregister_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'omega' ) );\n}", "public function add_menu()\n {\n add_options_page(__('Master Link Plugin Settings'), __('Master Link Plugin'), 'manage_options', 'master_link_plugin', array(\n &$this,\n 'plugin_settings_page'\n ));\n }", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "public static function wpa_add_menu() {\n add_menu_page('Main Menu','Home','manage_options','Sub-menu');\n add_submenu_page('Sub-menu','User List','User List','manage_options','menu-list',array( __CLASS__,'wpa_page_file_path'));\n add_submenu_page('Sub-menu','Add User','Add User','manage_options','menu-add',array(__CLASS__,'wpa_page_file_path'));\n }", "function wpms_home_create_menu() {\n\tdo_action(\"wpms_create_top_menu\");\n\tadd_menu_page( __('Coco\\'s parameters','wp-multilingual-slider'), 'Coco Slider', 'edit_pages', 'settings_page_wp-multilingual-slider', 'home_settings_page', WPMS_DIR.'/images/accueil.png');\n}", "function LinkITMenu() {\n add_menu_page('123LinkIt', '123LinkIt', 'manage_options', 'LinkITPluginCentral', 'LinkITPluginCentral', 'http://www.123linkit.com/images/123linkit.favicon.gif', 3);\n }", "public function addMenu()\n {\n $wpMenu = [\n [\n 'Bolsista',\n 'Bolsista',\n 'edit_pages',\n 'bolsista',\n $this,\n 'doAction',\n 'dashicons-format-aside',\n 2\n ]\n ];\n $wpSubMenu = [];\n $this->addMenuItem($wpMenu, $wpSubMenu);\n }", "function sr_frontpage_admin_menu() {\n add_menu_page(\n 'Home Sections',\n 'Home Sections',\n 'manage_options',\n 'front-sections',\n '',\n 'dashicons-admin-home',\n 40\n );\n}", "function basetheme_nav_init()\n{\n\n\tregister_nav_menus( array(\n 'header' => 'Header',\n 'footer' => 'Footer'\n\t) );\n\n}", "function _navSetup()\n\t{\n\t\t// get the path to the current page\n\t\t$this->path = $this->getPath($this->area, $this->page);\n\t\t\n\t\t// reset the navigational elements\n\t\t$this->nav = array();\n\t\t\n\t\t// we use the view URL a lot\n\t\t$view_url = $this->parse->getRenderConf('xhtml', 'wikilink', 'view_url');\n\t\t\n\t\t// is there a path? (if not, the page is not on the map)\n\t\tif (count($this->path) > 0) {\n\t\t\t\n\t\t\t// get nav elements leading to this page...\n\t\t\tforeach ($this->path as $key => $val) {\n\t\t\t\t\t\n\t\t\t\tif ($key == 0) {\n\t\t\t\t\n\t\t\t\t\t// get the map tops\n\t\t\t\t\t$this->nav[$key] = $this->_tops($val, $view_url);\n\t\t\t\t\t\n\t\t\t\t} elseif (isset($this->path[$key-1])) {\n\t\t\t\t\n\t\t\t\t\t// get children\n\t\t\t\t\t$prev_page = $this->path[$key-1];\n\t\t\t\t\t$this->nav[$key] = $this->_kids($prev_page, $val, $view_url);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// and get the first nav element below this page.\n\t\t\t$prev_page = $val;\n\t\t\t$this->nav[$key+1] = $this->_kids($prev_page, $this->page,\n\t\t\t\t$view_url, true);\n\t\t\t\n\t\t} else {\n\n\t\t\t// Set the nav element to the top level page list for the area, so\n\t\t\t// that the list of top level pages is shown even if we move outside\n\t\t\t// the area map.\n\t\t\t$this->nav[0] = $this->_tops(\"\", $view_url);\n\t\t}\n\t\t\t\n\t\t\n\t\t// nav to AreaMap, edit, history, and links\n\t\t$this->nav['map'] =\tsprintf($view_url, 'AreaMap');\n\t\t$this->nav['history'] = sprintf($view_url, $this->page) . '&view=history';\n\t\t$this->nav['links'] = sprintf($view_url, $this->page) . '&view=links';\n\t\t$this->nav['source'] = sprintf($view_url, $this->page) . '&view=source';\n\t\t$this->nav['rss'] = sprintf($this->conf['absolute_url'].\"rss.php?area=%s&page=%s\", $this->area, $this->page);\n\t\t$this->nav['edit'] = sprintf($this->conf['absolute_url'].\"edit.php?area=%s&page=%s\", $this->area, $this->page);\n\t}", "public static function setup()\n {\n add_theme_support('menus');\n register_nav_menu(static::$key, static::$name);\n add_filter('nav_menu_css_class', [__CLASS__, 'cssClasses'], 10, 2);\n }", "function menus();", "public function __construct()\n\t{\n\t\t$this->menus = array();\n\t}", "public function add_admin_menus()\n {\n\n add_menu_page(\n 'Online Exam',\n 'Online Exam',\n 'manage_department',\n 'online_exam',\n function () {\n new \\OE\\includes\\html\\Manage_Department;\n },\n 'dashicons-text-page',\n );\n\n /**\n * adding theme setting menu to admin page\n */\n\n add_menu_page(\n 'OE Theme Setting',\n 'Theme Setting',\n 'manage_options',\n 'oe_theme_setting',\n function () {\n new \\OE\\includes\\html\\Theme_Setting;\n },\n 'dashicons-admin-generic',\n 98\n );\n\n /**\n * adding all the submens to admin page\n * this is teacher's submenu page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Teacher's\",\n // menu title\n \"Manage Teacher's\",\n // capability\n 'manage_teachers',\n // menu slug\n 'manage_teachers',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Teaher;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Questions\",\n // menu title\n \"Manage Questions\",\n // capability\n 'manage_questions',\n // menu slug\n 'manage_questions',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Question;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Exam Routine\",\n // menu title\n \"Exam Routine\",\n // capability\n 'manage_routine',\n // menu slug\n 'manage_routine',\n // callback function\n function () {\n new \\OE\\includes\\html\\Exam_Routine;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Students\",\n // menu title\n \"Manage Students\",\n // capability\n 'manage_students',\n // menu slug\n 'manage_students',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Student;\n },\n );\n\n /**\n * adding create all question page according to question folder\n * this is question creation page\n */\n if (isset($_GET['exam_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Create Qustion\",\n // menu title\n \"Create Qustion\",\n // capability\n 'create_question',\n // menu slug\n 'create_question',\n // callback function\n function () {\n new \\OE\\includes\\html\\Create_Qustion;\n },\n );\n }\n\n /**\n * adding student performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['current_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Student's Performence\",\n // menu title\n \"Student's Performence\",\n // capability\n 'student_performence',\n // menu slug\n 'student_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Student_Performence;\n },\n );\n }\n\n /**\n * adding individual performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['performence_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // menu title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // capability\n 'individual_performence',\n // menu slug\n 'individual_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Individual_Performence;\n },\n );\n }\n\n /**\n * renaming online exam menu\n */\n\n $this->admin_menu_rename();\n }", "public function add_menu() {\r\n\t\t\t\t// Add a page to manage this plugin's settings.\r\n\t\t\tadd_options_page(\r\n\t\t\t\t'Sift Ninja Settings',\r\n\t\t\t\t'Sift Ninja',\r\n\t\t\t\t'manage_options',\r\n\t\t\t\t'sift_ninja',\r\n\t\t\t\tarray( &$this, 'plugin_settings_page' )\r\n\t\t\t);\r\n\t\t}", "function wp_nav_menu_setup()\n {\n }", "function article_plugin_setup_menu(){\n\tadd_menu_page( 'New Article Page', 'New Article', 'manage_options', 'faculty-plugin', 'create_form' );\n\t}", "function menu() {\n\t\tadd_theme_page( __( 'Color Style Options', 'color-style-options' ), __( 'Color Style Options', 'color-style-options' ), 'edit_posts', __CLASS__, array( &$this, 'page' ) );\n\t}", "function show_my_menus(){\n register_nav_menu('mainmenu', 'Huvudmeny');\n register_nav_menu('footermenu', 'Sociala medier');\n register_nav_menu('sidemenu', 'Sidomeny');\n register_nav_menu('blogsidepage', 'Blogg sidomeny sidor');\n register_nav_menu('blogsidearchive', 'Blogg sidomeny arkiv');\n register_nav_menu('blogsidecategory', 'Blogg sidomeny kategorier');\n}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function createMenu()\n {\n $parent = $this->Menu()->findOneBy(['label' => 'Artikel']);\n\n $this->createMenuItem(\n [\n 'label' => 'Custom sort',\n 'controller' => 'CustomSort',\n 'action' => 'Index',\n 'active' => 0,\n 'class' => 'sprite-blue-document-text-image',\n 'parent' => $parent,\n 'position' => 6,\n ]\n );\n }", "public function register_menus() {\n // register_nav_menus(array(\n // 'header_menu' => 'Header Navigation Menu'\n // ));\n }", "public function admin_page_init () {\n add_menu_page( __( 'Users List', 'ct-admin-list' ), __( 'Users list', 'ct-admin-list' ), 'list_users', 'ct-users-list', [ $this, 'list_page_content' ] );\n }", "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat'), 'Visual Chat', 'visual_chat', 'vcht-console', array($this, 'viewChatBackend'), 'dashicons-format-chat');\n }", "public function index() {\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t}", "function eventoni_create_menu() {\n\n\t//create new top-level menu\n\tadd_menu_page('Eventoni', 'Eventoni', 'administrator', __FILE__, 'eventoni_settings_page');\n\n\t//call register settings function\n\tadd_action( 'admin_init', 'register_mysettings' );\n}", "function anipics_add_main_menu(){\n register_nav_menu('main_menu', 'Menu principal');\n}", "private function instantiate_admin_pages() {\n $this->admin_objs[ 'menu' ] = new HRHS_Admin_Menu();\n }", "function registerMenus() {\n\t\t\tregister_nav_menu( 'nav-1', __( 'Top Navigation' ) );\n\t\t}", "function cbp_add_pages() {\n\tadd_menu_page(\"Chibipaint Integration\", \"Chibipaint\", \"manage_options\", \"chibipaint\", \"cbp_display_front_page\");\n\tadd_submenu_page(\"chibipaint\", \"Chibipaint Integration Options\", \"Options\", \"manage_options\", \"cbp_options\", \"cbp_display_options_page\");\n\tadd_submenu_page(\"chibipaint\", \"Chibipaint Help\", \"Help\", \"manage_options\", \"cbp_help\", \"cbp_display_help_page\");\n}", "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }", "private function left_menu()\n\t\t{\n\t\t\t $page_name = functions::get_page_name();\n\t\t\techo '\n\t\t\t\t<ul>\n\t\t\t\t\t';\n\t\t\t\t\t\n\t\t\t\t\t$content_module = array('manage_content.php', 'register_content.php', 'manage_page_content.php', 'register_page_content.php','manage_content_option.php', 'register_content_option.php'\n\t\t\t\t\t,'manage_category.php', 'register_category.php');\n\t\t\t\t\tif(in_array($page_name, $content_module))\n\t\t\t\t\t{\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t<img src=\"images/icon-content.png\" alt=\"Manage CMS\" title=\"Manage CMS\" width=\"24\" height=\"24\" />\n\t\t\t\t\t\t<a href=\"manage_content.php\">CMS</a>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a href=\"manage_page_content.php\">Page Content</a></li>\n\t\t\t\t\t\t<li><a href=\"manage_category.php\">Category</a></li>\n\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>';\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<li><img src=\"images/icon-content.png\" alt=\"Manage CMS\" title=\"Manage CMS\" width=\"24\" height=\"24\" /><a href=\"manage_content.php\" >CMS</a></li>';\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\techo '<li><img src=\"images/icon-member.png\" alt=\"Manage Member\" title=\"Manage Member\" width=\"24\" height=\"24\" /><a href=\"manage_member.php\" >Member</a></li>\n\t\t\t\t\t<!--<li><img src=\"images/icon-property.png\" alt=\"Manage Property Type\" title=\"Manage Property Type\" width=\"24\" height=\"24\" /><a href=\"manage_property_type.php\" >Property Type</a></li>-->\n\t\t\t\t\t\n\t\t\t\t\t<li><img src=\"images/icon-property.png\" alt=\"Manage Hotel\" title=\"Manage Hotel\" width=\"24\" height=\"24\" /><a href=\"manage_hotel.php\" >Hotel</a></li>\n\t\t\t\t\t<li><img src=\"images/icon-restaurant.jpg\" alt=\"Manage Restaurant\" title=\"Manage Restaurant\" width=\"24\" height=\"24\" /><a href=\"manage_restaurant.php\" >Restaurant</a></li>\n\t\t\t\t\t<li><img src=\"images/icon-venue.png\" alt=\"Manage Venue\" title=\"Manage Venue\" width=\"24\" height=\"24\" /><a href=\"manage_venue.php\" >Venue</a></li>\n\t\t\t\t\t';\n\t\t\t\t\t\t\n\t\techo '</ul>';\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t}" ]
[ "0.8047479", "0.7755406", "0.7702488", "0.7687351", "0.75837207", "0.7532114", "0.7489759", "0.74358225", "0.74358225", "0.74358225", "0.74358225", "0.74358225", "0.74358225", "0.7397702", "0.7367606", "0.73673207", "0.7361609", "0.7360109", "0.73563904", "0.73563904", "0.73511136", "0.73473316", "0.73284113", "0.7320862", "0.7285924", "0.72793674", "0.7271432", "0.7261683", "0.72509164", "0.7247118", "0.7245677", "0.7213758", "0.71883655", "0.7179176", "0.7155062", "0.7138767", "0.71213233", "0.71193117", "0.711506", "0.7076717", "0.7074343", "0.70703423", "0.7065614", "0.706446", "0.7062807", "0.7050167", "0.70405596", "0.70329726", "0.7031269", "0.7031269", "0.7031269", "0.70295036", "0.70295036", "0.7014725", "0.7005583", "0.69954675", "0.6975459", "0.69746", "0.69687974", "0.6954757", "0.6928969", "0.6914075", "0.6912344", "0.68965346", "0.68958503", "0.6887727", "0.68847", "0.68839663", "0.68826836", "0.6870857", "0.6869866", "0.6859117", "0.68581903", "0.68565774", "0.6850409", "0.6846797", "0.68426883", "0.6840602", "0.6840075", "0.68351674", "0.68325424", "0.68206143", "0.6800289", "0.67978495", "0.67954504", "0.6775044", "0.677426", "0.677426", "0.6773568", "0.6770985", "0.6767922", "0.67580366", "0.67551684", "0.6749025", "0.6747921", "0.6740238", "0.673531", "0.67262536", "0.67125815", "0.6707553", "0.67010367" ]
0.0
-1
execute the downloading of the search results
function executeDownload($e){ $url = "app/info/exportRequestHistory.php?account=" . $this->account->intVal(); $html = '<iframe src="'.$url.'" width="1" height="1" style="position:absolute;visibility:hidden;"></iframe>'; $this->downloadFrame->html($html); $this->downloadFrame->updateClient(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function perform()\n {\n $services = $this->getServiceLocator();\n $api = $services->get('Omeka\\ApiManager');\n $em = $services->get('Omeka\\EntityManager');\n $fulltext = $services->get('Omeka\\FulltextSearch');\n $adapters = $services->get('Omeka\\ApiAdapterManager');\n foreach ($adapters->getRegisteredNames() as $adapterName) {\n $adapter = $adapters->get($adapterName);\n if ($adapter instanceof FulltextSearchableInterface) {\n $page = 1;\n do {\n if ($this->shouldStop()) {\n return;\n }\n $response = $api->search(\n $adapter->getResourceName(),\n ['page' => $page, 'per_page' => 100],\n ['responseContent' => 'resource']\n );\n foreach ($response->getContent() as $resource) {\n $fulltext->save($resource, $adapter);\n }\n $em->clear(); // avoid a memory leak\n $page++;\n } while ($response->getContent());\n }\n }\n }", "function mainExec() {\n $numPerPage = 10;\n $numIterations = 1;\n $dataDir = \"./data\";\n $dataDir = \"./data/samples\";\n $conn = new \\PDO(\"sqlite:\" . \"/opt/sqlite_dbs/gcrawler.db\");\n\n $initialise = new InitialiseDB($conn);\n $initialise->createTables();\n\n $terms = [\n \"nz books\",\n \"nz gems\"\n ];\n\n $searchStorer = new SearchStorer($dataDir);\n\n\n foreach ($terms as $currentTerms) {\n $dateSfx = SearchStorer::getDateSuffix();\n // Don't turn on unless crawling live\t\n//\t\t $searchStorer->getPagesContentForTerms($currentTerms, $numIterations, $numPerPage, $dateSfx);\n\n $storedResultsParser = new StoredResultsParser($dataDir, $conn);\n $allStoredLinks = $storedResultsParser->parseContentFiles($currentTerms);\n\n $dated = (new \\DateTime())->format(\"Y-m-d H:i:s\");\n $searchBatchId = $storedResultsParser->insertSearchBatch($currentTerms, $dated);\n // echo \"searchBatchId: \" . $searchBatchId . PHP_EOL;\n\n $storedResultsParser->insertSearchResultsForBatch($searchBatchId, $allStoredLinks);\n }\n}", "private function _search(){\n\t\tif($this->curluse){\n\t\t\ttry{\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $this->searchURL);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t\t\tif(isset($this->proxy_url) && isset($this->proxy_port)){\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYPORT, $this->proxy_port);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXY, $this->proxy_url);\n\t\t\t\t}\n\t\t\t\t$output = curl_exec($ch);\n\t\t\t\tif(curl_errno($ch))\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception(curl_error($ch));\n\t\t\t\t}\n\t\t\t\tcurl_close($ch);\n\t\t\t\treturn $output;\n\t\t\t} catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($stream = fopen($this->searchURL, 'r')) {\n\t\t\t\treturn stream_get_contents($stream);\n\t\t\t\tfclose($stream);\n\t\t\t}\n\t\t}\n\t}", "public function download() {\t\t}", "public function downloadTask()\n\t{\n\t\t$filters = array(\n\t\t\t'event_id' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.event_id',\n\t\t\t\t'id',\n\t\t\t\tarray()\n\t\t\t),\n\t\t\t'search' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.search',\n\t\t\t\t'search',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t// Get sorting variables\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'registered'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'DESC'\n\t\t\t)\n\t\t);\n\n\t\t$query = Respondent::all();\n\n\t\tif ($filters['search'])\n\t\t{\n\t\t\t$query->whereLike('first_name', strtolower((string)$filters['search']), 1)\n\t\t\t\t->orWhereLike('last_name', strtolower((string)$filters['search']), 1)\n\t\t\t\t->resetDepth();\n\t\t}\n\n\t\tif ($filters['event_id'])\n\t\t{\n\t\t\tif (!is_array($filters['event_id']))\n\t\t\t{\n\t\t\t\t$filters['event_id'] = array($filters['event_id']);\n\t\t\t}\n\t\t\tif (!empty($filters['event_id']))\n\t\t\t{\n\t\t\t\t$query->whereIn('event_id', $filters['event_id']);\n\t\t\t}\n\t\t}\n\n\t\t$rows = $query\n\t\t\t->order($filters['sort'], $filters['sort_Dir'])\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\tCsv::downloadlist($rows, $this->_option);\n\t}", "public function index()\n { \n echo \"Ejecute in BASH (Custom for bash)\\n\";\n echo \"\\n\";\n sleep(3);\n echo \"=======================================\\n\";\n echo \"Search Data in www.subingles.com\\n\";\n echo \"=======================================\\n\";\n // paginador init \n $offset = 0;\n $limit = 100;\n $this->db->from($this->tb_video);\n $count = $this->db->count_all_results();\n\n $total_pages = ($count > 0) ? ceil($count/$limit) : 1; //echo $total_pages; exit;\n\n for ($page = 1; $page <= $total_pages; $page++) {\n $offset = ($limit * $page) - $limit;\n $queryLimit = \" LIMIT $offset,$limit \";\n $query = \"SELECT id, title FROM {$this->tb_video} \" . $queryLimit;\n $stm = $this->db->query($query);\n $result = $stm->result_array();\n\n foreach ($result as $key => $value) {\n $part = explode('-', $result[$key]['title']);\n $song = $part[0];\n $artist = $part[1]; \n \n $id = $result[$key]['id']; \n $this->searchAndUpdate($id, $artist .' '. $song);\n echo \" [{$id}] = \" . $artist . ' ' . $song .\"\\n\"; \n }\n echo \"break (stop request for 5'')\\n\";\n sleep(5); // sleep for heavy load in server\n }\n // paginador end\n\n \n \n }", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }", "public function run()\r\r\n\t{\r\r\n\t\t$arrPages = array();\r\r\n\t\t$strCache = md5('search_index' . session_id());\r\r\n\r\r\n\t\t// Get cache file\r\r\n\t\tif (file_exists(TL_ROOT . '/system/tmp/' . $strCache))\r\r\n\t\t{\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\r\r\n\t\t\tif ($objFile->mtime < time() + 3600)\r\r\n\t\t\t{\r\r\n\t\t\t\t$arrPages = deserialize($objFile->getContent());\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get all searchable pages\r\r\n\t\tif (count($arrPages) < 1)\r\r\n\t\t{\r\r\n\t\t\t$arrPages = $this->getSearchablePages();\r\r\n\r\r\n\t\t\t// HOOK: take additional pages\r\r\n\t\t\tif (array_key_exists('getSearchablePages', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['getSearchablePages']))\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['getSearchablePages'] as $callback)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->import($callback[0]);\r\r\n\t\t\t\t\t$arrPages = $this->$callback[0]->$callback[1]($arrPages);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t$objFile->write(serialize($arrPages));\r\r\n\t\t\t$objFile->close();\r\r\n\t\t}\r\r\n\r\r\n\t\t$intStart = $this->Input->get('start') ? $this->Input->get('start') : 0;\r\r\n\t\t$intPages = $this->Input->get('ppc') ? $this->Input->get('ppc') : 10;\r\r\n\r\r\n\t\t// Rebuild search index\r\r\n\t\tif ($intPages && count($arrPages))\r\r\n\t\t{\r\r\n\t\t\t$this->import('Search');\r\r\n\r\r\n\t\t\tif ($intStart < 1)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search_index\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_cache\");\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"font-family:Verdana, sans-serif; font-size:11px; line-height:16px; margin-bottom:12px;\">';\r\r\n\r\r\n\t\t\tfor ($i=$intStart; $i<$intStart+$intPages && $i<count($arrPages); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\techo 'File <strong>' . $arrPages[$i] . '</strong> has been indexed<br />';\r\r\n\r\r\n\t\t\t\t$objRequest = new Request();\r\r\n\t\t\t\t$objRequest->send($this->Environment->base . $arrPages[$i]);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"margin-top:12px;\">';\r\r\n\r\r\n\t\t\t// Redirect to the next cycle\r\r\n\t\t\tif ($i < (count($arrPages) - 1))\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/indexer.php?start=' . ($intStart + $intPages) . '&ppc=' . $intPages;\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Redirect back home\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/main.php?do=maintenance';\r\r\n\r\r\n\t\t\t\t// Delete temporary file\r\r\n\t\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t\t$objFile->delete();\r\r\n\t\t\t\t$objFile->close();\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '</div></div>';\r\r\n\t\t}\r\r\n\t}", "protected function importFromSearch()\n {\n $api = $this->_getSearchAPI();\n\n for ($i = 1; $i <= self::MAX_PAGES; $i++) {\n Minion_CLI::write(\"Searching page $i...\");\n\n $response = $api->find(self::SEARCH_TERM, array('start_page' => $i));\n $results = $response['repositories'];\n $this->_saveResults($results);\n\n if (count($results) < self::PER_PAGE) {\n break;\n }\n }\n\n Minion_CLI::write('Finished.');\n }", "public function fetching_images($strSearch)\n {\n // $client->setClient(new GuzzleClient($config));\n\n $client = new Client();\n $client->setClient(new GuzzleClient(['cookies' => true]));\n $client->setHeader('User-Agent','Mozilla/5.0 (Windows NT 10.0; Win64; x64)');\n //AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063');\n $client->setHeader('Accept', '*/*');\n $client->setHeader('Accept-Encoding', 'gzip, deflate, br');\n $client->setHeader('Connection:', 'Keep-Alive');\n //echo 'get';\n\n\n $url = $this->queryToUrl_min($strSearch);\n\n //check if the connection to remote site have succeed\n $crawler = null;\n // Go to the symfony.com website\n try {\n\n $crawler = $client->request('GET', $url);\n //$crawler = $this->launch_proxy($url,true);\n $this->continue = true;\n } catch (ConnectException $e) {\n //Catch the guzzle connection errors over here.These errors are something\n // like the connection failed or some other network error\n $number = -1;\n if($this->eager)\n {\n $number = count($this->searchResultsDB);\n }\n else\n {\n $number = count($this->searchResults);\n }\n\n //On renvoie l'execption\n if(!($number > 0))\n {\n $client->request('GET', $url);\n }\n\n }\n\n\n if($this->continue)\n {\n //echo $crawler[0]->html();\n $this->count = 0;\n $this->resultHeader[$this->count] = [];\n $this->resultLink[$this->count] = [];\n $this->resultLink_text[$this->count] = [];\n $this->resultBody[$this->count] = [];\n //echo 'result';\n $this->stringSearch = $strSearch;\n //on récupère les entêtes des résultats\n //$results = $crawler[0]->filter( 'div#ires table tr td')->each(function (Crawler $node, $i) {\n $results = $crawler->filter( 'div#ires table tr td')->each(function (Crawler $node, $i) {\n // echo 'ok';\n return $node;\n });\n //print_r($results);\n foreach ($results as $result) {\n\n // $header = $result->filter('cite')->html();\n // $link = $result->filter('a')->attr('href');\n $preview = $result->text();\n\n // echo 'joy ';\n //echo $preview;\n //echo ' c\\'est bon';\n if ($this->contains_($preview, $this->stringSearch, true)) {\n $header = $result->filter('cite')->html();\n $link = $result->filter('a img')->attr('src');\n array_push($this->resultHeader[$this->count], $header);\n array_push($this->resultLink[$this->count], $link);\n array_push($this->resultBody[$this->count], $preview);\n $link = $result->filter('a')->attr('href');\n $link = substr($link, strpos($link, '='));\n $link = substr($link, 1, strpos($link, '&') - 1);\n array_push($this->resultLink_text[$this->count], $link);\n /*\n $crawler_ = $crawler[1]->request('GET', $link);\n $images = $crawler_->filter( 'img')->each(function (Crawler $node_, $i) {\n\n return $node_;\n\n // echo $test .' <br/>';\n });\n\n $height = substr($preview,strpos($preview,'×'));\n $ext = substr($height,strpos($height,'-')+2);\n $ext = trim($ext);\n $height = substr($height,strpos($height,'×'),strpos($height,'–'));\n $height = substr($height,strpos($height,'×')+2,strpos($height,'–')-1);\n $height = trim($height);\n foreach ($images as $image)\n {\n if(($this->contains_($image->attr('alt'),$strSearch,true))||\n ($this->contains_($image->attr('src'),$ext,true,false)) && (strpos($image->attr('height'), $height) !== false) )\n {\n\n $link = $image->attr('src');\n echo $link .\"<br/>\";\n array_push($this->resultLink_text[$this->count], $link);\n }\n }\n //*/\n\n // echo 'header '.$header.'<br/>'. ' link: '.$link.'<br/>'.' preview'.$preview.'<br/> <br/>';\n }\n// sleep(1);\n }\n }\n\n }", "public function perform()\n {\n // init variables for this view\n $this->initVars();\n\n // search articles \n $this->model->action('article','search',\n array('result' => & $this->tplVar['articles'], \n 'search' => (string)$this->searchString,\n 'limit' => array('perPage' => $this->articlesPerPage,\n 'numPage' => (int)$this->pageNumber), \n 'fields' => array('id_article','title','status',\n 'id_node','pubdate','modifydate') )); \n\n // get node + node branch of each article\n foreach($this->tplVar['articles'] as & $article)\n {\n $article['nodeBranch'] = array();\n $article['node'] = array();\n \n // get navigation node branch content of the article node\n $this->model->action('navigation','getBranch', \n array('result' => & $article['nodeBranch'],\n 'id_node' => (int)$article['id_node'],\n 'fields' => array('title','id_node','id_parent'))); \n \n // get article node content\n $this->model->action('navigation','getNode', \n array('result' => & $article['node'],\n 'id_node' => (int)$article['id_node'],\n 'fields' => array('title','id_node')));\n }\n \n // create article pager links\n $this->model->action('article','pager', \n array('result' => & $this->tplVar['pager'],\n 'search' => (string)$this->searchString,\n 'perPage' => $this->articlesPerPage,\n 'numPage' => (int)$this->pageNumber,\n 'delta' => 10,\n 'url' => $this->pagerUrl,\n 'var_prefix' => 'search_',\n 'css_class' => 'search_pager')); \n\n // get article locks\n $this->getLocks();\n }", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "public function fetching($strSearch,$nb,$country = ['CM'],$video = false,$strict = false)\n {\n\n $client = new Client();\n // $client->setClient(new GuzzleClient($config));\n $client->setClient(new GuzzleClient(['cookies' => true]));\n $client->setHeader('User-Agent','Mozilla/5.0 (Windows NT 10.0; Win64; x64)');\n //AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063');\n $client->setHeader('Accept', '*/*');\n $client->setHeader('Accept-Encoding', 'gzip, deflate, br');\n $client->setHeader('Connection:', 'Keep-Alive');\n\n // echo $strSearch .\"<br/>\";\n foreach ($country as $pays) {\n\n if($strict)\n {\n $url = $this->queryToUrl('\"'.$strSearch.'\"', 0, $nb, $pays,$video);\n }\n else\n {\n $url = $this->queryToUrl($strSearch, 0, $nb, $pays,$video);\n }\n // $url = $this->queryToUrl($strSearch, 0, $nb, $country[0],$video);\n\n //echo $strSearch;\n //$url = \"http://www.google.com/search?q=\".$strSearch.\"&hl=en&start=0&sa=N\";\n\n //check if the connection to remote site have succeed\n\n $crawler = null;\n // Go to the symfony.com website\n try {\n\n $crawler = $client->request('GET', $url);\n $this->continue = true;\n } catch (ConnectException $e) {\n //Catch the guzzle connection errors over here.These errors are something\n // like the connection failed or some other network error\n $number = -1;\n if($this->eager)\n {\n $number = count($this->searchResultsDB);\n }\n else\n {\n $number = count($this->searchResults);\n }\n\n if(!($number > 0))\n {\n //throwException($e);\n $client->request('GET', $url);\n }\n\n }\n\n if($this->continue)\n {\n //echo $crawler->html();\n $this->resultHeader[$this->count] = [];\n $this->resultLink[$this->count] = [];\n $this->resultLink_text[$this->count] = [];\n $this->resultBody[$this->count] = [];\n if($video)\n {\n $this->resultHeaderV[$this->countV] = [];\n $this->resultLinkV[$this->countV] = [];\n $this->resultLink_textV[$this->countV] = [];\n $this->resultVideo[$this->countV] = [];\n $this->resultBodyV[$this->countV] = [];\n }\n //on récupère les entêtes des résultats\n $crawler->filter('td div#center_col div.g')->each(function (Crawler $node, $i) {\n\n $header = $node->filter('h3 a');\n \n if ($header->count() > 0) {\n $header = $header->html();\n // echo $header.'<br/>';\n //print(\"<br/>\".$header);\n if (strpos($header, 'mages for') == false) {\n //echo'<br/> '.$this->count.'<br/>';\n //print_r($this->resultHeader);\n array_push($this->resultHeader[$this->count], $header);\n \n $link = $node->filter('div cite')->html();\n // echo 'link '.$link.'<br/>';\n array_push($this->resultLink[$this->count], $link);\n $link = $node->filter('div cite')->text();\n array_push($this->resultLink_text[$this->count], $link);\n\n if (strpos($link, 'books.google') == false) {\n\n array_push($this->resultBody[$this->count], $node->filter('div span.st')->html());\n } else {\n // echo 'link '. $node->filter('div.s')->html().'<br/>';\n array_push($this->resultBody[$this->count], $node->filter('div.s')->html());\n }\n }\n }\n\n });\n if($video)\n {\n $crawler->filter('td div#center_col div.g.videobox')->each(function (Crawler $node, $i) {\n $video = $node->filter('td img')->attr('src');\n array_push($this->resultVideo[$this->countV], $video);\n $header = $node->filter('td h3 a');\n if ($header->count() > 0) {\n $link = $header->attr('href');\n $link = substr($link,strpos($link,'='));\n $link = substr($link,1,strpos($link,'&')-1);\n array_push($this->resultLink_textV[$this->countV], $link);\n\n $header = $header->html();\n //print(\"<br/>\".$header);\n if (strpos($header, 'mages for') == false) {\n array_push($this->resultHeaderV[$this->countV], $header);\n $link = $node->filter('div cite')->html();\n\n array_push($this->resultLinkV[$this->countV], $link);\n\n\n if (strpos($link, 'books.google') == false) {\n array_push($this->resultBodyV[$this->countV], $node->filter('div span.st')->html());\n } else {\n array_push($this->resultBodyV[$this->countV], $node->filter('div.s')->html());\n }\n }\n }\n\n });\n\n }\n $this->count++;\n if($video)\n {\n $this->countV++;\n }\n $min =[5,8,9,10,12,7];\n sleep(rand(0,1)*count($min));\n }\n //print count($searchResults);\n }\n //$url = 'http://freeproxylists.net/fr/?c=&pt=&pr=HTTPS&a%5B%5D=0&a%5B%5D=1&a%5B%5D=2&u=90';\n //$crawler = $client->request('GET', $url);\n // echo $crawler->html();\n\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}", "public function get_results() {\n\n\t\t\tif(!isset($_GET['wpusquery'])) {\n\t\t\t\tdie(); // if no data has been entered, quit\n\t\t\t} else {\n\t\t\t\t$searcharray = $_GET['wpusquery'];\n\t\t\t}\n\n\t\t\t$nonce = $_GET['searchNonce'];\n\t\t\tif(!wp_verify_nonce($nonce, 'search-nonce')) // make sure the search nonce matches the nonce generated earlier\n\t\t\t{\n\t\t\t\tdie ('Busted!');\n\t\t\t}\n\n\t\t\tif(class_exists(\"WPUltimateSearchPro\")) {\n\t\t\t\t$this->pro_class->execute_query_pro($searcharray);\n\t\t\t} else {\n\t\t\t\t$this->execute_query_basic($searcharray);\n\t\t\t}\n\t\t}", "public function action_search_doc()\n\t{\n\t\tglobal $context;\n\n\t\t$context['doc_apiurl'] = 'https://github.com/elkarte/Elkarte/wiki/api.php';\n\t\t$context['doc_scripturl'] = 'https://github.com/elkarte/Elkarte/wiki/';\n\n\t\t// Set all the parameters search might expect.\n\t\t$postVars = explode(' ', $context['search_term']);\n\n\t\t// Encode the search data.\n\t\tforeach ($postVars as $k => $v)\n\t\t{\n\t\t\t$postVars[$k] = urlencode($v);\n\t\t}\n\n\t\t// This is what we will send.\n\t\t$postVars = implode('+', $postVars);\n\n\t\t// Get the results from the doc site.\n\t\trequire_once(SUBSDIR . '/Package.subs.php');\n\t\t// Demo URL:\n\t\t// https://github.com/elkarte/Elkarte/wiki/api.php?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=template+eval\n\t\t$search_results = fetch_web_data($context['doc_apiurl'] . '?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=' . $postVars);\n\n\t\t// If we didn't get any xml back we are in trouble - perhaps the doc site is overloaded?\n\t\tif (!$search_results || preg_match('~<' . '\\?xml\\sversion=\"\\d+\\.\\d+\"\\?' . '>\\s*(<api>.+?</api>)~is', $search_results, $matches) !== 1)\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t$search_results = !empty($matches[1]) ? $matches[1] : '';\n\n\t\t// Otherwise we simply walk through the XML and stick it in context for display.\n\t\t$context['search_results'] = array();\n\n\t\t// Get the results loaded into an array for processing!\n\t\t$results = new XmlArray($search_results, false);\n\n\t\t// Move through the api layer.\n\t\tif (!$results->exists('api'))\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t// Are there actually some results?\n\t\tif ($results->exists('api/query/search/p'))\n\t\t{\n\t\t\t$relevance = 0;\n\t\t\tforeach ($results->set('api/query/search/p') as $result)\n\t\t\t{\n\t\t\t\t$title = $result->fetch('@title');\n\t\t\t\t$context['search_results'][$title] = array(\n\t\t\t\t\t'title' => $title,\n\t\t\t\t\t'relevance' => $relevance++,\n\t\t\t\t\t'snippet' => str_replace('class=\\'searchmatch\\'', 'class=\"highlight\"', un_htmlspecialchars($result->fetch('@snippet'))),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function postProcessDownload()\n {\n }", "public function indexCrawledDocuments() {\n\t\tforeach ( $this->aFiles as $sFile ) {\n\t\t\t$oRepoFile = new SplFileInfo( $sFile );\n\t\t\tif ( !$oRepoFile->isFile() ) continue;\n\n\t\t\t$sFileName = $oRepoFile->getFilename();\n\t\t\t$sDocType = $this->mimeDecoding( $oRepoFile->getExtension() );\n\t\t\tif ( !$this->checkDocType( $sDocType, $sFileName ) ) continue;\n\n\t\t\tif ( !$this->oMainControl->bCommandLineMode ) set_time_limit( $this->iTimeLimit );\n\n\t\t\tif ( $this->sizeExceedsMaxDocSize( $oRepoFile->getSize(), $sFileName ) ) continue;\n\n\t\t\t//Insert URL to Filename\n\t\t\t$rURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\t\t$sURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepoUrl' );\n\t\t\t//Replace realpath with webserver url only if $sUrl is set, otherwise work as before\n\t\t\tif($sURL == \"\"){\n\t\t\t $sRepoFileRealPath = \"file:///\" . $oRepoFile->getRealPath();\n\t\t\t}else{\n\t\t\t $sRepoFileRealPath = $this->getFilePath( $rURL, $sURL, $oRepoFile );\n\t\t\t}\n\n\t\t\t$timestampImage = wfTimestamp( TS_ISO_8601, $oRepoFile->getMTime() );\n\n\t\t\tif ( $this->checkExistence( $oRepoFile->getRealPath(), 'external', $timestampImage, $sFileName ) ) continue;\n\n\t\t\t$text = $this->getFileText( $oRepoFile->getRealPath(), $sFileName );\n\n\t\t\t$doc = $this->makeRepoDocument( $sDocType, utf8_encode( $sFileName ), $text, utf8_encode( $sRepoFileRealPath ), $timestampImage );\n\t\t\t$this->writeLog( $sFileName );\n\n\t\t\twfRunHooks( 'BSExtendedSearchBeforeAddExternalFile', array( $this, $oRepoFile, &$doc ) );\n\n\t\t\tif ( $doc ) {\n\t\t\t\t// mode and ERROR_MSG_KEY are only passed for the case when addsFile fails\n\t\t\t\t$this->oMainControl->addDocument( $doc, $this->mode, self::S_ERROR_MSG_KEY );\n\t\t\t}\n\t\t}\n\t}", "public function execute() {\n\t\t$result = [\n\t\t\t'success' => false,\n\t\t\t'errorMessage' => '',\n\t\t];\n\t\t$options = $this->getRequest()->getParams();\n\t\ttry {\n\t\t\t$response = $this->clientResolver->create(\"elasticsearch7\", $options)->testConnection();\n\t\t\tif ($response) {\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$url = \"{$options['hostname']}:{$options['port']}\";\n\t\t\t\t$this->curl->get($url);\n\t\t\t\t$result['html'] = $this->curl->getBody();\n\t\t\t}\n\t\t} catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n\t\t\t$result['errorMessage'] = $e->getMessage();\n\t\t} catch (\\Exception $e) {\n\t\t\t$message = __($e->getMessage());\n\t\t\t$result['errorMessage'] = $this->tagFilter->filter($message);\n\t\t}\n\n\t\t/** @var \\Magento\\Framework\\Controller\\Result\\Json $resultJson */\n\t\t$resultJson = $this->resultJsonFactory->create();\n\t\treturn $resultJson->setData($result);\n\t}", "public function execute_search()\n {\n\n $search_term = $this->input->post('search');\n\n $v_data = array(\"results\" => $this->Manage_roles_model->get_role($search_term));\n\n $data = array(\n \"title\" => $this->site_model->display_page_title(),\n \"content\" => $this->load->view(\"backoffice/execute_search\", $v_data, true),\n );\n $this->load->view(\"site/layouts/layout\", $data);\n\n }", "public function execute() {\n $this->check();\n $this->buildQuery();\n $response = json_decode($this->getContents());\n $this->response = !empty($response) ? $response : NULL;\n }", "public function crawl() {\n $client = Naloader::getHttpClient($this->url);\n $crawler = $client->request('GET', $this->url);\n $this->parseFromCrawler($crawler);\n }", "private function _process()\n {\n $params = $this->uri->uri_to_assoc(3);\n\n // grab any traditional GET parameters in the URL\n if (($pos = strpos($this->uri->uri_string(), '?')) !== false)\n {\n $getParams = substr($this->uri->uri_string(), $pos + 1);\n foreach(explode('&', $getParams) as $param)\n {\n list($key, $value) = explode('=', $param);\n $params[$key] = $value;\n }\n }\n\n // URL decode all of the parameters\n foreach ($params as $key => $value)\n {\n $params[$key] = urldecode($value);\n }\n\n // which report is going to be executed (do not use r_id param)\n if (isset($params['type']))\n {\n switch ($params['type']) {\n case \"answers\":\n $this->reportID = 165; // default OpenSearch report\n break;\n default:\n \\RightNow\\Libraries\\ThirdParty\\rss_error(\\RightNow\\Utils\\Config::getMessage(INVALID_OPENSEARCH_TYPE_SPECIFIED_LBL));\n }\n }\n else\n {\n $this->reportID = 165; // default OpenSearch report\n }\n\n // get the query\n if (isset($params['kw']))\n $this->q = $params['kw'];\n if (isset($params['q']))\n $this->q = $params['q'];\n\n if (isset($this->q))\n {\n $filters['keyword']->filters->data = $this->q;\n $filters['keyword']->filters->rnSearchType = 'keyword';\n $filters['keyword']->filters->reportID = $this->reportID;\n $filters['keyword']->type = 'keyword';\n $filters['search'] = true;\n }\n\n if (!$this->session->isNewSession())\n {\n // how many results\n if (isset($params['count']))\n $filters['per_page'] = $params['count'];\n\n // what is the startindex\n if (isset($params['startIndex']))\n {\n $filters['start_index'] = $params['startIndex'];\n }\n\n // It's only a \"search\" if there is no paging going on, and it's\n // not a first impression. Though this will be ignored if there\n // isn't actually a search term\n if (empty($filters['start_index']))\n {\n $filters['recordKeywordSearch'] = 1;\n }\n else\n {\n ActionCapture::record('opensearch', 'paging');\n }\n }\n if(isset($this->q) && $filters['recordKeywordSearch'] === 1){\n ActionCapture::record('opensearch', 'search', substr($this->q, 0, ActionCapture::OBJECT_MAX_LENGTH));\n }\n\n $reportFilter = $this->model('Report')->getFilterByName($this->reportID, 'os_search')->result;\n $filters['searchType']->filters->fltr_id = $reportFilter['fltr_id'];\n $filters['searchType']->filters->oper_id = $reportFilter['oper_id'];\n $filters['searchType']->filters->rnSearchType = 'searchType';\n $filters['searchType']->filters->reportID = $this->reportID;\n $filters['searchType']->type = 'searchType';\n\n if (isset($params['sort']))\n {\n $sort = explode(':', $params['sort']);\n\n $filters['sort_args']['filters']['sort_field0'] = array(\n 'col_id' => intval($sort[0]),\n 'sort_direction' => intval($sort[1]),\n 'sort_order' => 1 );\n }\n\n if (isset($params['p']))\n {\n $prodFilter = $this->model('Report')->getFilterByName($this->reportID, 'os_prod')->result;\n\n $filters['map_prod_hierarchy']->filters->fltr_id = $prodFilter['fltr_id'];\n $filters['map_prod_hierarchy']->filters->oper_id = $prodFilter['oper_id'];\n $filters['map_prod_hierarchy']->filters->rnSearchType = 'menufilter';\n $filters['map_prod_hierarchy']->filters->reportID = $this->reportID;\n\n foreach(explode(';', $params['p']) as $product)\n {\n $filters['map_prod_hierarchy']->filters->data[] = explode(',', $product);\n }\n }\n\n if (isset($params['c']))\n {\n $catFilter = $this->model('Report')->getFilterByName($this->reportID, 'os_cat')->result;\n\n $filters['map_cat_hierarchy']->filters->fltr_id = $catFilter['fltr_id'];\n $filters['map_cat_hierarchy']->filters->oper_id = $catFilter['oper_id'];\n $filters['map_cat_hierarchy']->filters->rnSearchType = 'menufilter';\n $filters['map_cat_hierarchy']->filters->reportID = $this->reportID;\n\n foreach(explode(';', $params['c']) as $category)\n {\n $filters['map_cat_hierarchy']->filters->data[] = explode(',', $category);\n }\n }\n\n foreach ($params as $name => $value)\n {\n $filterNum = 0;\n\n // filter parameters are preceded by a 'f_'\n if (stristr(substr($name, 0, 2), 'f_'))\n {\n $tempFilter = $this->model('Report')->getFilterByName($this->reportID, substr($name, 2))->result;\n\n $filters[\"os_filter$filterNum\"]->filters->fltr_id = $tempFilter['fltr_id'];\n $filters[\"os_filter$filterNum\"]->filters->oper_id = $tempFilter['oper_id'];\n $filters[\"os_filter$filterNum\"]->filters->rnSearchType = 'searchType';\n $filters[\"os_filter$filterNum\"]->filters->reportID = $this->reportID;\n $filters[\"os_filter$filterNum\"]->filters->data[] = $value;\n $filterNum++;\n }\n }\n\n $format['raw_date'] = true;\n\n $reportToken = \\RightNow\\Utils\\Framework::createToken($this->reportID);\n $results = $this->model('Report')->getDataHTML($this->reportID, $reportToken, $filters, $format)->result;\n\n if (!isset($results['headers']) || !isset($results['data']))\n \\RightNow\\Libraries\\ThirdParty\\rss_error(\\RightNow\\Utils\\Config::getMessage(ERROR_EXECUTING_REPORT_LBL) . \" \" . $this->reportID);\n\n // create the header array for easy column extraction\n foreach ($results['headers'] as $header)\n {\n if ($header['heading'] == 'title' ||\n $header['heading'] == 'link' ||\n $header['heading'] == 'pubDate' ||\n $header['heading'] == 'score')\n {\n $this->headers[] = array('heading' => $header['heading'], 'std' => true);\n }\n else\n {\n $this->headers[] = array('heading' => $header['heading']);\n }\n }\n\n // assemble a link that points back to an analogue of\n // this search on the regular enduser pages\n $this->homeLink = Url::getShortEufAppUrl('sameAsCurrentPage', '/home');\n if (isset($this->q))\n {\n $this->homeLink .= '/kw/' . $this->q;\n }\n $this->homeLink .= Url::sessionParameter();\n\n $output = $this->_toRssXml($results);\n\n if($output)\n {\n header('Content-Type: text/xml; charset='.$this->rssgen->outputencoding);\n header('Content-Length: '.strval(strlen($output)));\n echo $output;\n }\n else\n {\n \\RightNow\\Libraries\\ThirdParty\\rss_error(\"Error: \" . $this->rssgen->error);\n }\n }", "public function search() {\n\t\tif(isset($_GET['query'])) $this->query_str = $_GET['query'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t$cache = new Cache($this->query_str);\n\t\t//check if the result is cached\n\t\t\n\t\tif($cache->allow_cache()) {\n\t\t\t$raw = $cache->load_cache();\n\t\t\tif($raw === false) $raw = null;\n\t\t}\n\n\t\tif($raw === null) {\n\t\t\t//check if jar exists\n\t\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar search ' . escapeshellarg($this->query_str));\n\t\t\telse return;\n\n\t\t\t//only save into cached when the escaped string equal to input string\n\t\t\tif($raw !== null && count($raw) > 0 && $cache->allow_cache()) \n\t\t\t\t$cache->save_cache($raw);\n\t\t}\n\n\t\t$this->results = json_decode($raw);\n\n\t\t$this->end_time = microtime(true);\n\t}", "public function run()\n {\n $result = new JsonAjaxResult();\n \n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n \n $elements = $this->get_elements();\n \n $elements = $elements->as_array();\n \n $result->set_property(self::PROPERTY_ELEMENTS, $elements);\n $result->set_property(self::PROPERTY_TOTAL_ELEMENTS, $this->user_count);\n \n $result->display();\n }", "public function execute() {\n\t\t$titles = $this->getPageSet()->getGoodTitles();\n\t\tif ( count( $titles ) == 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$params = $this->extractRequestParams();\n\n\t\tforeach( $titles as $title ) {\n\t\t\t$pageId = $title->getArticleID();\n\t\t\tif ( ! $title->hasSourceText() ) {\n\t\t\t\t$results = array( 'errors' => 'Title does not exist' );\n\t\t\t} else if ( ! $title->userCan( 'read' ) ) {\n\t\t\t\t$results = array( 'errors' => 'Cannot read this title' );\n\t\t\t} else {\n\t\t\t\t# Get the article text\n\t\t\t\t$rev = Revision::newFromTitle( $title );\n\t\t\t\tif ( !is_object( $rev ) ){\n\t\t\t\t\t$results = array( 'errors' => 'Could not get revision' );\n\t\t\t\t} else {\n\t\t\t\t\t$text = $rev->getText();\n\t\t\t\t\t$results['contents'] = $this->getParseTree( $text );\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ( $results as $elementName => $item ) {\n\t\t\t\t$fit = $this->addPageSubItem( $pageId, $item, $elementName );\n\t\t\t\tif ( ! $fit ) {\n\t\t\t\t\t/* ?? this should never happen */ \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function run(){\n // Loads from an Alert\n \n $alert = AlertManager::load(67);\n $test = new Search();\n \n // the actual Query\n $query = $alert ->getQuery();\n \n dpm(SearchLabel::toLabel($query));\n $test -> addFromQuery($query);\n $num = $test ->getCount();\n \n dpm($num);\n $nodes = $test ->getNodes();\n dpm($nodes);\n }", "public function Download(){\n\t\t\n\t\t\n\t}", "public function view_results()\n {\n $obj = new CombinedAnalysis();\n $this->final_results = $obj->fetchResultsFromFiles($this->id);\n\n // show everthing in template\n $this->show_template();\n }", "public function updatingSearch()\n {\n $this->gotoPage(1);\n }", "public function downloadAction() {}", "public function execute() {\n\t\t$data = $this->getResultData();\n\t\t$this->printText($data[0]);\n\t}", "public function execute()\n {\n // 0. Get some options\n $oConfig = \\OxidEsales\\Eshop\\Core\\Registry::getConfig();\n $maxExports = intval($oConfig->getShopConfVar('sEXPORTJOBIPJ', $oConfig->getShopId(), 'module:translationmanager6'));\n\n // 1. Query all project with status 30\n $aProjects = array();\n $this->_queryProjects($aProjects);\n\n // 2.1. For each project we get a list of cms page to export\n $this->_queryElements('cms', $aProjects, $maxExports);\n\n // 2.2. For each project we get a list of attribute to export\n $this->_queryElements('attribute', $aProjects, $maxExports);\n\n // 2.3. For each project we get a list of categories to export\n $this->_queryElements('category', $aProjects, $maxExports);\n\n // 2.4. For each project we get a list of articles to export\n $this->_queryElements('article', $aProjects, $maxExports);\n\n // 3.0 Prepare items.\n $aItems = array();\n\n // 3.1 Prepare cms items\n $this->_prepareCMSItems($aProjects, $aItems);\n\n // 3.2 Prepare category items\n $this->_prepareCategoryItems($aProjects, $aItems);\n\n // 3.3 Prepare attribute items\n $this->_prepareAttributeItems($aProjects, $aItems);\n\n // 3.4 Prepare article items\n $this->_prepareArticleItems($aProjects, $aItems);\n\n // 4.0 Export to remote\n $this->_exportItems($aProjects, $aItems);\n\n // 5.0 Update projects progress\n $this->_updateProjectsProgress($aProjects);\n }", "public function execute()\n\t{\n\t\t$searchQuery = $this->searchPhrase ? '\"' . $this->searchPhrase . '\"' : '';\n\t\t$queryParams['attributesToRetrieve']\t= '*';\n\t\t$queryParams['maxValuesPerFacet']\t\t= '100';\n\t\t$queryParams['attributesToHighlight']\t= array();\n\t\t$queryParams['filters']\t\t\t\t\t= $this->filters;\n\t\t$queryParams['facetFilters']\t\t\t= $this->facetFilters;\n\t\t$queryParams['offset']\t\t\t\t\t= $this->start;\n\t\t$queryParams['length']\t\t\t\t\t= $this->limit;\n\n\t\t$queryParams['facets']\t\t\t\t\t= array($this->facetField);\n\n\t\t// We need to pass this query by setRawQueryParams for advsearch frontent.\n\t\t$queryParams['advancedSyntax']\t\t\t= 'true';\n\n\t\tif (count($this->rawQueryParams))\n\t\t{\n\t\t\t$queryParams = array_merge($queryParams, $this->rawQueryParams);\n\t\t}\n\n\t\t// This is something Juggad related to Osianama requirement.\n\t\tif (isset($queryParams['restrictSearchableAttributes']))\n\t\t{\n\t\t\t$searchQuery = $this->searchPhrase ? $this->searchPhrase : '';\n\t\t}\n\n\t\t$Data = $this->algoliaIndex->search($searchQuery, $queryParams);\n\n\t\tif (count($Data['hits']) > 0)\n\t\t{\n\t\t\t$this->total\t= $Data['nbHits'];\n\t\t\t$this->count\t= $Data['hitsPerPage'];\n\t\t\t$this->records\t= '';\n\n\t\t\tforeach ($Data['hits'] as $key => $row)\n\t\t\t{\n\t\t\t\tunset($row['_highlightResult']);\n\n\t\t\t\t$row['id']\t\t\t\t\t\t= $row['objectID'];\n\t\t\t\t$this->records['data'][$key]\t= (object) $row;\n\t\t\t}\n\n\t\t\tif ($this->facetField)\n\t\t\t{\n\t\t\t\t$this->records['facets'] = $Data['facets'];\n\t\t\t}\n\t\t}\n\t}", "public function initSpider(){\n echo \"<p>Searching: <b>\".$this->keyword.\"</b> and Looking for: <b>\".$this->website.\"</b></p>\";\n echo str_repeat(\" \", 256);\n $contador=0;\n $encontre=false;\n $_GET['weboriginal']=\"\";\n $_GET['webcontador']=\"\";\n $i=10;\n $c=1;\n while($c<=10) { \n echo \"<ul><li><b>Searching in Page: $c</b></li>\"; \n flush();ob_flush();\n $records= $this->getRecordsAsArray($this->url); \n $count=count($records);\n echo \"<ul>\";\n for($k=0;$k<$count;$k++){\n $j=$k+1;\n $link=$records[$k][2];\n $linkOriginal = $link;\n $link=strip_tags($link);\n $link=str_replace(\"http://www.\",\"\",$link);\n $link=str_replace(\"http://\",\"\",$link);\n $link=str_replace(\"www.\",\"\",$link);\n $pos=strpos($link, \"/\");\n $link=trim(substr($link,0,$pos));\n $contador++;\n if($this->website==$link){\n $domain=$this->website;\n $_GET['weboriginal']=$linkOriginal;\n $_GET['webcontador']=$contador;\n echo \"<li><h1>Result was found in Page: $c and Record: $j</h1></li>\";\n echo \"Web original \".$linkOriginal;\n echo \"<div>Congrats, We searched google's top 10 pages for <b>\\\"\".$this->keyword.\"</b>\\\", we found your domain <b>\\\"$domain\\\"</b> listed on page: $c at $j place </div>\";echo \"</ul></ul>\";\n $encontre=true;\n break;\n }\n else{\n echo \"<li>Result not found on Page: $c and Record: $j</li>\";\n } \n }\n if($encontre==true){\n break;\n }\n echo \"</ul></ul>\";\n $c++;\n $this->url = $this->updateUrl($this->keyword, $i,$this->motor);\n }\n echo \"Crawled through all 10 pages.\"; \n \n if($this->page==false){\n $domain=$this->website;\n $keyword=$this->keyword;\n echo \"<div>Sorry, We searched google's top 10 pages for <b>\\\"$keyword\\\"</b>, but was unable to find your domain <b>\\\"$domain\\\"</b> listed anywhere. </div>\";\n }\n else {\n $page=$this->page;\n $records=$this->records;\n $domain=$this->website;\n $keyword=$this->keyword;\n echo \"<div>Congrats, We searched google's top 10 pages for <b>\\\"$keyword\\\"</b>, we found your domain <b>\\\"$domain\\\"</b> listed on page: $page at $record place </div>\";\n }\n }", "function execute(){\n\t\tsession_write_close();\n\t\t$sRssUri = we_base_request::_(we_base_request::URL, 'we_cmd', '', 0);\n\t\t$sCfgBinary = we_base_request::_(we_base_request::STRING, 'we_cmd', '', 1); //note binary content\n\t\t$bCfgTitle = (bool) $sCfgBinary{0};\n\t\t$bCfgLink = (bool) $sCfgBinary{1};\n\t\t$bCfgDesc = (bool) $sCfgBinary{2};\n\t\t$bCfgContEnc = (bool) $sCfgBinary{3};\n\t\t$bCfgPubDate = (bool) $sCfgBinary{4};\n\t\t$bCfgCategory = (bool) $sCfgBinary{5};\n\t\t$iNumItems = we_base_request::_(we_base_request::INT, 'we_cmd', '', 2);\n\t\tswitch($iNumItems){\n\t\t\tcase 11:\n\t\t\t\t$iNumItems = 15;\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$iNumItems = 20;\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$iNumItems = 25;\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$iNumItems = 50;\n\t\t\t\tbreak;\n\t\t}\n\t\t$sTbBinary = we_base_request::_(we_base_request::STRING, 'we_cmd', '', 3); //binary\n\t\t$bTbLabel = (bool) $sTbBinary{0};\n\t\t$bTbTitel = (bool) $sTbBinary{1};\n\t\t$bTbDesc = (bool) $sTbBinary{2};\n\t\t$bTbLink = (bool) $sTbBinary{3};\n\t\t$bTbPubDate = (bool) $sTbBinary{4};\n\t\t$bTbCopyright = (bool) $sTbBinary{5};\n\n\t\t//Bug 6119: Keine Unterstützung für curl in der XML_RSS Klasse\n\t\t//daher Umstellung den Inhalt des Feeds selbst zu holen\n\t\t$parsedurl = parse_url($sRssUri);\n\t\t$http_request = new we_http_request($parsedurl['path'], $parsedurl['host'], 'GET');\n\t\t$http_request->executeHttpRequest();\n\t\t$http_response = new we_http_response($http_request->getHttpResponseStr());\n\t\twhile(isset($http_response->http_headers['Location'])){//eine Weiterleitung ist aktiv\n\t\t\t$parsedurl = parse_url($http_response->http_headers['Location']);\n\t\t\t$http_request = new we_http_request($parsedurl['path'], $parsedurl['host'], 'GET');\n\t\t\t$http_request->executeHttpRequest();\n\t\t\t$http_response = new we_http_response($http_request->getHttpResponseStr());\n\t\t}\n\t\t$feeddata = $http_response->http_body;\n\n\t\t$oRssParser = new we_xml_rss($feeddata, null, $GLOBALS['WE_BACKENDCHARSET']); // Umstellung in der XML_RSS-Klasse: den string, und nicht die url weiterzugeben\n\t\t$tmp = $oRssParser->parse();\n\t\t$sRssOut = \"\";\n\n\t\t$iCurrItem = 0;\n\t\tforeach($oRssParser->getItems() as $item){\n\t\t\t$bShowTitle = ($bCfgTitle && isset($item['title']));\n\t\t\t$bShowLink = ($bCfgLink && isset($item['link']));\n\t\t\t$bShowDesc = ($bCfgDesc && isset($item['description']));\n\t\t\t$bShowContEnc = ($bCfgContEnc && isset($item['content:encoded']));\n\t\t\t$bShowPubdate = ($bCfgPubDate && isset($item['pubdate']));\n\t\t\t$bShowCategory = ($bCfgCategory && isset($item['category']));\n\n\t\t\t$sLink = (($bCfgLink && isset($item['link'])) && !$bShowTitle) ? \" &nbsp;\" .\n\t\t\t\twe_html_element::htmlA(array(\"href\" => $item['link'], \"target\" => \"_blank\", \"style\" => \"text-decoration:underline;\"), g_l('cockpit', '[more]')) : \"\";\n\t\t\tif($bShowContEnc){\n\t\t\t\t$contEnc = new we_html_table(array(\"class\" => 'default'), 1, 1);\n\t\t\t\t$contEnc->setCol(0, 0, null, $item['content:encoded'] . ((!$bCfgDesc) ? $sLink : \"\"));\n\t\t\t}\n\n\t\t\t$sRssOut .= ($bShowTitle ?\n\t\t\t\t\t($bShowLink ? we_html_element::htmlA(array(\"href\" => $item['link'], \"target\" => \"_blank\"), we_html_element::htmlB($item['title'])) :\n\t\t\t\t\t\twe_html_element::htmlB($item['title'])) .\n\t\t\t\t\t($bShowPubdate ? ' ' : we_html_element::htmlBr()) :\n\t\t\t\t\t'') .\n\t\t\t\t($bShowPubdate ?\n\t\t\t\t\tg_l('cockpit', '[published]') . ': ' . date(g_l('date', '[format][default]'), strtotime($item['pubdate'])) :\n\t\t\t\t\t'') .\n\t\t\t\t($bShowCategory ?\n\t\t\t\t\t($bShowPubdate ? we_html_element::htmlBr() : \"\") .\n\t\t\t\t\tg_l('cockpit', '[category]') . \": \" . $item['category'] :\n\t\t\t\t\t'') .\n\t\t\t\t($bShowPubdate || $bShowCategory ?\n\t\t\t\t\twe_html_element::htmlBr() :\n\t\t\t\t\t'') .\n\t\t\t\t($bShowDesc ?\n\t\t\t\t\t$item['description'] . $sLink . we_html_element::htmlBr() :\n\t\t\t\t\t\"\") .\n\t\t\t\t($bShowContEnc ?\n\t\t\t\t\t$contEnc->getHTML() :\n\t\t\t\t\t(!$bShowDesc ?\n\t\t\t\t\t\t$sLink . we_html_element::htmlBr() :\n\t\t\t\t\t\t'')\n\t\t\t\t) .\n\t\t\t\t($bShowDesc || $bShowContEnc ?\n\t\t\t\t\twe_html_element::htmlBr() :\n\t\t\t\t\t\"\");\n\t\t\tif($iNumItems){\n\t\t\t\t$iCurrItem++;\n\t\t\t\tif($iCurrItem == $iNumItems){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$aTb = array();\n\t\tif($bTbLabel){\n\t\t\t$aTb[] = g_l('cockpit', '[rss_feed]');\n\t\t}\n\t\tif($bTbTitel){\n\t\t\t$aTb[] = we_base_request::_(we_base_request::STRING, 'we_cmd', '', 4) ? :\n\t\t\t\t((isset($oRssParser->channel[\"title\"])) ? $oRssParser->channel[\"title\"] : \"\");\n\t\t}\n\t\tif($bTbDesc){\n\t\t\t$aTb[] = (isset($oRssParser->channel[\"description\"])) ? str_replace(array(\"\\n\", \"\\r\"), '', $oRssParser->channel[\"description\"]) : '';\n\t\t}\n\t\tif($bTbLink){\n\t\t\t$aTb[] = (isset($oRssParser->channel[\"link\"])) ? $oRssParser->channel[\"link\"] : '';\n\t\t}\n\t\tif($bTbPubDate){\n\t\t\t$aTb[] = (isset($oRssParser->channel[\"pubdate\"])) ? (date(g_l('date', '[format][default]'), strtotime($oRssParser->channel[\"pubdate\"]))) : \"\";\n\t\t}\n\t\tif($bTbCopyright){\n\t\t\t$aTb[] = (isset($oRssParser->channel[\"copyright\"])) ? $oRssParser->channel[\"copyright\"] : \"\";\n\t\t}\n\t\t$resp = new we_rpc_response();\n\t\t$resp->setData('data', $sRssOut);\n\n\t\t// title\n\t\t$title = implode(' - ', $aTb);\n\t\tif(strlen($title) > 50){\n\t\t\t$title = substr($title, 0, 50) . '&hellip;';\n\t\t}\n\t\t$resp->setData('titel', $title);\n\t\t$resp->setData('widgetType', \"rss\");\n\t\t$resp->setData('widgetId', we_base_request::_(we_base_request::STRING, 'we_cmd', 0, 5));\n\n\t\treturn $resp;\n\t}", "public function search()\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->getUrl());\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n ob_start();\n curl_exec($ch);\n $response = ob_get_contents();\n ob_end_clean();\n\n curl_close($ch);\n\n return $response;\n }", "public function execute() {\n $show = $this->app->config->get('app.pagination.items');\n\n // Checks if it is a natural numerical.\n // We do this first because otherwise it\n // could be possible that would contact the\n // database for nothing.\n if ( ! $this->page || ! ctype_digit((string) $this->page))\n $this->app->notFound();\n\n $totalItems = $this->items->count();\n\n if ($totalItems == 0) {\n $this->items = [];\n }\n else {\n $this->totalPages = ceil($totalItems / $show);\n\n if ($this->page > $this->totalPages)\n $this->app->notFound();\n\n $offset = ($this->page - 1) * $show;\n\n $this->items = $this->items->limit($show)->offset($offset)->get();\n }\n }", "public function execQuery()\n{\n\n $url = $this->getURL();\n // create curl resource \n $ch = curl_init(); \n\n //return the transfer as a string \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n curl_setopt( $ch, CURLOPT_USERAGENT, \"MyUserAgent\" );\n\n // set url \n curl_setopt($ch, CURLOPT_URL, $url);\n\n // $output contains the output string \n $result = curl_exec($ch); \n\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); \n\n // Check if any error occurred\n if(curl_errno($ch))\n {\n echo 'Curl error: ' . curl_error($ch);\n }\n // close curl resource to free up system resources \n curl_close($ch); \n\n return $result;\n}", "public function getResults();", "function curl_index($vs = null, $ev = null, $search = null)\n\t{\n\t\t\n\t\t$url \t = 'http://webbond.seminolesheriff.org/Search.aspx';\n\t\t$headers = array('GET /public/ArRptQuery.aspx HTTP/1.1',\n\t\t\t\t\t'Host: www.sheriffseminole.org',\n\t\t\t\t\t'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1',\n\t\t\t\t\t'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n\t\t\t\t\t'Accept-Language: en-us,en;q=0.5',\n\t\t\t\t\t'Accept-Encoding: gzip, deflate',\n\t\t\t\t\t'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n\t\t\t\t\t'Keep-Alive: 115',\n\t\t\t\t\t'Connection: keep-alive',\n\t\t\t\t\t'Cookie: ASP.NET_SessionId=hhwz3u45zmuiddbhqwy2y1rw',\n\t\t\t\t\t'Cache-Control: max-age=0');\n\t\t$ch = curl_init(); \n \tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookies);\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $this->cookies);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tif ($ev && $vs && $search)\n\t\t{\n\t\t\t$fields = '__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE='.urlencode($vs).'&__EVENTVALIDATION='.urlencode($ev).'&ctl00%24ContentPlaceHolder1%24ddllist=Last+Name&ctl00%24ContentPlaceHolder1%24txtTST='.urlencode($search).'&ctl00%24ContentPlaceHolder1%24Button1=Search';\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n\t\t}\n\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $index = curl_exec($ch);\n curl_close($ch);\n\t\treturn $index;\n\t}", "function get_initial_results()\n{\n\tinclude('global_vars_insert.php');\n\n\t////////////////////////////////////////////\n\t/////\tBING INITIAL SEARCH DATA \n\t////////////////////////////////////////////\n\t\n\tinclude('bing_search_initial.php');\n\n ////////////////////////////////////////////\n\t/////\tENTIREWEB INITIAL SEARCH DATA \n\t////////////////////////////////////////////\n \n\tinclude('entireweb_search_initial.php');\n\n\t////////////////////////////////////////////\n\t/////\tBLEKKO INITIAL SEARCH REQUEST \n\t//////////////////////////////////////////// \n\t\n\tinclude('blekko_search_initial.php');\n\t\n\t////////////////////////////////////////////\n\t/////\tCURL MULTI-SESSION DATA \n\t////////////////////////////////////////////\n\n\tinclude('curl.php');\n}", "private function get_results() {\n $cache = new SearchCache();\n\n if ($this->cache and $cache->can_cache()) {\n if (!($resultdocs = $cache->cache($this->term))) {\n $resultdocs = $this->process_results();\n //cache the results so we don't have to compute this on every page-load\n $cache->cache($this->term, $resultdocs);\n //print \"Using new results.\";\n } else {\n //There was something in the cache, so we're using that to save time\n //print \"Using cached results.\";\n } \n } else {\n //no caching :(\n //print \"Caching disabled!\";\n $resultdocs = $this->process_results();\n } \n return $resultdocs;\n }", "public function links() {\n\t\tif(isset($_POST['id'])) $this->query_str = $_POST['id'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t//check if jar exists\n\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar links ' . escapeshellarg($this->query_str));\n\t\telse return;\n\n\t\t$this->results = json_decode($raw);\n\n\t}", "public abstract function getResults();", "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 execute() {\r\n $url = $this->getUrl() . $this->actions['execute'];\r\n\r\n Utils::log(sprintf(\"Reindexing all on '%s'...\", $url));\r\n $res = $this->curl($url);\r\n \r\n if ($res == 404) {\r\n Utils::log(\\Logger\\ILogger::ERROR, sprintf(\"REINDEX: Cannot 'reindex all'. Remote script '%s' does not exists.\", $url));\r\n } else {\r\n Utils::log(\"REINDEX: Reindexed all.\");\r\n }\r\n \r\n return $res;\r\n }", "public function run() {\r\n\t\t$i = 1;\r\n\t\twhile ($i < self::NBR_OF_FILES) {\r\n\t\t\t$this->explore_path[0] = $this->get_path(0, $i);\r\n\t\t\t$j = 0;\r\n\t\t\twhile ($j < self::NBR_OF_FILES) {\r\n\t\t\t\t$this->explore_path[1] = $this->get_path(1, $j);\r\n\t\t\t\t$k = 0;\r\n\t\t\t\twhile ($k < self::NBR_OF_FILES) {\r\n\t\t\t\t\t$this->explore_path[2] = $this->get_path(2, $k);\r\n\t\t\t\t\tif (is_numeric(file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README')[0])) {\r\n\t\t\t\t\t\techo \"flag : \".file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README'). \"was found at path \".self::FULL_URL.implode(\"\", $this->explore_path);\r\n\t\t\t\t\t\treturn (0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$k++;\r\n\t\t\t\t}\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}", "function show_results()\n\t{\n\t\tglobal $ibforums, $std;\n\n\t\t$this->result_type = $ibforums->input['result_type'];\n\t\t$this->search_in = $ibforums->input['search_in'];\n\n\t\t//------------------------------------------------\n\t\t// We have a search ID, so lets get the parsed results.\n\t\t//------------------------------------------------\n\n\t\t$this->unique_id = $ibforums->input['searchid'];\n\n\t\tif (!$this->unique_id)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$stmt = $ibforums->db->query(\"SELECT *\n\t\t\t\t FROM ibf_search_results\n\t\t\t\t WHERE id='{$this->unique_id}'\");\n\n\t\t$sr = $stmt->fetch();\n\n\t\t$tmp_topics = $sr['topic_id'];\n\t\t$topic_max_hits = \"\"; //$sr['topic_max'];\n\t\t$tmp_posts = $sr['post_id'];\n\t\t$post_max_hits = \"\"; //$sr['post_max'];\n\n\t\t$this->sort_order = $sr['sort_order'];\n\t\t$this->sort_key = $sr['sort_key'];\n\n\t\t//------------------------------------------------\n\t\t// Remove duplicates from the topic_id and post_id\n\t\t//------------------------------------------------\n\n\t\t$topic_max_hits = self::unique_string_items($tmp_topics);\n\t\t$post_max_hits = self::unique_string_items($tmp_posts);\n\n\t\t$topics = $tmp_topics;\n\t\t$posts = $tmp_posts;\n\n\t\t//-------------------------------------\n\n\t\tif (!$topics and !$posts)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$url_words = $this->convert_highlite_words($ibforums->input['highlite']);\n\n\t\t$count = 0;\n\n\t\tif ($this->result_type == 'topics')\n\t\t{\n\t\t\tif ($this->search_in == 'titles')\n\t\t\t{\n\t\t\t\t$this->fill_read_arrays($topics);\n\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits);\n\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t FROM\n\t\t\t\t\t\tibf_topics t, ibf_forums f\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tt.tid IN(\" . $topics . \")\n\t\t\t\t\t\tAND f.id=t.forum_id\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\t ORDER BY t.pinned DESC,\";\n\n\t\t\t\t// search new topics of user\n\t\t\t\tif ($ibforums->input['new'])\n\t\t\t\t{\n\t\t\t\t\t$query .= \"f.id ASC,\";\n\t\t\t\t}\n\n\t\t\t\t$query .= \"t.\" . $this->sort_key . \" \" . $this->sort_order . \" LIMIT \" . $this->first . \",25\";\n\n\t\t\t\t$stmt = $ibforums->db->query($query);\n\n\t\t\t} else // ( $this->search_in == 'posts' )\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t// we have tid and pid to sort out, woohoo NOT\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t// Array for forum id of each message\n\t\t\t\t$forum_posts = array();\n\n\t\t\t\tif ($posts)\n\t\t\t\t{\n\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tforum_id,\n\t\t\t\t\t\ttopic_id\n\t\t\t\t\tFROM ibf_posts\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tpid IN({$posts})\n\t\t\t\t\t\tAND queued != 1\");\n\n\t\t\t\t\tif ($topics)\n\t\t\t\t\t{\n\t\t\t\t\t\t$topics = explode(',', $topics);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$topics = array();\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ($pr = $stmt->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!in_array($pr['topic_id'], $topics))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$topics[] = $pr['topic_id'];\n\t\t\t\t\t\t\t$topic_max_hits++;\n\n\t\t\t\t\t\t\t$forum_posts[$pr['topic_id']] = $pr['forum_id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$topics = implode(',', $topics);\n\t\t\t\t}\n\t\t\t\t$this->fill_read_arrays($topics);\n\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits);\n\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t \t FROM ibf_topics t\n\t\t\t\t\t LEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=t.forum_id)\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tt.tid IN(\" . $topics . \")\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\t ORDER BY\n\t\t\t\t\t\tt.pinned DESC,\";\n\n\t\t\t\t// Search new topics of user\n\t\t\t\tif ($ibforums->input['new'])\n\t\t\t\t{\n\t\t\t\t\t$query .= \"f.id ASC,\";\n\t\t\t\t}\n\n\t\t\t\t$query .= \"t.\" . $this->sort_key . \" \" . $this->sort_order . \" LIMIT \" . $this->first . \",25\";\n\n\t\t\t\t$stmt = $ibforums->db->query($query);\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\n\t\t\tif ($stmt->rowCount())\n\t\t\t{\n\t\t\t\twhile ($row = $stmt->fetch())\n\t\t\t\t{\n\t\t\t\t\t// club tool\n\t\t\t\t\tif ($row['club'] and $std->check_perms($ibforums->member['club_perms']) == FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$count++;\n\n\t\t\t\t\t$row['keywords'] = $url_words;\n\n\t\t\t\t\tif ($row['pinned'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->output .= View::make(\"search.RenderPinnedRow\", ['Data' => $this->parse_entry($row)]);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->output .= View::make(\"search.RenderRow\", ['Data' => $this->parse_entry($row)]);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$std->Error(array(\n\t\t\t\t 'LEVEL' => 1,\n\t\t\t\t 'MSG' => 'no_search_results'\n\t\t\t\t ));\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\n\t\t\t$this->output .= View::make(\n\t\t\t\t\"search.end\",\n\t\t\t\t[\n\t\t\t\t\t'Data' => array(\n\t\t\t\t\t\t'SHOW_PAGES' => $this->links,\n\t\t\t\t\t\t'modform_close' => ($this->modfunctions)\n\t\t\t\t\t\t\t? View::make(\"search.modform_close\")\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t)\n\t\t\t\t]\n\t\t\t);\n\n\t\t} else // ( $this->result_type == 'posts' )\n\t\t{\n\n\t\t\t$this->parser = new PostParser();\n\n\t\t\tif ($this->search_in == 'titles')\n\t\t\t{\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits, 1);\n\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tp.pid,\n\t\t\t\t\t\tp.author_id,\n\t\t\t\t\t\tp.author_name,\n\t\t\t\t\t\tp.post_date,\n\t\t\t\t\t\tp.post,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t\tFROM ibf_topics t\n\t\t\t\t\tLEFT JOIN ibf_posts p\n\t\t\t\t\t\tON (t.tid=p.topic_id\n\t\t\t\t\t\t AND p.new_topic=1\n\t\t\t\t\t\t AND p.use_sig=0)\n\t\t\t\t\tLEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=t.forum_id)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tt.tid IN({$topics})\n\t\t\t\t\t\tAND p.queued != 1\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\tORDER BY p.post_date DESC\n\t\t\t\t\tLIMIT {$this->first},25\");\n\n\t\t\t} else // ( $this->search_in == 'posts' )\n\t\t\t{\n\t\t\t\t$this->parser->prepareIcons();\n\n\t\t\t\tif ($topics)\n\t\t\t\t{\n\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tpid\n\t\t\t\t\tFROM\n\t\t\t\t\t\tibf_posts\n\t\t\t\t\tWHERE\n\t\t\t\t\t\ttopic_id IN({$topics}) AND\n\t\t\t\t\t\tnew_topic=1 AND\n\t\t\t\t\t\tqueued != 1\");\n\n\t\t\t\t\twhile ($pr = $stmt->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!preg_match(\"/,\" . $pr['pid'] . \",/\", $posts))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$posts .= $pr['pid'] . \",\";\n\t\t\t\t\t\t\t$post_max_hits++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$posts = str_replace(\",,\", \",\", $posts);\n\t\t\t\t}\n\n\t\t\t\t$this->output .= $this->start_page($post_max_hits, 1);\n\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tp.pid,\n\t\t\t\t\t\tp.author_id,\n\t\t\t\t\t\tp.author_name,\n\t\t\t\t\t\tp.post_date,\n\t\t\t\t\t\tp.post,\n\t\t\t\t\t\tp.use_emo,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.forum_highlight,\n\t\t\t\t\t\tf.highlight_fid as hid,\n\t\t\t\t\t\tf.name as forum_name,\n\t\t\t\t\t\tf.use_html,\n\t\t\t\t\t\tg.g_dohtml,\n\t\t\t\t\t\tp.ip_address\n\t\t\t\t\tFROM ibf_posts p\n\t\t\t\t\tLEFT JOIN ibf_topics t\n\t\t\t\t\t\tON (t.tid=p.topic_id)\n\t\t\t\t\tLEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=p.forum_id)\n\t\t\t\t\tLEFT JOIN ibf_members m\n\t\t\t\t\t\tON (m.id=p.author_id)\n\t\t\t\t\tLEFT JOIN ibf_groups g\n\t\t\t\t\t\tON (m.mgroup=g.g_id)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.pid IN({$posts}) AND\n\t\t\t\t\t\tp.use_sig=0 AND\n\t\t\t\t\t\tp.queued != 1 AND\n\t\t\t\t\t\tt.approved=1\n\t\t\t\t\tORDER BY p.post_date DESC\n\t\t\t\t\tLIMIT {$this->first},25\");\n\t\t\t}\n\n\t\t\twhile ($row = $stmt->fetch())\n\t\t\t{\n\t\t\t\tif ($ibforums->member['g_is_supmod'])\n\t\t\t\t{\n\t\t\t\t\t$row['ip_address'] = \"( <a href='{$ibforums->base_url}&act=modcp&CODE=ip&incoming={$row['ip_address']}' target='_blank'>{$row['ip_address']}</a> )\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$row['ip_address'] = \"\";\n\t\t\t\t}\n\n\t\t\t\tif ($row['club'] and\n\t\t\t\t $std->check_perms($ibforums->member['club_perms']) == FALSE\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$count++;\n\n\t\t\t\t$data = array(\n\t\t\t\t\t'TEXT' => $row['post'],\n\t\t\t\t\t'SMILIES' => $row['use_emo'],\n\t\t\t\t\t'CODE' => 1,\n\t\t\t\t\t'SIGNATURE' => 0,\n\t\t\t\t\t'HTML' => 1,\n\t\t\t\t\t'HID' => ($row['forum_highlight'])\n\t\t\t\t\t\t? $row['hid']\n\t\t\t\t\t\t: -1,\n\t\t\t\t\t'TID' => $row['topic_id'],\n\t\t\t\t\t'MID' => $row['author_id'],\n\t\t\t\t);\n\n\t\t\t\t$row['post'] = $this->parser->prepare($data);\n\n\t\t\t\tif (!trim($row['post']))\n\t\t\t\t{\n\t\t\t\t\t$count--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$row['keywords'] = $url_words;\n\t\t\t\t$row['post_date'] = $std->get_date($row['post_date']);\n\n\t\t\t\t//--------------------------------------------------------------\n\t\t\t\t// Parse HTML tag on the fly\n\t\t\t\t//--------------------------------------------------------------\n\n\t\t\t\tif ($row['use_html'] == 1)\n\t\t\t\t{\n\t\t\t\t\t// So far, so good..\n\n\t\t\t\t\tif (stristr($row['post'], '[dohtml]'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// [doHTML] tag found..\n\n\t\t\t\t\t\t$parse = ($row['use_html'] AND $row['g_dohtml'])\n\t\t\t\t\t\t\t? 1\n\t\t\t\t\t\t\t: 0;\n\n\t\t\t\t\t\t$row['post'] = $this->parser->post_db_parse($row['post'], $parse);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------------------------\n\t\t\t\t// Do word wrap?\n\t\t\t\t//--------------------------------------------------------------\n\n\t\t\t\tif ($ibforums->vars['post_wordwrap'] > 0)\n\t\t\t\t{\n\t\t\t\t\t$row['post'] = $this->parser->my_wordwrap($row['post'], $ibforums->vars['post_wordwrap']);\n\t\t\t\t}\n\n\t\t\t\t$this->output .= View::make(\"search.RenderPostRow\", ['Data' => $this->parse_entry($row, 1)]);\n\t\t\t}\n\n\t\t\t$this->output .= View::make(\"search.end_as_post\", ['Data' => array('SHOW_PAGES' => $this->links)]);\n\t\t}\n\n\t\tif ($count <= 0)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$this->page_title = $ibforums->lang['search_results'];\n\n\t\tif ($ibforums->input['nav'] == 'lv')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_since_lv']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'my_lv')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['my_nav_since_lv']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'lt')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_lt']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'au')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_au']);\n\t\t} else\n\t\t{\n\t\t\t$this->nav = array(\n\t\t\t\t\"<a href='{$this->base_url}&act=Search'>{$ibforums->lang['search_form']}</a>\",\n\t\t\t\t$ibforums->lang['search_title']\n\t\t\t);\n\t\t}\n\t}", "protected function downloadFiles() {\n\t\t// Metadata.\n\t\t$metadataFile = $this->jobDir() . '/metadata.json';\n\t\tif ( !file_exists( $metadataFile ) ) {\n\t\t\t$this->log->info( \"Saving IA metadata to $metadataFile\" );\n\t\t\t$metadata = $this->iaClient->fileDetails( $this->itemId );\n\t\t\tfile_put_contents( $metadataFile, \\GuzzleHttp\\json_encode( $metadata ) );\n\t\t}\n\t\tif ( !isset( $metadata ) ) {\n\t\t\t$metadata = \\GuzzleHttp\\json_decode( file_get_contents( $metadataFile ), true );\n\t\t}\n\n\t\t// Other files (JP2 and DjVu XML).\n\t\t$filesToDownload = preg_grep( '/.*(_djvu.xml|_jp2.zip)/', array_keys( $metadata['files'] ) );\n\t\tforeach ( $filesToDownload as $file ) {\n\t\t\tif ( !file_exists( $this->jobDir() . $file ) ) {\n\t\t\t\t$this->log->info( \"Downloading $this->itemId$file\" );\n\t\t\t\t$this->iaClient->downloadFile( $this->itemId . $file, $this->jobDir() . $file );\n\t\t\t}\n\t\t}\n\t}", "public function run(): bool\n {\n $this->search->update(['status' => Search::STATUS_RUNNING]);\n\n // we first need to crawl the search's entry point url\n $this->crawl($this->search->url, $entryPoint = true);\n\n // next, we crawl all search's urls\n while ($url = $this->getNextNotCrawledUrl()) {\n $this->crawl($url);\n\n // check if the search has been deleted during the crawl process\n //if ($this->searchMustEnd()) {\n // return false;\n //}\n }\n\n // this search is finished\n $this->search->update(['status' => Search::STATUS_FINISHED]);\n\n return false;\n }", "protected function crawlUrls()\n\t{\n\t\t// only execute if a cURL request is not running\n\t\tif (!$this->running) {\n\t\t\t$this->execute();\n\t\t}\n\t}", "public function fetchResult($url);", "final public function execute() {\n if (!$this->viewer) {\n throw new Exception(\"Call setViewer() before execute()!\");\n }\n\n $results = array();\n\n $filter = new PhabricatorPolicyFilter();\n $filter->setViewer($this->viewer);\n\n if (!$this->capabilities) {\n $capabilities = array(\n PhabricatorPolicyCapability::CAN_VIEW,\n );\n } else {\n $capabilities = $this->capabilities;\n }\n $filter->requireCapabilities($capabilities);\n $filter->raisePolicyExceptions($this->raisePolicyExceptions);\n\n $offset = (int)$this->getOffset();\n $limit = (int)$this->getLimit();\n $count = 0;\n\n if ($limit) {\n $need = $offset + $limit;\n } else {\n $need = 0;\n }\n\n $this->willExecute();\n\n do {\n if ($need) {\n $this->rawResultLimit = min($need - $count, 1024);\n } else {\n $this->rawResultLimit = 0;\n }\n\n $page = $this->loadPage();\n\n $visible = $this->willFilterPage($page);\n $visible = $filter->apply($visible);\n foreach ($visible as $key => $result) {\n ++$count;\n\n // If we have an offset, we just ignore that many results and start\n // storing them only once we've hit the offset. This reduces memory\n // requirements for large offsets, compared to storing them all and\n // slicing them away later.\n if ($count > $offset) {\n $results[$key] = $result;\n }\n\n if ($need && ($count >= $need)) {\n // If we have all the rows we need, break out of the paging query.\n break 2;\n }\n }\n\n if (!$this->rawResultLimit) {\n // If we don't have a load count, we loaded all the results. We do\n // not need to load another page.\n break;\n }\n\n if (count($page) < $this->rawResultLimit) {\n // If we have a load count but the unfiltered results contained fewer\n // objects, we know this was the last page of objects; we do not need\n // to load another page because we can deduce it would be empty.\n break;\n }\n\n $this->nextPage($page);\n } while (true);\n\n $results = $this->didLoadResults($results);\n\n return $results;\n }", "public function crawl(){\n\t\t\t$this->collectUrls();\n\t\t}", "public function downloadAction()\n\t{\n\t\t$settings = $this->getProgressParameters();\n\n\t\tif (!empty($settings['downloadParams']['filePath']) && !empty($settings['downloadParams']['fileName']))\n\t\t{\n\t\t\t$file = new Main\\IO\\File($settings['downloadParams']['filePath']);\n\t\t\tif ($file->isExists())\n\t\t\t{\n\t\t\t\t$response = new Main\\Engine\\Response\\File(\n\t\t\t\t\t$file->getPath(),\n\t\t\t\t\t$settings['downloadParams']['fileName'],\n\t\t\t\t\t$settings['downloadParams']['fileType']\n\t\t\t\t);\n\n\t\t\t\treturn $response;\n\t\t\t}\n\t\t}\n\n\t\t$this->addError(new Error('File not found'));\n\t}", "public function run() {\n\t\t$result = array();\n\t\t\n\t\t// This could take a while to run, so set no time limit\n\t\tset_time_limit(0);\n\t\t\n\t\t// This is used for ob_flush to work\n\t\tif(ob_get_length() === false && $this->showMessages) ob_start();\n\t\t\n\t\t$html = $this->fetchHTML($this->url);\n\n\t\tif(!$html) {\n\t\t\tif($this->showMessages) echo \"$this->url doesn't appear to exist.\\r\\n\";\n\t\t}\n\n\t\t$links = $this->extractLinks($html, $this->url);\n\t\t\n\t\t// HTML stored in memory is no longer required, discard it\n\t\tunset($html);\n\t\n\t\tif($this->showMessages) echo \"Getting HTML from {$this->url}\\r\\n\";\n\n\t\tif(empty($links)) {\n\t\t\tif($this->showMessages) {\n\t\t\t\techo \"$this->url doesn't appear to have any links.\\r\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We only need unique links, so take any duplicates and discard them\n\t\t$links = array_values(array_unique($links));\n\t\t$linkCount = count($links);\n\t\t\n\t\tif($this->showMessages) echo \"Found {$linkCount} links on {$this->url}\\r\\n\";\n\n\t\tif($this->showMessages) {\n\t\t\tflush();\n\t\t\tob_flush();\n\t\t}\n\n\t\t// Each unique link needs to be checked to see what status code is returned\n\t\tfor($i = 0; isset($links[$i]) && !connection_aborted(); ++$i) {\n\t\t\t\t\n\t\t\t// First, we need to check the URL exists, before we can get the status\n\t\t\tif($this->urlExists(html_entity_decode($links[$i]))) {\n\t\t\t\t// Get the headers for the link\n\t\t\t\t$headers = $this->fetchHeaders(html_entity_decode($links[$i]));\n\t\n\t\t\t\t// Get the status code from the headers\n\t\t\t\t$status = $this->extractStatusCode($headers);\n\t\t\t\t\n\t\t\t\t// Build the results (link, code, status)\n\t\t\t\t$result[$i]['Link'] = $links[$i];\n\t\t\t\t$result[$i]['Code'] = $status[0];\n\t\t\t\t$result[$i]['Status'] = $status[1];\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// URL doesn't exist, result is a 404.\n\t\t\t\t$result[$i]['Link'] = $links[$i];\n\t\t\t\t$result[$i]['Code'] = '404';\n\t\t\t\t$result[$i]['Status'] = 'Page not found';\n\t\t\t}\n\n\t\t\tif($this->showMessages) {\n\t\t\t\tflush();\n\t\t\t\tob_flush();\n\t\t\t}\n\t\t}\n\n\t\tif($this->showMessages) {\n\t\t\tob_end_flush();\n\t\t}\n\n\t\treturn $result;\n\t}", "public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}", "public function download() {\n\n $this->loginToWigle();\n $query = $this->downloadQueue->getRandomNotDownloadedRecord();\n if(!$query) {\n return;\n }\n $id_download_request = $query->id_download_request;\n $coords = new Coords($query['lat_start'],$query['lat_end'],$query['lon_start'],$query['lon_end']);\n $results = $this->getDataFromWigle($coords, (int) $query[\"from\"]);\n $results_decoded = json_decode($results,true);\n if($results_decoded[\"success\"] == true) {\n\n // rozparsovat data\n $data = $this->parseData($results_decoded);\n $mac_addresses = array();\n // vybrat vsechny mac adresy a body nastavit jako hrube\n foreach($data as $w) {\n $mac_addresses[] = $w->getMac();\n $w->setCalculated(1);\n }\n\n // ulozit mac adresy k dalsimu zpracovani\n $this->saveAll2WigleAps($query['id'],$mac_addresses);\n // ulozit vypoctene body\n $this->saveAll($data);\n\n // transakcne vlozime\n $this->database->beginTransaction();\n $query->update(array(\n \"downloaded\"=>1,\n \"downloaded_nets_count\"=>count($mac_addresses),\n \"count_downloaded_observations\"=>0,\n ));\n\n if((int)$results_decoded[\"resultCount\"] >= self::WIGLE_MAXIMUM_ROWS) {\n $this->downloadQueue->addRecord($coords, 0, $id_download_request, (int)$results_decoded[\"last\"]);\n $this->database->table('download_request')\n ->where('id',$id_download_request)\n ->update(array('total_count'=>new SqlLiteral('total_count + 1')));\n }\n $this->database->commit();\n }\n else {\n $this->logger->addLog(new Log(Log::TYPE_WARNING,'WIGLE DOWNLOAD','moc pozadavku'));\n }\n }", "public function loadNextPage()\n {\n $nextPage = $this->results->getNextPage();\n $this->search($nextPage);\n }", "public function run() {\n\n $this->render(\"search\");\n }", "public function doRequests();", "public function downloadFile();", "public function crawl()\n\t{\n \t// truncate any non-existant pages\n\t\t$this->resetIndex();\n\n\t\t// create a temporary table for incrementing counts\n\t\t$this->createTempTable();\n\n\t\t// add initial URL to crawl list\n\t\t$this->addRequest($this->startUrl);\n\n\t\t// begin crawling the url\n\t\t$this->crawlUrls();\n\n\t\t// update url counts and remove the temp table\n\t\t$this->finalizeUrlCounts();\n\t}", "public function download() : bool {\t\n\t\t$req = self::init_req( ( (object) self::$URLS )->download );\n\t\tif( is_null( $req ) ){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tcurl_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 download()\n\t{\n\t\tR::selectDatabase('oxid');\n\t\t$files = $this->getFilesByName(Flight::request()->query->file);\n\t\tif (empty($files)) $this->redirect('/');\n\t\t$file = reset($files);\n\t\t$dwnloadDir = substr($file['OXSTOREHASH'], 0, 2);\n\t\t$dwnloadFile = Flight::get('oxid_dir_downloads').$dwnloadDir.'/'.$file['OXSTOREHASH'];\n\t\tif ( ! is_file($dwnloadFile)) $this->redirect('/');\n\t\t//error_log($dwnloadFile);\n\t\theader('Content-type: application/pdf');\n\t\theader('Content-Disposition: inline; filename=\"'.$file['OXFILENAME'].'\"');\n\t\t@readfile($dwnloadFile);\n\t}", "public function handle() {\n try {\n $startTime = date('Y-m-d H:i:s');\n $this->comment(PHP_EOL . \"crawl:fitnesspal started at :\" . $startTime . PHP_EOL);\n\n $client = new \\GuzzleHttp\\Client();\n $jar = new \\GuzzleHttp\\Cookie\\CookieJar();\n $customerData = [];\n if (($this->option('search') !== null) && $this->option('search') != '') {\n $searchKey = (string) $this->option('search');\n } else {\n throw new Exception('Search key not provided, please provide search key as --search=\"<your text>\"');\n }\n\n\n\n $url = \"http://www.myfitnesspal.com/food/search?search=\".urlencode($searchKey);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec($ch);\n curl_close($ch);\n $html = new simple_html_dom();\n $html->load($server_output);\n $endPage = 0;\n foreach ($html->find('div.pagination a') as $key => $page) {\n if ($key == (count($html->find('div.pagination a')) - 2))\n $endPage = $page->plaintext;\n }\n $foodArray = [];\n $finalArray = [];\n if ($endPage > 0) {\n for ($i = 1; $i <= $endPage; $i++) {\n $url1 = \"http://www.myfitnesspal.com/food/search?page=\" . $i . \"&search=\" .urlencode($searchKey);\n $ch1 = curl_init();\n curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch1, CURLOPT_URL, $url1);\n curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);\n $server_output1 = curl_exec($ch1);\n curl_close($ch1);\n $html1 = new simple_html_dom ();\n $html1->load($server_output1);\n\n $foodInfoArray = [];\n foreach ($html1->find('div#new_food_list ul li') as $li) {\n $foodInfoArray['food_type'] = ucwords($searchKey);\n $foodInfoArray['food_name'] = $li->find('div.food_info div.food_description a', 0)->plaintext . \" (\" . $li->find('div.food_info div.food_description a.brand', 0)->plaintext . \")\";\n foreach ($li->find('div.nutritional_info') as $value => $nutriDiv) {\n $headers = [];\n array_push($headers, 'food_name');\n preg_match_all(\"'</label>(.*?)<label>'si\", $nutriDiv->innertext, $r);\n foreach ($r[1] as $row => $val) {\n $foodInfoArray[trim($nutriDiv->find('label', $row)->plaintext, ': ')] = str_replace(str_split(',/t/n '), '', $val);\n array_push($headers, trim($nutriDiv->find('label', $row)->plaintext, ': '));\n }\n $this->insertFoods($foodInfoArray);\n $foodArray[] = $foodInfoArray;\n }\n }\n }\n } elseif ($html->find('div#new_food_list ul li')) {\n $foodInfoArray = [];\n foreach ($html->find('div#new_food_list ul li') as $li) {\n $foodInfoArray['food_type'] = ucwords($searchKey);\n $foodInfoArray['food_name'] = $li->find('div.food_info div.food_description a', 0)->plaintext . \" (\" . $li->find('div.food_info div.food_description a.brand', 0)->plaintext . \")\";\n foreach ($li->find('div.nutritional_info') as $value => $nutriDiv) {\n $headers = [];\n array_push($headers, 'food_name');\n preg_match_all(\"'</label>(.*?)<label>'si\", $nutriDiv->innertext, $r);\n foreach ($r[1] as $row => $val) {\n $foodInfoArray[trim($nutriDiv->find('label', $row)->plaintext, ': ')] = str_replace(str_split(',/t/n '), '', $val);\n array_push($headers, trim($nutriDiv->find('label', $row)->plaintext, ': '));\n }\n $this->insertFoods($foodInfoArray);\n $foodArray[] = $foodInfoArray;\n }\n }\n } else {\n throw new Exception('No Data Found');\n }\n if (!empty($foodArray)) {\n $fileName = public_path('fitnesspal/' . $searchKey . '-food-final.csv');\n $output = fopen($fileName, 'w');\n header(\"Content-Type:application/csv\");\n header(\"Content-Disposition:attachment;filename=pressurecsv.csv\");\n fputcsv($output, $headers);\n foreach ($foodArray as $food) {\n fputcsv($output, $food);\n }\n fclose($output);\n }\n\n $endTime = date('Y-m-d H:i:s');\n $this->comment(PHP_EOL . \"crawl:fitnesspal ended at :\" . $endTime . PHP_EOL);\n Log::info('command crawl:fitnesspal Call.', ['startTime' => $startTime, 'endTime' => $endTime, 'comment' => 'fitnesspal crawled']);\n } catch (Exception $e) {\n $this->comment(PHP_EOL . \"crawl:fitnesspal failed with msg :\" . $e->getMessage() . PHP_EOL);\n Log::info('command crawl:fitnesspal Call.', ['error_code' => $e->getCode(), 'comment' => $e->getMessage()]);\n }\n }", "public function download(){\n\t\t$lang = \"En\";\n\t\tif (isset ( $_SESSION [\"user_settings\"] [\"language\"] )) {\n\t\t\t$lang = $_SESSION [\"user_settings\"] [\"language\"];\n\t\t}\n\t\t\n\t\t// get form posts\n\t\t$localurl = $this->request->getParameter(\"localurl\");\n\t\t$filename = $this->request->getParameter(\"filename\");\n\t\t\n\t\t// get the user login\n\t\t$idUser = $_SESSION[\"id_user\"];\n\t\t$modelUser = new User();\n\t\t$userlogin = $modelUser->userLogin($idUser);\n\t\t\n\t\t// parse the files names\n\t\t$filename = str_replace(\"__--__\", \".\", $filename);\n\t\t$filename = str_replace(\"__---__\", \" \", $filename);\n\t\t$filename = str_replace(\"__----__\", \"/\", $filename);\n\t\t$localurl = str_replace(\"\\\\\", \"/\" , $localurl) . \"/\" . basename($filename);\n\t\t$fileName = \"./\" . $userlogin .\"/\".basename($filename);\n\t\t\n\t\t// refuse to download if the quotas is over\n\t\t$modelQuotas = new StUserQuota();\n\t\t$userQuotas = $modelQuotas->getQuota($idUser); // in GB\n\t\t$modelUploader = new StUploader();\n\t\t$usage = $modelUploader->getUsage($userlogin);\n\t\t$usage = $usage/1000000000; \n\t\t\n\t\tif ($usage >= $userQuotas){\n\t\t\t$this->index( StTranslator::QuotasHoverMessage($lang) . $localurl);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// download\n\t\t$modelFiles = new StUploader();\n\t\t$modelFiles->downloadFile($localurl, $fileName);\n\t\t\n\t\t\n\t\t// view\n\t\t$this->index( StTranslator::DownloadMessage($lang) . $localurl);\n\t\treturn;\n\t}", "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 }", "protected function execute()\n {\n // Clean the utilistion index.\n DUtilisationRecord::cleanDatabase();\n // Determine objects that are searchable.\n $models = DModel::search()\n ->removeDefaultFilters();\n // Track progress of task execution.\n $totalObjects = $models->getCount();\n $currentObject = 0;\n foreach ($models as $model) {\n /* @var $model DModel */\n try {\n $event = new DOnSave();\n $event->setFieldValue('dispatcher', $model);\n DUtilisationRecord::index($event);\n $model->free();\n // Catch and report any exception to allow processing to continue.\n } catch (Exception $exception) {\n DErrorHandler::logException($exception);\n }\n // Update progress of task execution.\n ++$currentObject;\n $this->updateProgress($currentObject, $totalObjects);\n }\n }", "private function executeSearch(): array\n {\n $cover = input_get('cover');\n $older = input_get('older');\n $younger = input_get('younger');\n $ounit = input_get('ounit');\n $yunit = input_get('yunit');\n $covers = getCovers();\n $nonce = $this->create_nonce();\n $json = [\n 'nonce' => $nonce,\n 'admin_url' => url_admin_post(),\n 'referer' => url_menu('bc_covers'),\n 'title' => \\get_admin_page_title(),\n 'images' => url_images(),\n 'mode' => 'search',\n 'folder' => folder_covers(),\n 'baseurl' => url_cover(''),\n 'covers' => $covers,\n 'cover' => $cover,\n 'older' => $older,\n 'ounit' => $ounit,\n 'younger' => $younger,\n 'yunit' => $yunit\n ];\n $oldts = $this->get_timestamp($older, $ounit);\n $youngts = $this->get_timestamp($younger, $yunit);\n $json['found'] = $this->search($cover, $covers, $oldts, $youngts);\n return $json;\n }", "function fetchAndDisplayResults($query) {\n\t\tif (trim($query) == '') {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\t$results = $this->scrape(urlencode($query));\n\t\t$this->showResults($results);\n\t}", "public function results()\n {\n var_dump('Retrieving Campaign Results');\n Result::truncate();\n $client = new \\Google_Client();\n\n $client->setAuthConfig(getenv('GOOGLE_APPLICATION_CREDENTIALS'));\n $client->setScopes([\n 'https://www.googleapis.com/auth/doubleclickbidmanager'\n ]);\n $client->setAccessType('offline');\n $client->setApplicationName(\"Expression_Reporting\");\n \n $service = new \\Google_Service_DoubleClickBidManager($client);\n\n $report = $service->reports->listreports(161889303);\n\n $report = end($report->reports)->metadata->googleCloudStoragePath;\n\n $httpClient = $service->getClient()->authorize();\n $request = new \\GuzzleHttp\\Psr7\\Request('GET', $report);\n $result = $httpClient->send($request);\n\n // // Read CSV and save as the file\n $file = Reader::createFromString($result->getBody());\n // Set the first row as the header offset\n $file->setHeaderOffset(0);\n // Get each line of the CSV as a record\n $records = $file->getRecords();\n // Build each record as an associative array with the header offset as keys\n $results = [];\n foreach ($records as $offset => $record) {\n // Insert the record into the table\n if($record[\"Advertiser\"] == \"\") {\n break;\n } else {\n $results[] = [\n 'dbm_insertion_order_id' => $record[\"Insertion Order ID\"],\n 'date' => Carbon::parse($record[\"Date\"]),\n 'amount_spent' => $record[\"Revenue (Adv Currency)\"],\n 'impressions' => $record[\"Impressions\"],\n 'clicks' => $record[\"Clicks\"]\n ];\n }\n }\n foreach(array_chunk($results, 500) as $result) {\n Result::insert($result);\n }\n return redirect('/cache');\n }", "function downloadDocumentAction()\n\t{\n\t\t$request = $this->_request->getParams();\n\t\t$this->_redirect(\"/BO/download-quote.php?type=\".$request['type'].\"&mission_id=\".$request['mission_id'].\"&index=\".$request['index'].\"&quote_id=\".$request['quote_id'].\"&logid=\".$request['logid'].\"&filename=\".$request['filename']);\n\t}", "abstract protected function setresults();", "public function download()\n {\n $encrypt = $this->services['encrypt'];\n $file_name = $encrypt->decode($this->getPost('id'));\n $type = $this->getPost('type');\n $storage = $this->services['backup']->setStoragePath($this->settings['working_directory']);\n if($type == 'files')\n {\n $file = $storage->getStorage()->getFileBackupNamePath($file_name);\n }\n else\n {\n $file = $storage->getStorage()->getDbBackupNamePath($file_name);\n }\n \n \n $backup_info = $this->services['backups']->setLocations($this->settings['storage_details'])->getBackupData($file);\n $download_file_path = false;\n if( !empty($backup_info['storage_locations']) && is_array($backup_info['storage_locations']) )\n {\n foreach($backup_info['storage_locations'] AS $storage_location)\n {\n if( $storage_location['obj']->canDownload() )\n {\n $download_file_path = $storage_location['obj']->getFilePath($backup_info['file_name'], $backup_info['backup_type']); //next, get file path\n break;\n }\n }\n }\n \n if($download_file_path && file_exists($download_file_path))\n {\n $this->services['files']->fileDownload($download_file_path);\n exit;\n }\n }", "function vcn_findwork_results_get_data_freetext_search($params, $print_jurl=false, $jobpagemax=500) {\r\n\r\n\t$search_term = $params['search_term'];\r\n\t$search_term = str_replace('~', '/', $search_term);\r\n\t$search_term = str_replace('*', '\\\\', $search_term);\r\n\r\n\t$common_keywords = vcn_rest_wrapper('vcnoccupationsvc', 'vcncommonkeywords', 'getcommonkeywords', NULL, 'json', 'post', false);\r\n\r\n\t$find_job_query_string = vcn_prepend_the_word_Title($search_term, $common_keywords);\r\n\tif ($params['zipcode']) {\r\n\t\t$find_job_query_string .= \"&zc1=\".$params['zipcode'].\"&rd1=\".$params['distance'];\r\n\t}\r\n\r\n\treturn vcn_get_data_from_apiusjobs($find_job_query_string, $print_jurl, $jobpagemax);\r\n}", "protected static function display_results() {\n $locale = self::$locale;\n self::$composevars = \"method=\".self::get_param('method').\"&amp;datelimit=\".self::get_param('datelimit').\"&amp;fields=\".self::get_param('fields').\"&amp;sort=\".self::get_param('sort').\"&amp;order=\".self::get_param('order').\"&amp;chars=\".self::get_param('chars').\"&amp;forum_id=\".self::get_param('forum_id').\"&amp;\";\n add_to_title($locale['global_201'].$locale['408']);\n\n $search_text = explode(' ', urldecode(self::$search_text));\n $qualified_search_text = [];\n $disqualified_search_text = [];\n\n /*\n * @todo: roadmap on author\n */\n self::$fields_count = self::get_param('fields') + 1;\n for ($i = 0, $k = 0; $i < count($search_text); $i++) {\n if (strlen($search_text[$i]) >= 3) {\n $qualified_search_text[] = $search_text[$i];\n for ($j = 0; $j < self::$fields_count; $j++) {\n // It is splitting to 2 parts.\n self::$search_param[':sword'.$k.$j] = '%'.$search_text[$i].'%';\n }\n $k++;\n } else {\n $disqualified_search_text[] = $search_text[$i];\n }\n }\n unset($search_text);\n self::$swords = $qualified_search_text;\n\n self::$c_swords = count($qualified_search_text) ?: redirect(FUSION_SELF);\n self::$i_swords = count($disqualified_search_text);\n\n self::$swords_keys_for_query = array_keys(self::$search_param);\n self::$swords_values_for_query = array_values(self::$search_param);\n\n // Highlight using Jquery the words. This, can actually parse as settings.\n $highlighted_text = \"\";\n $i = 1;\n foreach ($qualified_search_text as $value) {\n $highlighted_text .= \"'\".$value.\"'\";\n $highlighted_text .= ($i < self::$c_swords ? \",\" : \"\");\n $i++;\n }\n add_to_footer(\"<script type='text/javascript' src='\".INCLUDES.\"jquery/jquery.highlight.js'></script>\");\n add_to_jquery(\"$('.search_result').highlight([\".$highlighted_text.\"],{wordsOnly:true}); $('.highlight').css({backgroundColor:'#FFFF88'});\");\n\n /*\n * Run the drivers via include.. but this method need to change to simplify the kiss concept.\n */\n if (self::get_param('stype') == \"all\") {\n $search_deffiles = [];\n $search_includefiles = makefilelist(INCLUDES.'search/', '.|..|index.php|location.json.php|users.json.php|.DS_Store', TRUE, 'files');\n $search_infusionfiles = makefilelist(INFUSIONS, '.|..|index.php', TRUE, 'folders');\n if (!empty($search_infusionfiles)) {\n foreach ($search_infusionfiles as $files_to_check) {\n if (is_dir(INFUSIONS.$files_to_check.'/search/')) {\n $search_checkfiles = makefilelist(INFUSIONS.$files_to_check.'/search/', \".|..|index.php\", TRUE, \"files\");\n $search_deffiles = array_merge($search_deffiles, $search_checkfiles);\n }\n }\n }\n $search_files = array_merge($search_includefiles, $search_deffiles);\n\n foreach ($search_files as $key => $file_to_check) {\n if (preg_match(\"/include.php/i\", $file_to_check)) {\n if (file_exists(INCLUDES.\"search/\".$file_to_check)) {\n self::__Load(INCLUDES.\"search/\".$file_to_check);\n }\n\n foreach ($search_infusionfiles as $inf_files_to_check) {\n if (file_exists(INFUSIONS.$inf_files_to_check.'/search/'.$file_to_check)) {\n self::__Load(INFUSIONS.$inf_files_to_check.'/search/'.$file_to_check);\n }\n }\n }\n }\n } else {\n if (file_exists(INCLUDES.\"search/search_\".self::get_param('stype').\"_include.php\")) {\n self::__Load(INCLUDES.\"search/search_\".self::get_param('stype').\"_include.php\");\n }\n\n $search_infusionfiles = makefilelist(INFUSIONS, '.|..|index.php', TRUE, 'folders');\n foreach ($search_infusionfiles as $inf_files_to_check) {\n if (file_exists(INFUSIONS.$inf_files_to_check.'/search/search_'.self::get_param('stype').'_include.php')) {\n self::__Load(INFUSIONS.$inf_files_to_check.'/search/search_'.self::get_param('stype').'_include.php');\n }\n }\n }\n\n // Show how many disqualified search texts\n $c_iwords = count($disqualified_search_text);\n if ($c_iwords) {\n $txt = \"\";\n for ($i = 0; $i < $c_iwords; $i++) {\n $txt .= $disqualified_search_text[$i].($i < $c_iwords - 1 ? \", \" : \"\");\n }\n echo \"<div class='well m-t-10 text-center strong'>\".sprintf($locale['502'], $txt).\"</div><br />\";\n }\n\n /*$c_search_result_array = count(self::$search_result_array);\n\n if (self::get_param('stype') == \"all\") {\n $from = self::get_param('rowstart');\n $to = ($c_search_result_array - (self::get_param('rowstart') + 10)) <= 0 ? $c_search_result_array : self::get_param('rowstart') + 10;\n } else {\n $from = 0;\n $to = $c_search_result_array < 10 ? $c_search_result_array : 10;\n }*/\n\n /*\n * HTML output\n */\n if (self::get_param('stype') == \"all\") {\n parent::search_navigation(0);\n echo strtr(Search::render_search_count(), [\n '{%search_count%}' => self::$items_count,\n '{%result_text%}' => ((self::$site_search_count > 100 || parent::search_globalarray(\"\")) ? \"<br/>\".sprintf($locale['530'], self::$site_search_count) : \"<br/>\".self::$site_search_count.\" \".$locale['510'])\n ]);\n } else {\n echo strtr(Search::render_search_count(), [\n '{%search_count%}' => self::$items_count,\n '{%result_text%}' => ((self::$site_search_count > 100 || parent::search_globalarray(\"\")) ? \"<br/><strong>\".sprintf($locale['530'], self::$site_search_count).\"</strong>\" : (empty(self::$site_search_count) ? $locale['500'] : ''))\n ]);\n }\n\n echo \"<div class='search_result'>\\n\";\n echo \"<div class='block'>\\n\";\n foreach (self::$search_result_array as $results) {\n echo $results;\n }\n\n // Now it is by per module. Therefore rowstart does not apply\n //for ($i = $from; $i < $to; $i++) {\n // echo self::$search_result_array[$i];\n //}\n echo \"</div>\\n\";\n echo \"</div>\\n\";\n\n if (self::get_param('stype') != \"all\") {\n echo self::$navigation_result;\n }\n }", "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Invoices::grid() )->search ();\n\t}", "function doAPISearch($params) {\n global $searchUrl;\n\n $ch = curl_init(); // initialize curl handle\n curl_setopt($ch, CURLOPT_URL,$searchUrl . $params);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable\n curl_setopt($ch, CURLOPT_TIMEOUT, 8); // times out after 4s\n curl_setopt($ch, CURLOPT_POST, 0); // set GET method\n // curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n // Retrieve result\n $result = curl_exec($ch);\n // TODO return error if error\n // $cerror = curl_error($ch);\n\n return $result;\n}", "abstract public function scrape(): Result;", "public function searchSubContent()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set branch to search to a variable.\n $branch = $this->getSearchBranch();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields, $branch);\n }", "public function execute()\n {\n try {\n $currentStore = $this->storeManager->getStore()->getId();\n $currentPage = 1;\n do {\n $vippsQuoteCollection = $this->createCollection($currentPage);\n $this->logger->debug('Fetched payment details');\n /** @var VippsQuote $vippsQuote */\n foreach ($vippsQuoteCollection as $vippsQuote) {\n $this->processQuote($vippsQuote);\n usleep(1000000); //delay for 1 second\n }\n $currentPage++;\n } while ($currentPage <= $vippsQuoteCollection->getLastPageNumber());\n } finally {\n $this->storeManager->setCurrentStore($currentStore);\n }\n }", "public function execute()\n\t{\n\t\t$filterstr = implode(\".\\n\", $this->getFilters());\n\t\t$sparqlQuery = $this->constructQuery( $filterstr );\n\t\t\n\t\t@header('Content-type: text/plain');\n\t\t\n\t\t$engine = new SPARQL_Engine;\n\t\t$engine->useSparql($sparqlQuery);\n\t\t$engine->setResultHandler(new Single_Value_Extractor);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$engine->runQuery();\n\t\t} catch(Single_Value_Extractor $e)\n\t\t{\n\t\t\techo array_shift($e->getFoundValue());\n\t\t\techo \"\\n\".preg_replace('/\\t\\t\\t/', '', $sparqlQuery).\"\\n\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new Exception('There was no result from the given SPARQL');\n\t}", "function ibio_do_search_loop(){\n\n\tglobal $post;\t\n\t$resultsFormat = get_query_var('ib_results_format', 'list');\n\t\n\tif ($resultsFormat == \"grid\"){\n\t\twriteGridResult();\t\t\n\t} else {\n\t\twriteListResult();\n\t}\n\n\twp_link_pages( array( 'before' => '<p class=\"pages\">' . __( 'Pages:', 'genesis' ), 'after' => '</p>' ) );\n\t\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 getResults()\n {\n }", "public function postProcess($results);", "public function downloadtxtAction()\n {\n $googleCategoriesCount = Mage::getModel('googlemerchants/googlecategory')->getCollection()->count();\n if ($googleCategoriesCount != 0) {\n $this->_redirect('adminhtml/googlemerchants/index');\n }\n $this->_initAction();\n $this->renderLayout();\n }", "public function run(){\n\n // Include and instantiate the search model\n require_once MODELS_DIR . '/Search.php';\n $this->search = new Search();\n\n // check if a single product is required\n if (isset($_GET['id']) && !empty($_GET['id'])) {\n\n $this->response = json_encode($this->load($_GET['id']));\n return $this;\n\n }\n\n \t// Check the filters based on get parameters\n if ($this->defineFilters()) {\n\n $this->response = json_encode($this->load());\n\n } else {\n\n // Load all products\n $this->response = json_encode($this->loadAll());\n\n }\n\n \treturn $this;\n\n }", "public function action_doc_quick_download()\n\t{\n\t\t$document_id = $this->request->param('id');\n\t\t$knowledgetree_data = Kohana::$config->load('config')->get('KnowledgeTree');\n\t\t$kt_connection = New KTClient($knowledgetree_data['url']);\n\t\t$kt_connection->initSession($knowledgetree_data['username'], $knowledgetree_data['password']);\n\t\t$kt_connection->downloadDocument($document_id);\n\t}", "public function execute_http()\n {\n }", "public function run()\n {\n $this->webposIndex->getMsWebpos()->clickCMenuButton();\n $this->webposIndex->getMsWebpos()->waitForCMenuLoader();\n $this->webposIndex->getCMenu()->ordersHistory();\n $this->webposIndex->getMsWebpos()->waitOrdersHistoryVisible();\n $this->webposIndex->getOrderHistoryOrderList()->waitLoader();\n\n $this->webposIndex->getOrderHistoryOrderList()->waitOrderListIsVisible();\n $this->webposIndex->getOrderHistoryOrderList()->waitForFirstOrderVisible();\n $this->webposIndex->getOrderHistoryOrderList()->getFirstOrder()->click();\n sleep(1);\n // Open shipment popup\n $this->webposIndex->getOrderHistoryOrderViewHeader()->getMoreInfoButton()->click();\n $this->webposIndex->getOrderHistoryAddOrderNote()->getShipButton()->click();\n $this->webposIndex->getOrderHistoryShipment()->getSubmitButton()->click();\n sleep(1);\n $this->webposIndex->getModal()->waitForOkButtonIsVisible();\n $this->webposIndex->getModal()->getOkButton()->click();\n sleep(1);\n\n return ['status' => 'Processing'];\n }", "public function executeSearch(sfWebRequest $request) {\n \t// look into PHP buffering to facilitate with GATC setting before redirecting to exact match\n \t$this->getResponse()->setSlot('body_class','search');\n \t$this->query = trim($request->getParameter('q'));\n \tif(!in_array($this->query, sfConfig::get('app_search_default_queries'))) {\n \t\t$SA = new SearchAgent($this->query);\n \t\t// if exact match is found redirect to the part's route\n \t\tif($route = $SA->search()) $this->redirect($route);\n \t\telse { // otherwise, see if similar parts exist for the user's query\n \t\t\tif($this->similar_parts = $SA->getSimilarParts()) {\n\t \t\t\t$this->count = $this->similar_parts[0]['count'];\n\t \t\t\t$this->search_routes = $SA->getSearchRoutes();\n\t \t\t\t$this->search_routes_class = $this->getSearchRoutesClass(count($this->search_routes));\n\t \t\t\t$this->num_serps = $this->count <= sfConfig::get('app_search_pagination_max_items') ? 1 : ceil($this->count / sfConfig::get('app_search_pagination_max_items'));\n\t \t\t\t$item_count = count($this->similar_parts);\n\t \t\t\t$rem = $item_count % 2 == 0 ? 2 : 1;\n\t \t\t\t$this->bottom_idx = $item_count - $rem;\n\t \t\t\t$this->getResponse()->setTitle(\"Product Search: '{$this->query}'\");\n\t \t\t\treturn sfView::SUCCESS;\n \t\t\t} else {\n \t\t\t\t// there is nothing in the database like the user's query\n \t\t\t\t$this->getResponse()->setTitle(\"Product Search: '{$this->query}'\");\n \t\t\t\treturn sfView::ALERT;\n \t\t\t}\n \t\t}\n \t} else {\n \t\t// user didn't enter anything into search box\n \t\t$this->getResponse()->setTitle('Product Search: Missing Query Parameter');\n \t\treturn sfView::ALERT;\n \t}\n }", "public function perform()\n {\n $display_albums = array(\n 'olden_japan',\n 'modern_japan',\n 'natural_japan',\n );\n\n $sample_photos = $this->selectPhotosRandomlyFromAlbums($display_albums);\n if(!empty($sample_photos)) {\n $this->assignSamplePhotosInRows($sample_photos);\n $this->smarty->assign('show_samples_button', true);\n }\n\n $this->smarty->display('async/Top.tpl');\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 downloadAction(){\n //These are the files that are downloadable.\n $pathToDocs = RAIZ. \"/docs\";\n $param_to_file = array( \"milestone1\" => $pathToDocs . \"/milestone 1/group13-milestone1.pdf\",\n \"milestone2\" => $pathToDocs . \"/milestone 2/group13-milestone2.pdf\",\n \"milestone2-revision1\" => $pathToDocs . \"/milestone 2/group13-milestone2-comments.pdf\",\n \"milestone2-presentation\" => $pathToDocs . \"/milestone 2/group13-milestone2-presentation.pptx\");\n $file = $param_to_file[$this->_getParam('file')];\n //If we are being ask for a file that is not in the previous array, throw an Exception.\n if(is_null($file)){\n throw new Exception(\"Unknown file\");\n }\n //Disable view and layout\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n //The file is in the previous array. So, fetch it and force the download.\n if (file_exists($file) && is_file($file)) {\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename='.basename($file));\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Pragma: public');\n header('Content-Length: ' . filesize($file));\n ob_clean();\n flush();\n readfile($file);\n exit;\n }else{\n echo \"<pre style='color:red'>The file does not exists</pre>\";\n } \n }", "private function process_results($all=false) {\n global $USER;\n\n $term = mb_convert_case($this->term, MB_CASE_LOWER, 'UTF-8');\n\n //experimental - return more results\n $strip_arr = array('author:', 'title:', '+', '-', 'doctype:');\n $stripped_term = str_replace($strip_arr, '', $term);\n\n $hits = $this->index->find($term.\" title:\".$stripped_term.\" author:\".$stripped_term);\n //--\n\n $hitcount = count($hits);\n $this->total_results = $hitcount;\n\n if ($hitcount == 0) return array();\n\n $totalpages = ceil($hitcount/$this->results_per_page);\n\n if (!$all) {\n if ($hitcount < $this->results_per_page) {\n $this->pagenumber = 1;\n } else if ($this->pagenumber > $totalpages) {\n $this->pagenumber = $totalpages;\n }\n\n $start = ($this->pagenumber - 1) * $this->results_per_page;\n $end = $start + $this->results_per_page;\n\n if ($end > $hitcount) {\n $end = $hitcount;\n } \n } else {\n $start = 0;\n $end = $hitcount;\n }\n\n $resultdoc = new SearchResult();\n $resultdocs = array();\n\n for ($i = $start; $i < $end; $i++) {\n $hit = $hits[$i];\n\n //check permissions on each result\n if ($this->can_display($USER, $hit->docid, $hit->doctype, $hit->course_id, $hit->group_id, $hit->path, $hit->itemtype, $hit->context_id )) {\n $resultdoc->number = $i;\n $resultdoc->url = $hit->url;\n $resultdoc->title = $hit->title;\n $resultdoc->score = $hit->score;\n $resultdoc->doctype = $hit->doctype;\n $resultdoc->author = $hit->author;\n\n //and store it\n $resultdocs[] = clone($resultdoc);\n } else {\n // lowers total_results one unit\n $this->total_results--;\n }\n }\n\n return $resultdocs;\n }", "public function run()\n {\n //\n $param=[\n 'message'=>'google',\n 'url'=>'google',\n ];\n $restdata=new Restdata;\n $restdata->fill($param)->save();\n $param=[\n 'message'=>'yahoo',\n 'url'=>'yahoo',\n ];\n $restdata=new Restdata;\n $restdata->fill($param)->save();\n $param=[\n 'message'=>'MSN',\n 'url'=>'msn',\n ];\n $restdata=new Restdata;\n $restdata->fill($param)->save();\n }" ]
[ "0.6361257", "0.6280426", "0.627831", "0.6207635", "0.6186784", "0.602742", "0.60233086", "0.601891", "0.599039", "0.59218997", "0.5919306", "0.58619577", "0.5861706", "0.5852299", "0.58316004", "0.58262587", "0.57889855", "0.5755651", "0.574532", "0.57204276", "0.5719128", "0.5706193", "0.57017535", "0.5699929", "0.56989163", "0.5678359", "0.5660272", "0.56534255", "0.5645911", "0.56354725", "0.5628226", "0.56160456", "0.5597625", "0.55918133", "0.5591303", "0.55844957", "0.55574214", "0.55543375", "0.55471134", "0.5541814", "0.55391175", "0.553634", "0.55358297", "0.55346245", "0.5522687", "0.5512981", "0.5504946", "0.5483717", "0.54830855", "0.548119", "0.54793984", "0.54713696", "0.54706746", "0.5467431", "0.54618204", "0.5454369", "0.54482836", "0.5447563", "0.54386085", "0.5423162", "0.5418012", "0.5414522", "0.54130447", "0.5398196", "0.5393838", "0.53891796", "0.5376904", "0.5364128", "0.5356373", "0.5355535", "0.5341757", "0.5341047", "0.53257895", "0.5324153", "0.531759", "0.53155804", "0.53140956", "0.53054965", "0.52983403", "0.5288872", "0.52743155", "0.5267702", "0.5266983", "0.5264598", "0.5264558", "0.52621084", "0.5240864", "0.5235381", "0.5234881", "0.52339375", "0.52276796", "0.5225798", "0.5222116", "0.5221919", "0.5214555", "0.520891", "0.5201592", "0.51983154", "0.51973087", "0.51965886" ]
0.55160344
45
validates the user input. If any errors are detected a message is thrown back to the user.
function validate(){ $errors = array(); // throw message indicating that this field is numeric if( $this->post->isNumeric('noOfTransactions')==false){ $errors[] = $this->Raxan->locale("request.missing.transcount"); } // throw message indicating that this field is date if( $this->post->isDate("startDate","Y-m-d" )==false){ $errors[] = $this->Raxan->locale("request.missing.startdate"); } // throw message indicating that this field is date if( $this->post->isDate( "endDate","Y-m-d" )==false ){ $errors[] = $this->Raxan->locale("request.missing.enddate"); } if(!empty ($errors)) { $this->postMessage($errors, "Request History"); } return (count($errors) == 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateInput()\r\n\t{\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->name) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in name $this->name. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->desg) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in designation $this->desg. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(empty($this->addr))\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in address entered. Please fill correct address field as per gender: Office address for Male user, and Residential address for Female user.<br>\";\t\r\n\t\t}\r\n\r\n\t\tforeach($this->emails as $ele)\r\n\t\t{\r\n\t\t\tif(!filter_var($ele, FILTER_VALIDATE_EMAIL))\r\n\t\t\t{\r\n\t\t\t\t$this->err = true;\r\n\t\t\t\t$this->errMsgBeg .= \"-> Invalid email-id $ele. Enter correctly.<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "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}", "function validateInput() {\n $validationSuccessful = true;\n $errorMessage = \"\";\n\n\n //Validate title\n if (!preg_match(\"/^.{1,250}$/\", $_POST['title'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Title is invalid.\". $_POST['title'];\n }\n\n //Validate date\n if (!preg_match(\"/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})$/\", $_POST['date'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Date is invalid.\" . $_POST['date'];\n }\n\n //Validate location\n if (!preg_match(\"/^.{1,250}$/\", $_POST['location'])) {\n $validationSuccessful = false;\n $errorMessage .= \"Max_players is invalid.\" . $_POST['location'];\n }\n\n if($validationSuccessful == true) {\n return true;\n } else {\n echo $errorMessage;\n return false;\n }\n }", "function invalid_input($error_msg='') {\n if (empty($error_msg)) {\n die('An unexpected error occurred. Go back and try again.');\n } else {\n die($error_msg);\n }\n}", "public function validate()\n {\n // Name\n if($this->name == ''){\n $this->errors[] = \"Name is required\";\n }\n // email address\n if(filter_var($this->email, FILTER_VALIDATE_EMAIL) === false){\n $this->errors[] = \"Invalid email\";\n }\n $this->emailExists($this->email);\n // Password\n if($this->password != $this->confpassword){\n $this->errors[] = \"Password must match confirmation\";\n }\n if(strlen($this->password) < 6){\n $this->errors[] = \"Please enter at least 6 charactes for the password\";\n }\n if(preg_match('/.*[a-z]+.*/i', $this->password) == 0){\n $this->errors[] = \"Password needs at least one letter\";\n }\n if(preg_match('/.*\\d+.*/i', $this->password) == 0){\n $this->errors[] = \"Password needs at least one number\";\n }\n }", "public function getInputErrors();", "public static function userBadChoice()\n {\n say('Invalid entry, please try again');\n }", "protected function checkInput() {\n\t\t\t$errorMessages = array();\n\t\t\tforeach($this->requestVarsToCheck as $requestKey => $checkType) {\n\t\t\t\tswitch($checkType) {\n\t\t\t\t\tcase REQUEST_CHECK_TYPE_EXISTS:\n\t\t\t\t\t\tif(!requestExists($requestKey)) {\n\t\t\t\t\t\t\t$errorMessages[$requestKey] = \"You must enter something for this field.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase REQUEST_CHECK_TYPE_IS_NUMERIC:\n\t\t\t\t\t\tif(!requestExists($requestKey) || !is_numeric(getRequestValue($requestKey))) {\n\t\t\t\t\t\t\t$errorMessages[$requestKey] = \"This must be a number\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase REQUEST_CHECK_TYPE_MIN_6_CHARACTERS:\n\t\t\t\t\t\tif(!requestExists($requestKey) || strlen(getRequestValue($requestkey)) < 6) {\n\t\t\t\t\t\t\t$errorMessages[$requestkey] = \"This must be at least 6 characters long\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->errorMessages = $errorMessages;\n\t\t}", "function validateUserInput($totWords,$totNumbers,$totSpChars,$useSeparator,$wordCase ) {\n if(trim($totWords == '')) {\n \t return \"ERROR: Please provide the total number of words to be used for the password.\";\n \t} else if(!ctype_digit($totWords)) {\n \t\treturn \"ERROR: Total number of words must be in numeric.\";\n \t} else if((int)$totWords < 2 || (int)$totWords > 6) {\n \t\treturn \"ERROR: Total number of words must be between 2 to 6.\";\n } else if(trim($totNumbers == '')) {\n \t return \"ERROR: Please provide the total number to be used.\";\n \t} else if(!ctype_digit($totNumbers)) {\n \t\treturn \"ERROR: Total numbers to be used must be in numeric and between 0 to 4.\";\n \t} else if((int)$totNumbers < 0 || (int)$totNumbers > 4) {\n \t\treturn \"ERROR: Total numbers to be used must be between 0 to 4.\";\n } else if(trim($totSpChars == '')) {\n \t return \"ERROR: Please provide the total special characters to be used.\";\n \t} else if(!ctype_digit($totSpChars)) {\n \t\treturn \"ERROR: Total special characters to be used must be in numeric and between 0 to 4.\";\n \t} else if((int)$totSpChars < 0 || (int)$totSpChars > 4) {\n \t\treturn \"ERROR: Total special characters to be used must be between 0 to 4.\";\n } else if(($useSeparator != \"!\") &&\n ($useSeparator != \"@\") &&\n ($useSeparator != \"#\") &&\n ($useSeparator != \"$\") &&\n ($useSeparator != \"%\") &&\n ($useSeparator != \"^\") &&\n ($useSeparator != \"&\") &&\n ($useSeparator != \"*\") &&\n ($useSeparator != \"-\") &&\n ($useSeparator != \"space\") &&\n ($useSeparator != \"none\")) {\n \treturn \"ERROR: Separator character must be from: -,!, @, #, $, %, ^, & or *.\";\n } else if((strtolower($wordCase) <> \"camel\") &&\n (strtolower($wordCase) != \"upper\") &&\n (strtolower($wordCase) != \"lower\")) {\n \t\treturn \"ERROR: Word case must be Upper, Lower or Camel.\";\n } else {\n return \"\";\n }\n }", "public function validate() {\r\n // Name - this is required\r\n if ($this->description == '') {\r\n $this->errors[] = 'Description is required';\r\n } \r\n \r\n // Category number - must be a number\r\n if (!is_numeric($this->category)) {\r\n $this->category = 0;\r\n } \r\n \r\n // Item number - must be a number\r\n if (!is_numeric($this->item)) {\r\n $this->item = 0;\r\n } \r\n }", "private function validate()\n {\n //Check username already exists\n if (!$this->username) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_USERNAME_EMPTY\"), \"error\", \"username\");\n } elseif ($this->getBy(\"username\", $this->username, $this->id)) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_USERNAME_TAKEN\"), \"error\", \"username\");\n }\n //Check email\n if (!$this->email) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_EMAIL_EMPTY\"), \"error\", \"email\");\n } elseif ($this->getBy(\"email\", $this->email, $this->id)) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_EMAIL_TAKEN\"), \"error\", \"email\");\n }\n //Password?\n if ($this->password && strlen($this->password)<6) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_PASSWORD_SHORT\"), \"error\", \"password\");\n }\n //Return messages avoiding deletion\n return Registry::getMessages(true);\n }", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"noEmpleado\"])) {\n $this->numEmpErr = \"El numero de empleado es requerido\";\n } else {\n $this->noEmpleado = $this->test_input($_POST[\"noEmpleado\"]);\n if (is_numeric($this->noEmpleado)) {\n $this->numEmpErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombre\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombre\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carrera\"])) {\n $this->carreraErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carrera\"]);\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"telefono\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefono\"]);\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\n }", "public function checkInput() {\r\n\t\t\r\n//\t\tif (mb_strlen($this->mValue) < $this->aConfig['minlength']) {\r\n//\t\t\t$this->sErrorLabel = '$locale/sbSystem/formerrors/string_too_short';\r\n//\t\t}\r\n//\t\tif (mb_strlen($this->mValue) > $this->aConfig['maxlength']) {\r\n//\t\t\t$this->sErrorLabel = '$locale/sbSystem/formerrors/string_too_long';\r\n//\t\t}\r\n//\t\tif (mb_strlen($this->mValue) == 0 && $this->aConfig['required'] == 'TRUE') {\r\n//\t\t\t$this->sErrorLabel = '$locale/sbSystem/formerrors/not_null';\r\n//\t\t}\r\n//\t\t\r\n//\t\t$this->additionalChecks();\r\n\t\t\r\n\t\tif ($this->sErrorLabel == '') {\r\n\t\t\treturn (TRUE);\r\n\t\t} else {\r\n\t\t\treturn (FALSE);\r\n\t\t}\r\n\t\t\r\n\t}", "public function validate()\n {\n if ($this->ingredient() || $this->upc()) {\n return;\n }\n\n throw new \\Exception('You must enter either an ingredient or UPC code to search for');\n }", "public function validate($input);", "private function validate_input() {\n\t\t$fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields );\n\n\t\t$this->validate_fields( $fields );\n\t\t$this->validate_fields_against_table( $fields );\n\t}", "function validate() {\n global $age;\n global $creatinineClearance;\n global $height;\n global $weight;\n global $plasmaCreatinine;\n\n $message = \"\";\n\n if ($age > 70) {\n $message = \"The patient is too old to receive gentamicin treatment.\";\n } else if ($age < 17) {\n $message = \"The patient is too young to receive gentamicin treatment.\";\n } else if ($creatinineClearance < 20) {\n $message = \"The creatine clearance needs to be above 20.\";\n } else if ($height < 100) {\n $message = \"The patient is too short to receive gentamicin treatment.\";\n } else if ($height > 250) {\n $message = \"The patient is too tall to receive gentamicin treatment.\";\n } else if (is_null($age)\n || is_null($height)\n || is_null($weight)\n || is_null($plasmaCreatinine)) {\n $message = \"There is not enough data to calculate the dosage.\";\n }\n\n if ($message !== \"\") {\n $type = \"danger\";\n require \"message.php\";\n }\n\n return true;\n}", "public function validateInput($inputData)\n {\n if (!v::string()->notEmpty()->validate($inputData)) {\n $this->errors = 'Please give some inputs';\n }\n \n if (!v::json()->validate($inputData)) {\n $this->errors = 'Not a valid JSON';\n }\n\n if (v::string()->notEmpty()->validate($inputData) && v::json()->validate($inputData)) {\n if (!v::key('char')->validate(json_decode($inputData, true))) {\n $this->errors[] = 'Required Key char is not present in the input';\n }\n }\n }", "public function validate()\n {\n $validatedInputs = array(\n 'emailExists' => 'Please enter an email',\n 'emailValid' => 'Please enter a valid email',\n 'emailLength' => 'Email cannot be longer than 65 characters',\n 'usernameExists' => 'Please enter a username',\n 'usernameLength' => 'Username cannot be longer than 25 characters',\n 'passwordExists' => 'Please enter a password',\n 'allValid' => false\n );\n\n // check if there is an email input\n if (!empty($this->email)) {\n $validatedInputs['emailExists'] = '';\n }\n\n // check if email input is a vaild email adress\n if (filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $validatedInputs['emailValid'] = '';\n }\n\n // check if email input is 65 characters or less\n if (strlen($this->email) <= 65) {\n $validatedInputs['emailLength'] = '';\n }\n\n // check if the is a username input\n if (!empty($this->username)) {\n $validatedInputs['usernameExists'] = '';\n }\n\n // check if username input is 20 characters or less\n if (strlen($this->username) <= 20) {\n $validatedInputs['usernameLength'] = '';\n }\n\n // check if there is a password input\n if (!empty($this->hashedPassword)) {\n $validatedInputs['passwordExists'] = '';\n }\n\n // check if all is valid\n foreach ($validatedInputs as $key => $value) {\n if ($key == 'allValid') {\n $validatedInputs['allValid'] = true;\n $this->validated = true;\n } elseif (strlen($value) > 0) {\n break;\n }\n }\n\n return $validatedInputs;\n }", "function validateUserInputs($FeedbackSessionToUse){\n\t$invalidInput = FALSE;\n\t\n\t// Get user inputs\n\t\t//Firstname\n\tif(isSet($_POST['firstname'])){\n\t\t$firstname = $_POST['firstname'];\n\t\t$firstname = trim($firstname);\n\t} elseif(!$invalidInput) {\n\t\t$_SESSION[$FeedbackSessionToUse] = \"An account cannot be created without submitting a first name.\";\n\t\t$invalidInput = TRUE;\n\t}\t\n\t\t//Lastname\n\tif(isSet($_POST['lastname'])){\n\t\t$lastname = $_POST['lastname'];\n\t\t$lastname = trim($lastname);\n\t} elseif(!$invalidInput) {\n\t\t$_SESSION[$FeedbackSessionToUse] = \"An account cannot be created without submitting a last name.\";\n\t\t$invalidInput = TRUE;\n\t}\t\t\n\t\t//Email\n\tif(isSet($_POST['email'])){\n\t\t$email = $_POST['email'];\n\t\t$email = trim($email);\n\t} elseif(!$invalidInput) {\n\t\t$_SESSION[$FeedbackSessionToUse] = \"An account cannot be created without submitting an email.\";\n\t\t$invalidInput = TRUE;\n\t}\n\n\t\t// Display Name (edit only)\n\tif(isSet($_POST['displayname'])){\n\t\t$displayNameString = $_POST['displayname'];\n\t} else {\n\t\t$displayNameString = '';\n\t}\n\t\t// Booking Description (edit only)\n\tif(isSet($_POST['bookingdescription'])){\n\t\t$bookingDescriptionString = $_POST['bookingdescription'];\n\t} else {\n\t\t$bookingDescriptionString = '';\n\t}\t\n\t\n\t// Remove excess whitespace and prepare strings for validation\n\t$validatedFirstname = trimExcessWhitespace($firstname);\n\t$validatedLastname = trimExcessWhitespace($lastname);\n\t$validatedDisplayName = trimExcessWhitespaceButLeaveLinefeed($displayNameString);\n\t$validatedBookingDescription = trimExcessWhitespaceButLeaveLinefeed($bookingDescriptionString);\n\t\n\t// Do actual input validation\n\t\t// First Name\n\tif(validateNames($validatedFirstname) === FALSE AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"The first name submitted contains illegal characters.\";\n\t\t$invalidInput = TRUE;\t\t\n\t}\n\tif(strlen($validatedFirstname) < 1 AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"You need to submit a first name.\";\n\t\t$invalidInput = TRUE;\t\n\t}\t\n\t\t// Last Name\n\tif(validateNames($validatedLastname) === FALSE AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"The last name submitted contains illegal characters.\";\n\t\t$invalidInput = TRUE;\t\t\t\n\t}\n\tif(strlen($validatedLastname) < 1 AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"You need to submit a last name.\";\n\t\t$invalidInput = TRUE;\t\n\t}\t\n\t\t// Email\n\tif(strlen($email) < 1 AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"You need to submit an email.\";\n\t\t$invalidInput = TRUE;\n\t}\t\n\tif(!validateUserEmail($email) AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"The email submitted is not a valid email.\";\n\t\t$invalidInput = TRUE;\n\t}\t\n\tif(strlen($email) < 3 AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"You need to submit an actual email.\";\n\t\t$invalidInput = TRUE;\n\t}\n\t\n\t\t// Display Name\n\tif(validateString($validatedDisplayName) === FALSE AND !$invalidInput){\n\t\t$invalidInput = TRUE;\n\t\t$_SESSION[$FeedbackSessionToUse] = \"Your submitted display name has illegal characters in it.\";\n\t}\n\t$invalidDisplayName = isLengthInvalidDisplayName($validatedDisplayName);\n\tif($invalidDisplayName AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"The displayName submitted is too long.\";\t\n\t\t$invalidInput = TRUE;\t\t\n\t}\t\t\n\t\t// Booking Description\n\tif(validateString($validatedBookingDescription) === FALSE AND !$invalidInput){\n\t\t$invalidInput = TRUE;\n\t\t$_SESSION[$FeedbackSessionToUse] = \"Your submitted booking description has illegal characters in it.\";\n\t}\t\n\t$invalidBookingDescription = isLengthInvalidBookingDescription($validatedBookingDescription);\n\tif($invalidBookingDescription AND !$invalidInput){\n\t\t$_SESSION[$FeedbackSessionToUse] = \"The booking description submitted is too long.\";\t\n\t\t$invalidInput = TRUE;\t\t\n\t}\n\t\n\t// Check if the submitted email has already been used\n\tif(isSet($_SESSION['EditNormalUserOriginaEmail'])){\n\t\t$originalEmail = $_SESSION['EditNormalUserOriginaEmail'];\n\t\t// no need to check if our own email exists in the database\n\t\tif($email != $originalEmail){\n\t\t\tif (databaseContainsEmail($email)){\n\t\t\t\t// The email has been used before. So we can't create a new user with this info.\n\t\t\t\t$_SESSION[$FeedbackSessionToUse] = \"The new email you've set is already connected to an account.\";\n\t\t\t\t$invalidInput = TRUE;\t\n\t\t\t}\t\t\t\t\n\t\t}\n\t} else {\n\t\tif (databaseContainsEmail($email)){\n\t\t\t// The email has been used before. So we can't create a new user with this info.\n\t\t\t$_SESSION[$FeedbackSessionToUse] = \"The submitted email is already connected to an account.\";\n\t\t\t$invalidInput = TRUE;\t\n\t\t}\t\t\t\n\t}\nreturn array($invalidInput, $email, $validatedFirstname, $validatedLastname, $validatedBookingDescription, $validatedDisplayName);\t\n}", "private function validate_input()\n \t{\n \t\t$this->errors_found = FALSE;\t\t\t\t\n\n\t\t// validate the get request\n\t\t//is their an IVR code?\n\t\tif(! isset($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing ivrcode';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for ivrcode - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['ivrcode'] = $_GET['ivrcode'];\n\t\t}\n\n\t\t//is there a phone number\n\t\tif(! isset($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing phonenumber';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for phonenumber - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['phonenumber'] = $_GET['phonenumber'];\n\t\t}\n\t\t\n\t\t//is there a well working?\n\t\tif(!isset($_GET['wellwork'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing wellwork';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else\n\t\t{\n\t\t\t$_GET['wellwork'] = strtolower($_GET['wellwork']);\n\t\t\t\n\t\t\tif($_GET['wellwork'] != 'yes' && $_GET['wellwork'] != 'no')\n\t\t\t{\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for wellwork - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_answers['wellwork'] = $_GET['wellwork'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t//is there a does the mechanic know?\n\t\tif(isset($_GET['mechanicknow']))\n\t\t{\n\t\t\t$_GET['mechanicknow'] = strtolower($_GET['mechanicknow']);\n\t\t\tif($_GET['mechanicknow'] != 'yes' && $_GET['mechanicknow'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicknow - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicknow'] = $_GET['mechanicknow'];\n\t\t\t}\n\t\t}\n\n\t\t\t\n\t\t//is there a can the mechanic fix\n\t\tif(isset($_GET['mechanicfix']))\n\t\t{\n\t\t\t$_GET['mechanicfix'] = strtolower($_GET['mechanicfix']);\n\t\t\tif($_GET['mechanicfix'] != 'yes' && $_GET['mechanicfix'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicfix - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicfix'] = $_GET['mechanicfix'];\n\t\t\t}\n\t\t}\n\t\t//is there a file name\n\t\tif(isset($_GET['filename'])){\n\t\t\t$get = new Validation($_GET);\n\t\t\t$get->add_rules('filename','standard_text');\n\t\t\tif(! $get->validate()){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for filename - should be standard text';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['filename'] = $_GET['filename'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//is there a response format \n\t\tif(isset($_GET['resp'])){\n\t\t\tif($_GET['resp'] != 'json' && $_GET['resp'] != 'xml'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for resp - should be json or xml';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->resp = $_GET['resp'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->resp = 'json';\n\t\t}\n\n\t\t//if there are errors, let them know.\n\t\tif($this->errors_found){\n\t\t\t$this->send_response($this->response, $this->resp);\n\t\t\treturn;\n\t\t}\t\t\n \t}", "public function validate_user_input_outcome()\n {\n $passed_validation_tests = true;\n $msg = \"Fix the following error(s): \";\n $msg .=\"<ul style='text-align:left;margin-left:33%'>\";\n \n $check_ap = has_presence($this->ap);\n $check_ap_numeric = has_number($this->ap);\n if (!$check_ap or !$check_ap_numeric) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"AP: \";\n $msg .= h($this->ap);\n $msg .= \" cannot be blank and must be a number.\";\n $msg .= \"</li>\";\n }\n // $check_apy_regex = Form::has_format_matching($apy, '/\\A\\d\\Z/');\n $check_provider_id = has_presence($this->provider_id);\n $allowed_provider_ids = Provider::find_array_of_providers_ids();\n $check_provider_id_inclusion = has_inclusion_in($this->provider_id, $allowed_provider_ids);\n if (!$check_provider_id or !$check_provider_id_inclusion) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Provider: \";\n $msg .= h($this->provider_id);\n $msg .= \" cannot be blank and must be a valid choice: \";\n $msg .= \"</li>\";\n }\n $check_shift_id = has_presence($this->shift_id);\n $check_shift_id_inclusion = has_inclusion_in($this->shift_id, [1, 2]);\n if (!$check_shift_id or !$check_shift_id_inclusion) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Shift: \";\n $msg .= h($this->shift_id);\n $msg .= \" cannot be blank and must be a valid choice.\";\n $msg .= \"</li>\";\n }\n $check_outcome_id = has_presence($this->outcome_id);\n $allowed_outcome_ids = Outcome::find_array_of_outcome_ids();\n $check_outcome_id_inclusion = has_inclusion_in($this->outcome_id, $allowed_outcome_ids);\n if (!$check_outcome_id or !$check_outcome_id_inclusion) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Outcome: \";\n $msg .= h($this->outcome_id);\n $msg .= \" cannot be blank and must be a valid choice.\";\n $msg .= \"</li>\";\n }\n $check_price_paied = has_presence($this->price_paied);\n $check_price_paied_numeric = has_number($this->price_paied);\n if ($check_price_paied and !$check_price_paied_numeric) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Price paied: \";\n $msg .= h($this->price_paied);\n $msg .= \" by provider must be a number.\";\n $msg .= \"</li>\";\n } elseif (!$check_price_paied) {\n $price_paied = 0;\n }\n $check_reason_outcome_id = has_presence($this->reason_outcome_id);\n $check_reason_outcome_id_inclusion = has_inclusion_in($this->reason_outcome_id, [1, 2]);\n if (!$check_reason_outcome_id or !$check_reason_outcome_id_inclusion) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Reason for outcome: \";\n $msg .= h($this->reason_outcome_id);\n $msg .= \" cannot be blank and must be a valid choice.\";\n $msg .= \"</li>\";\n }\n $msg .= \"</ul>\";\n\n if ($passed_validation_tests) {\n return \"\";\n } else {\n return $msg;\n }\n }", "public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}", "protected function validate()\n {\n if ($this->name == '') {\n $this->errors[] = 'Name is required';\n }\n\n if ($this->name == '') {\n $this->errors[] = 'Name is required';\n }\n if ($this->sex == '') {\n $this->errors[] = 'Sex selection is required';\n }\n\n if ($this->description == '') {\n $this->errors[] = 'Description is required';\n }\n\n if ($this->surrender_date == '') {\n $this->errors[] = 'Surrender Date is required';\n }\n\n if ($this->surrender_reason == '') {\n $this->errors[] = 'Surrender Reason is required';\n }\n\n return empty($this->errors);\n }", "private function proccess()\n {\n foreach ($this->validate as $name => $value) {\n $rules = $this->rules[$name];\n \n /* Let's see is this value a required, e.g not empty */\n if (preg_match('~req~', $rules)) {\n if ($this->isEmpty($value)) {\n $this->errors[] = $this->filterName($name) . ' can\\'t be empty, please enter required data.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be integer\n */\n if (preg_match('~int~', $rules)) {\n if (!$this->isInt($value)) {\n $this->errors[] = $this->filterName($name) . ' is not number, please enter number.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be text\n */\n if (preg_match('~text~', $rules)) {\n if (!$this->isText($value)) {\n $this->errors[] = $this->filterName($name) . ' is not text, please enter only letters.';\n continue; // We will display only one error per input\n }\n }\n \n /* This is good input */\n $this->data[$name] = $value;\n }\n }", "function form_check() {\n\tglobal $admin_users_table;\n\t\n\t// required fields array\n\t$required_fields = array(\n\t\t\t\t\t\t\t'Username'=> $admin_users_table->username,\n\t\t\t\t\t\t\t'Password'=> $admin_users_table->password\n\t\t\t\t\t\t\t);\n\t\t\n\t// check error values and write error array\t\t\t\t\t\n\tforeach($required_fields as $field_name => $output) {\n\n\t\tif (empty($output)) {\n\t\t $errors_array[] = $field_name;\n\t\t}\n\t\n\t}\n\t\n\tif (!empty($errors_array)) {\n\t $error_message = 'You did not supply a value for these fields: ' . implode(', ',$errors_array);\n\t}\n\t\n\tif ($admin_users_table->username_check() > 0) {\n\t $error_message .= '<br>Username has already been assigned to another user. Please choose another.';\n\t}\n\t\n return $error_message;\n }", "protected function validate()\n {\n if ( ! $this->check()) {\n throw new Exception(\"Message is incomplete\");\n }\n }", "private function check_input_validity($form_input)\n {\n // Set up defaults\n $check_input_validity = true;\n $check_input_warning = '';\n\n // Check for empty fields\n if(empty($form_input['form_name']))\n {\n $check_input_validity = false;\n $check_input_warning = 'Please fill out your name.';\n }\n elseif(empty($form_input['form_email']))\n {\n $check_input_validity = false;\n $check_input_warning = 'Please fill out your email.';\n }\n elseif(!filter_var($form_input['form_email'], FILTER_VALIDATE_EMAIL))\n {\n $check_input_validity = false;\n $check_input_warning = 'Please use a valid email address.';\n }\n elseif(empty($form_input['form_message']))\n {\n $check_input_validity = false;\n $check_input_warning = 'Please include a message.';\n }\n elseif (preg_match('/\\\\[rn]|\\n|\\r|%0[AD]/i', $form_input['form_email']) ||\n // I think the above line fails \"from\" email addresses\n // containing literal, typed, or encoded newline characters\n preg_match('/\\\\[rn]|\\n|\\r|%0[AD]/i', $form_input['form_name']))\n // I think the above line fails \"name\" entries containing\n // literal, typed, or encoded newline characters\n {\n $check_input_validity = false;\n $check_input_warning = 'Sorry, your name or email address appear to be incorrect, please try again.';\n }\n \n $this->set_result($check_input_validity, $check_input_warning);\n }", "public function validate()\n\t{\n\t\t$this->vars['errors'] = $this->validation_errors();\n\t}", "function formValidation() {\n #Firstname Validation\n if (isset($_POST['firstname']) && $_POST['firstname']) {\n if (strlen($_POST['firstname']) < 2) {\n $this->formErrors[] = \"First name must be at least 2 characters long.\";\n }\n if (!valid_text($_POST['firstname'])) {\n $this->formErrors[] = \"First name contains invalid characters. Check for quotes.\";\n }\n } else {\n $this->formErrors[] = \"First name is a required field\";\n }\n #Lastname Validation\n if (isset($_POST['lastname']) && $_POST['lastname']) {\n if (strlen($_POST['lastname']) < 2) {\n $this->formErrors[] = \"Last name must be at least 2 characters long.\";\n }\n if (!valid_text($_POST['lastname'])) {\n $this->formErrors[] = \"Last name contains invalid characters. Check for quotes.\";\n }\n } else {\n $this->formErrors[] = \"Last name is a required field\";\n }\n #Address One Validation\n if (isset($_POST['addressOne']) && $_POST['addressOne']) {\n //Do nothing .. Not doing any AVS checks, so hopefully they give us a good address\n \n } else {\n $this->formErrors[] = \"Address Field One is required\";\n }\n #City Validation\n if (isset($_POST['city']) && $_POST['city']) {\n //Do nothing .. Not doing any AVS checks, so hopefully they give us a good city\n \n } else {\n $this->formErrors[] = \"City is required\";\n }\n #State Validation\n if (isset($_POST['state']) && $_POST['state']) {\n //Do nothing .. Not doing any AVS checks, so hopefully they give us a good state\n \n } else {\n $this->formErrors[] = \"State is required\";\n }\n #Postal Code Validation\n if (isset($_POST['postalCode']) && $_POST['postalCode']) {\n //Do nothing .. Not doing any AVS checks, so hopefully they give us a good zip\n \n } else {\n $this->formErrors[] = \"Zipcode is required\";\n }\n #Email Validation\n if (isset($_POST['email']) && $_POST['email']) {\n if (validate_email(format_trim($_POST['email']))) {\n //Do nothing .. its a valid email, i guess\n \n } else {\n $this->formErrors[] = \"Email is not valid.\";\n }\n }\n #Position Validation\n \n /** - This is no longer required because position is a radio button with a default value.\n if ((isset($_POST['goalie']) && $_POST['goalie'] == \"on\")\n || (isset($_POST['defense']) && $_POST['defense'] == \"on\")\n || (isset($_POST['center']) && $_POST['center'] == \"on\")\n || (isset($_POST['wing']) && $_POST['wing'] == \"on\")) {\n //Do nothing .. At least one position is checked\n } else {\n $this->formErrors[] = \"Must provide at least one position you would like to play. (Goalie, Defense, Center, Wing)\";\n }\n */\n #Jersey Information Validation\n #Jersey Choice 1 Validation\n //(isset($_POST['jerseyNumChoiceTwo']) && $_POST['jerseyNumChoiceTwo']) || $_POST['jerseyNumChoiceTwo'] == 0\n if ((isset($_POST['jerseyNumChoiceOne']) && $_POST['jerseyNumChoiceOne'] > - 1) || $_POST['jerseyNumChoiceOne'] == 0) {\n //if (is_numeric($_POST['jerseyNumChoiceOne']) && is_int(intval($_POST['jerseyNumChoiceOne']))) {\n if (strlen($_POST['jerseyNumChoiceOne']) == strlen(intval($_POST['jerseyNumChoiceOne']))) {\n if (intval($_POST['jerseyNumChoiceOne']) < 0 || intval($_POST['jerseyNumChoiceOne']) > 99) {\n $this->formErrors[] = \"Jersey Number Choice 1 must be between 0 - 99.\";\n }\n } else {\n $this->formErrors[] = \"Must provide a valid jersey number for Choice 1. (0 - 99)\";\n }\n } else {\n $this->formErrors[] = \"Must provide a valid jersey number for Choice 1. (0 - 99)\";\n }\n #Jersey Choice 2 Validation\n if ((isset($_POST['jerseyNumChoiceTwo']) && $_POST['jerseyNumChoiceTwo'] > - 1) || $_POST['jerseyNumChoiceTwo'] == 0) {\n if (strlen($_POST['jerseyNumChoiceTwo']) == strlen(intval($_POST['jerseyNumChoiceTwo']))) {\n if (intval($_POST['jerseyNumChoiceTwo']) < 0 || intval($_POST['jerseyNumChoiceTwo']) > 99) {\n $this->formErrors[] = \"Jersey Number Choice 2 must be between 0 - 99.\";\n }\n } else {\n $this->formErrors[] = \"Must provide a valid jersey number for Choice 2. (0 - 99)\";\n }\n } else {\n $this->formErrors[] = \"Must provide a valid jersey number for Choice 2. (0 - 99)\";\n }\n #Jersey Choice 3 Validation\n if ((isset($_POST['jerseyNumChoiceThree']) && $_POST['jerseyNumChoiceThree'] > - 1) || $_POST['jerseyNumChoiceThree'] == 0) {\n if (strlen($_POST['jerseyNumChoiceThree']) == strlen(intval($_POST['jerseyNumChoiceThree']))) {\n if (intval($_POST['jerseyNumChoiceThree']) < 0 || intval($_POST['jerseyNumChoiceThree']) > 99) {\n $this->formErrors[] = \"Jersey Number Choice 3 must be between 0 - 99.\";\n }\n } else {\n $this->formErrors[] = \"Must provide a valid jersey number for Choice 3. (0 - 99)\";\n }\n } else {\n $this->formErrors[] = \"Must provide a valid jersey number for Choice 3. (0 - 99)\";\n }\n #Will Sub? Validation\n if (isset($_POST['willSub']) && $_POST['willSub'] == \"Y\") {\n if ((isset($_POST['sunSub']) && $_POST['sunSub'] == \"on\") || (isset($_POST['monSub']) && $_POST['monSub'] == \"on\") || (isset($_POST['tueSub']) && $_POST['tueSub'] == \"on\") || (isset($_POST['wedSub']) && $_POST['wedSub'] == \"on\") || (isset($_POST['thuSub']) && $_POST['thuSub'] == \"on\") || (isset($_POST['friSub']) && $_POST['friSub'] == \"on\") || (isset($_POST['satSub']) && $_POST['satSub'] == \"on\")) {\n //Do nothing, they picked a day that they can sub\n \n } else {\n $this->formErrors[] = \"Since you answered yes to: Will you sub?, you must indicate at least one day you are willing to sub.\";\n }\n }\n return $this->get_formErrors();\n }", "function validate()\n\t{\n\t}", "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();", "public function check_validity() {\r\n\t\t$value = $this->get_posted_value();\r\n\r\n\t\t// required field check\r\n\t\t// 0, '0', and 0.0 need special handling since they're valid, but PHP considers them falsy values.\r\n\t\tif ( $this->props['required'] && ( empty( $value ) && ! in_array( $value, [ 0, '0', 0.0 ], true ) ) ) {\r\n\t\t\t// translators: Placeholder %s is the label for the required field.\r\n\t\t\tthrow new \\Exception( sprintf( _x( '%s is a required field.', 'Add listing form', 'my-listing' ), $this->props['label'] ) );\r\n\t\t}\r\n\r\n\t\t// if field isn't required, then no validation is needed for empty values\r\n\t\tif ( empty( $value ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// otherwise, run validations\r\n\t\t$this->validate();\r\n\t}", "public static function validate() {}", "public function incorrectInput()\n {\n return \"I can't play BuzzPhone like this.\" . $this->askForNumber();\n }", "public function isDataValid() {\n if ($this->userExists())\n $this->_errors[] = 'username already taken';\n // username and password must match pattern\n else if (empty($this->_username) || !preg_match('/^[a-zA-Z0-9]{5,16}$/', $this->_username))\n $this->_errors[] = 'invalid username must be between 5 and 16 characters';\n else if (empty($this->_password) || !preg_match('/^[a-zA-Z0-9]{6,18}$/', $this->_password))\n $this->_errors[] = 'invalid password must be between 6 and 18 characters';\n\t\t else if (empty($this->_password) || $this->_password != $this->_password_confirm)\n $this->_errors[] = \"Password didn't match X\";\n // names must be between 2 and 22 characters\n else if (empty($this->_first_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_first_name))\n $this->_errors[] = 'invalid first name must be between 2 and 22 characters';\n else if (empty($this->_last_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_last_name))\n $this->_errors[] = 'invalid last name must be between 2 and 22 characters';\n //restricts day to 01-31, month to 01-12 and year to 1900-2099 (also allowing / - or . between the parts of the date) \n else if (empty($this->_dob) || !preg_match('/^(0?[1-9]|[12][0-9]|3[01])[\\/\\ ](0?[1-9]|1[0-2])[\\/\\ ](19|20)\\d{2}$/', $this->_dob))\n $this->_errors[] = 'invalid dod | must be DD/MM/YYYY format';\n else if (empty($this->_address))\n $this->_errors[] = 'invalid address';\n // checks if valid postal code\n else if (empty($this->_postcode) || !preg_match('/^(([A-PR-UW-Z]{1}[A-IK-Y]?)([0-9]?[A-HJKS-UW]?[ABEHMNPRVWXY]?|[0-9]?[0-9]?))\\s?([0-9]{1}[ABD-HJLNP-UW-Z]{2})$/', $this->_postcode))\n $this->_errors[] = 'invalid postcode | must be AA11 9AA format';\n // checks is valid email using regular expression\n else if (empty($this->_email) || !preg_match('/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/', $this->_email))\n $this->_errors[] = 'invalid email';\n\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }", "function validate()\n\t{\n\t\t$isValid = false;\n\t\t\n\t\tif(empty($this->data['username']))\n\t\t{\n\t\t\t\t$this->errors['username'] = \"Please enter a Username\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['password']))\n\t\t{\n\t\t\t\t$this->errors['password'] = \"Please enter a password\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['description']))\n\t\t{\n\t\t\t\t$this->errors['description'] = \"Please enter a description of yourself\";\n\t\t}\n\t\t\n\t\t\n\t\t//validate data elements in userData property\n\t\t//if an error exists, store to errors using column name as key\n\t\t\n\t\t if(empty($this->errors))\n\t\t{\n\t\t\t$isValid = true;\n\t\t}\n\t\t\n\t\treturn $isValid;\n\t}", "protected function validateOrThrow() {}", "function simplr_validate($data) {\r\n $errors = array();\r\n //validate the existance of first and last name, title and school\r\n if(!$data['first_name']){$errors[] = __('You must enter your first name.'); }\r\n if(!$data['last_name']){$errors[] = __('You must enter your last name.'); }\r\n if(!$data['title']){$errors[] = __('You must enter your title.'); }\r\n if(!$data['school']){$errors[] = __('You must enter the school/affiliation.'); }\r\n // Validate username\r\n if(!$data['user_login1']) { \r\n $errors[] = __('You must enter a username.'); \r\n } else {\r\n // check whether username is valid\r\n $user_test = validate_username( $data['user_login1'] );\r\n if($user_test != true) {\r\n $errors[] .= __('Invalid Username.');\r\n }\r\n // check whether username already exists\r\n $user_id = username_exists( $data['user_login1'] );\r\n if($user_id) {\r\n $errors[] .= __('This username already exists.');\r\n }\r\n } //end username validation\r\n if(!$data['user_pass1'] || !$data['user_pass_confirm']) {\r\n $errors[] = __('You must enter a password and password confirmation.');\r\n }\r\n // Make sure passwords match\r\n if($data['user_pass1'] != $data['user_pass_confirm']) {\r\n $errors[] = __('The passwords you entered do not match.');\r\n }\t\r\n // Validate email\r\n if(!$data['user_email']) { \r\n $errors[] = __('You must enter an email.'); \r\n } else {\r\n $email_test = email_exists($data['user_email']);\r\n if($email_test != false) {\r\n $errors[] .= __('An account with this email has already been registered.');\r\n }\r\n if( !is_email($data['user_email']) ) {\r\n $errors[] .= __('Please enter a valid email.');\r\n }\t\r\n } // end email validation\r\n return $errors;\r\n}", "public function validateForm(){\n foreach(self::$fields as $field){\n if(!array_key_exists($field, $this->data)){\n trigger_error(\"$field is not presented in data\");\n return;\n } \n }\n $this->validateUsername();\n $this->validatePassword();\n $this->validateEmail();\n $this->validateFullname();\n return $this->errors;\n }", "function add_error($input, $message)\n {\n }", "public abstract function validation();", "abstract public function validate();", "abstract public function validate();", "public function validation();", "function validate_user_form()\n {\n }", "public function _validate()\n {\n\t\t$data = array();\n\t\t$data['error_string'] = array();\n\t\t$data['inputerror'] = array();\n\t\t$data['status'] = TRUE;\n\n\t\tif($this->input->post('status') === 'SelecteerStatus')\n\t\t{\n $data['inputerror'][] = 'status';\n $data['error_string'][] = 'Status is verplicht!';\n $data['status'] = FALSE;\n\t\t}\n\t\t\n\t\tif($this->input->post('prioriteit') === 'SelecteerPrioriteit')\n\t\t{\n\t\t\t$data['inputerror'][] = 'prioriteit';\n\t\t\t$data['error_string'][] = 'Prioriteit is verplicht!';\n\t\t\t$data['status'] = FALSE;\n\t\t}\n\n\t\tif(empty($this->input->post('Categorie')))\n\t\t{\n\t\t\t$data['inputerror'][] = 'categorie';\n\t\t\t$data['error_string'][] = 'Categorie is verplicht!';\n\t\t\t$data['status'] = FALSE;\n\t\t}\n if($this->input->post('werkman') === 'Selecteer')\n {\n $data['inputerror'][] = 'werkman';\n $data['error_string'][] = 'Werkman toewijzen is verplicht!';\n $data['status'] = FALSE;\n }\n\n\t\tif($data['status'] === FALSE)\n\t\t{\n\t\t\techo json_encode($data);\n\t\t\texit();\n\t\t}\n }", "function validate_form(){\n\tif(empty($_POST['firstname'])) {\n\t\tthrow new Exception(\"Please enter your first name.\");\n\t}\n\tif(empty($_POST['lastname'])) {\n\t\tthrow new Exception(\"Please enter your last name.\");\n\t}\n\tif(empty($_POST['password'])) {\n\t\tthrow new Exception(\"Please enter the password.\");\n\t}\n\tif(empty($_POST['password_confirmation'])) {\n\t\tthrow new Exception(\"Please confirm the password.\");\n\t}\n\tif($_POST['password'] != $_POST['password_confirmation']){\n\t\tthrow new Exception(\"Passwords do not match.\");\n\t}\n\t// Make sure the user entered a valid E-Mail address\n\tif(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {\n\t\tthrow new Exception(\"Invalid E-Mail Address\");\n\t}\n}", "private function validInput()\n {\n if (is_numeric($this->course)) { //Checks that valid course was selected\n if ($this->lab_name !== \"\") //Checks if a lab name was entered\n if (!$this->labAlreadyExists($this->course, $this->lab_name)) {\n {\n foreach ($this->questions as $q) //Checks all questions have text in them\n if ($q === \"\")\n return false; //Returns false if question text is empty\n\n foreach ($this->max_marks as $mark) //Checks all questions have max mark set\n if (!is_numeric($mark))\n return false; //Returns false if a mark was not of type int\n\n if (sizeof($this->min_marks) > 0) {\n foreach ($this->min_marks as $mark) //Checks all questions have min mark set\n if (!is_numeric($mark))\n return false; //Returns false if a mark was not of type int\n }\n return true; //Returns true if all tests are passed\n }\n } else\n return false; //Returns false if a lab already exists with the inputted name\n }\n return false; //Returns false if course is not of type int\n }", "private function validateUserInput($input)\n {\n\n $errors = array();\n\n if ( (empty($input['name'])) || (strlen($input['name']) <= 1) || (strlen($input['name']) >= 255) ) {\n $errors['name'] = 'Incorrect name! Did you fill in the field!';\n }\n\n if ( (empty($input['description'])) || (strlen($input['description']) <= 1) || (strlen($input['description']) >= 255) ) {\n $errors['description'] = 'Incorrect description! Did you fill in the field!';\n }\n\n\n if ( (empty($input['price'])) || (!filter_var($input['price'], FILTER_VALIDATE_FLOAT)) ) {\n $errors['price'] = 'Incorrect format! Did you fill in the field!';\n }\n\n return $errors;\n }", "function input_required_validation($input, $in_name) {\r\n $err = \"\";\r\n if ($input == \"\" or $input == NULL or empty($input)) {\r\n $err = \"$in_name is required\";\r\n }\r\n return $err;\r\n}", "function validar(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n\n if (empty($_POST[\"matricula\"])) {\n $this->matriculaErr = \"La matricula es requerida\";\n } else {\n $this->matricula = $this->test_input($_POST[\"matricula\"]);\n // check if name only contains letters and whitespace\n if (is_numeric($this->matricula)) {\n $this->nameErr = \"Solo se permiten numeros\";\n }\n }\n\n if (empty($_POST[\"nombree\"])) {\n $this->nameErr = \"El nombre es requerido\";\n } else {\n $this->nombre = $this->test_input($_POST[\"nombree\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->nombre)) {\n $this->nameErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"carreraa\"])) {\n $this->nameErr = \"La carrera es requerida\";\n } else {\n $this->carrera = $this->test_input($_POST[\"carreraa\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$this->carrera)) {\n $this->carreraErr = \"Solo se permiten letras y espacios en blanco\";\n }\n }\n\n if (empty($_POST[\"email\"])) {\n $this->emailErr = \"Email is required\";\n } else {\n $this->email = $this->test_input($_POST[\"email\"]);\n // check if e-mail address is well-formed\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->emailErr = \"Invalid email format\";\n }\n }\n\n if (empty($_POST[\"telefonoo\"])) {\n $this->telErr = \"El telefono es requerido\";\n } else {\n $this->telefono = $this->test_input($_POST[\"telefonoo\"]);\n // check if name only contains letters and whitespace\n if (is_numeric($this->telefono)) {\n $this->telErr = \"Solo se permiten numeros\";\n }\n }\n\n }\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 }", "function validateName()\n {\n global $inName, $validForm, $nameErrMsg;\t\t//Use the GLOBAL Version of these variables instead of making them local\n $nameErrMsg = \"\";\t\t\t\t\t\t\t\t//Clear the error message.\n if($inName==\"\")\n {\n $validForm = false;\t\t\t\t\t//Invalid name so the form is invalid\n $nameErrMsg = \"Name is required\";\t//Error message for this validation\n }\n\n else if(!preg_match(\"/^[a-zA-Z\\s]+$/\",$inName)){\n $validForm=false;\n $nameErrMsg=\"Please use only letters\";\n }\n\n else\n {\n $inLname = trim($inName);\t\t\t\t//Removes leading/trailing characters\n $inLname = htmlspecialchars($$inName);\t//converts special characters\n }\n }", "public function checkIsValidForUpdate() {\n $errors = array();\n\n if (strlen($this->phone) >0 && !is_numeric($this->phone)){\n $errors[\"phone\"] = i18n(\"You must write a valid phone number\");\n }\n if (strlen($this->phone) < 1) {\n $errors[\"phone\"] = i18n(\"You must write a valid phone number\");\n }\n try{\n $this->checkIsValidForCreate();\n }catch(ValidationException $ex) {\n foreach ($ex->getErrors() as $key=>$error) {\n $errors[$key] = $error;\n }\n }\n if (sizeof($errors) > 0) {\n throw new ValidationException($errors, \"User is not valid\");\n }\n }", "private function checkError() : void\n {\n $this->isNotPost();\n $this->notExist();\n $this->notAdmin();\n }", "public function checkForErrors()\n {\n if ($this->getDebtor() == '' && $this->getDebtorCode() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Debtor or DebtorCode must be defined')\n );\n }\n\n if ($this->getDomain() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Domain must be defined')\n );\n }\n\n if ($this->getTld() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Tld must be defined')\n );\n }\n }", "function validation($data){\n\tif (empty($data['name']))\n\t\treturn \"Please enter your name\";\n\tif (empty($data['tel']))\n\t\treturn \"Please enter valid contact number\";\n\treturn 0;\n}", "public function validate(){\n\t\t\n\t\tparent::validate();\n\t\t\n\t\tif (isset($this->amount_limit)){\n\t\t\t\n\t\t\tif (!is_numeric($this->amount_limit))\n\t\t\t\t$this->errorAmountLimit = \"Podaj prawidłową kwotę.\";\n\t\t\t\n\t\t\tif ($this->amount_limit < 0)\n\t\t\t\t$this->errorAmountLimit = \"Kwota limitu nie może być ujemna.\";\n\t\t}\n\t\t\n\t\tif ($this->errorName != null || $this->errorAmountLimit != null){\n\t\t\t$this->success = false;\n\t\t}\n\n\t}", "public function validate_customer_input_fields()\n {\n $passed_validation_tests = true;\n $check_name = has_presence($this->name);\n $msg = \"Fix the following error(s): \";\n $msg .=\"<ul style='text-align:left;margin-left:33%'>\";\n \n if (!$check_name) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Customer name cannot be blank.\";\n $msg .= \"</li>\";\n }\n // $check_apy_regex = Form::has_format_matching($apy, '/\\A\\d\\Z/');\n $check_telephone = has_presence($this->telephone);\n $check_telephone_numeric = has_number($this->telephone);\n $check_telephone_length = has_length($this->telephone, ['exact' => 10]);\n if (!$check_telephone or !$check_telephone_numeric or !$check_telephone_length) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Telephone: \";\n $msg .= h($this->telephone);\n $msg .= \" cannot be blank and must consists of 10 digits.\";\n $msg .= \"</li>\";\n }\n\n $check_barcode = has_presence($this->barcode);\n $check_barcode_numeric = has_number($this->barcode);\n $check_barcode_length = has_length($this->barcode, ['exact' => 6]);\n if (!$check_barcode or !$check_barcode_numeric or !$check_barcode_length) {\n $passed_validation_tests = false;\n $msg .= \"<li>\";\n $msg .= \"Barcode: \";\n $msg .= h($this->barcode);\n $msg .= \" cannot be blank and must consists of 6 digits.\";\n $msg .= \"</li>\";\n }\n\n $msg .= \"</ul>\";\n\n if ($passed_validation_tests) {\n return \"\";\n } else {\n return $msg;\n }\n }", "function addUserErrors($self){\n $errors = array();\n # code only runs when form is submitted\n $firstname = trim($_POST['firstname']); # The firstname needs to be letters and between 2 and 19 characters long\n if (!ctype_alpha($firstname) || (strlen($firstname) > 20) || (strlen($firstname) <= 2)) {\n $errors['firstname'] = 'Names can only contain letters. They need to be at least three characters.';\n }\n $surname = trim($_POST['surname']); # The surname needs to be letters and between 2 and 19 characters long\n if (!ctype_alpha($surname) || (strlen($surname) > 20) || (strlen($surname) <= 2)) {\n $errors['surname'] = 'Surnames can only contain letters. They need to be at least three characters.';\n }\n $email = trim($_POST['email']); #i'm using FILTER_VALIDATE_EMAIL to check if the email is valid. If it returns false it is invalid\n if (filter_var($email, FILTER_VALIDATE_EMAIL) == false) {\n $errors['email'] = 'Please enter a valid email address.';\n }\n $title = trim($_POST['title']); # Errors are not really possible on the select 'title' box, a value is always selected\n if (($title !== 'Mr') && ($title !== 'Mrs') && ($title !== 'Ms') && ($title !== 'Miss')) { # still check the correct value is sent to form for security\n $errors['title'] = 'This is not the correct title';\n }\n $username = trim($_POST['username']); # The username needs to be letters/numbers and between 5 and 19 characters long\n if (!ctype_alnum($username) || (strlen($username) > 20) || (strlen($username) < 5)) {\n $errors['username'] = 'Usernames can only be numbers or letters. It needs to be five or more charecters long.';\n }\n $password = trim($_POST['password']); # The password needs to be letters/numbers and between 5 and 19 characters long\n if (!ctype_alnum($password) || (strlen($password) > 20) || (strlen($password) < 5)) {\n $errors['password'] = 'This is not a valid password. It should contain only letters and numbers. It needs to be five or more\n characters long.';\n }\n return $errors;\n}", "function validateForm() {\n// pulling in the initialized global\nglobal $firstName, $lastName, $email, $phone, $subject, $comment, $firstNameErr, $lastNameErr, $emailErr, $phoneErr, $subjectErr, $commentErr, $nickName, $errCount;\n\n// if user didn't post any info inside first name field\n if(empty($_POST[\"firstName\"])) {\n $firstNameErr = \"First Name is required\";\n $errCount = true;\n// error case: error occured due to anything other\n// than letter and white space is entered\n// w7 slide21 unit test for reg expression\n } else {\n $firstName = scrubInput($_POST[\"firstName\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$firstName)) {\n $firstNameErr = \"Only letters and white space allowed\";\n $errCount = true;\n }\n }\n// if user didn't post any info inside first name field\n if(empty($_POST[\"lastName\"])) {\n $lastNameErr = \"Last Name is required\";\n $errCount = true;\n// error case\n } else {\n $lastName = scrubInput($_POST[\"lastName\"]);\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$firstName)) {\n $lastNameErr = \"Only letters and white space allowed\";\n $errCount = true;\n }\n }\n// nickName is not required, only clean data when data exists\n if(!empty($_POST[\"nickName\"])) {\n $nickName = scrubInput($_POST[\"nickName\"]);\n }\n\n if(empty($_POST[\"email\"])) {\n $emailErr = \"Email is required\";\n $errCount = true;\n// error case\n } else {\n $email = scrubInput($_POST[\"email\"]);\n // Validate e-mail: check if email address is well formed \n if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $emailErr = \"Invalid email format\";\n $errCount = true; // error case\n }\n }\n\n if (empty($_POST[\"phone\"])) {\n $phoneErr = \"Phone number is required\";\n $errCount = true; // error case\n } else {\n $phone = scrubInput($_POST[\"phone\"]);\n// optional Add phone format here\n// note on week 7 slide 14\n }\n\n if (!empty($_POST[\"comment\"])) {\n $comment = scrubInput($_POST[\"comment\"]);\n }\n\n// no errCount than give me the form summary\n if ($errCount === false) {\n //display confirmation info and send email\n $preference = findName($firstName, $nickName);\n // from findName function to use nickName $prefrence gets set below\n $summary = \"<div id='results'><h2>Thank you for participating $preference</h2><p>Normally, a form would send you a confirmation but this one is just sending me an email. We will review all of the elements of this form in class.</p><br>Summarizing your input: <br>\".$email.\"<br>\".$phone.\"<br>\".$comment.\"<br>You have taken the following classes:<br>\";\n// concatenating assignment operator ('.=')\n// appends the argument on the right side to the argument on the left side\n// ex: http://tmhardy.com/dev/ucsc/final/form.php \n $summary .= '<ul id=\"extra\">';\n $summary .= listPrereqs();\n $summary .= listFormFields();\n $summary .= '</ul>';\n // sendMyMsg($summary);\n\n header('Location: thankYou.php?confirmMsg='.urlencode($summary));\n }\n}", "public function validatePostData () {\n\t\t$message = \"success\";\n\n\t\t// check if the payer's name has been provided\n\t\t$customerName = $this->input->post('gtp_PayerName'); //$_POST['gtp_PayerName'];\n\t\tif(($customerName == \"\") || ($customerName == null)) {\n\t\t\t$message = \"Provide Your name please!\";\n\t\t\treturn $message;\n\t\t}\n\n\t\t// validate other fields\n\n\t\treturn $message;\n\t}", "function validateInputs(){\n\tglobal $nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,\n$homeNum,$handphoneNum,$email,$description;\n\tglobal $faID;\n\tif(!matchRegex($nric,'/^[a-zA-Z0-9]*$/')) { return false; }\n\tif(!matchRegex($firstName,'/^[a-zA-Z0-9 ]*$/')) { return false; }\n\tif(!matchRegex($lastName,'/^[a-zA-Z0-9 ]*$/')) { return false; }\n\tif(!matchRegex($dob,'/^[0-9-]*$/')) { return false; }\n\tif(!matchRegex($address1,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\tif(!matchRegex($address2,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\tif(!matchRegex($poCode,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($homeNum,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($handphoneNum,'/^[0-9]*$/')) { return false; }\n\tif(!matchRegex($email,'/^[a-zA-Z0-9@._-]*$/')) { return false; }\n\tif(!matchRegex($description,'/^[a-zA-Z0-9 -_.,#]*$/')) { return false; }\n\t\n\treturn true;\n}", "protected function _validate() {\n\t}", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "protected function validate()\n {\n }", "protected function validate() {\r\n if ($this->getBaseAmount() <= 0)\r\n $this->errors->add(\"The base amount of alicuota must be greater than 0.\");\r\n// \t\t\telse\r\n// \t\t\t{\r\n// \t\t\t\t$relativeError = (($this->getTaxAmount() / $this->getBaseAmount() * 100) - $this->getTaxPercent());\r\n// \t\t\t\t$relativeError = $relativeError / $this->getTaxPercent();\r\n// \t\t\t\t$relativeError = NumberDataTypeHelper::truncate($relativeError, 2);\r\n// \t\t\t\tif (abs($relativeError) > 0.01)\r\n// \t\t\t\t\t$this->errors->add(\"The base and tax amount do not match with the alicuota ({$this->getName()}). Diference: $relativeError\");\r\n// \t\t\t}\r\n }", "public function validate()\n {\n // TODO implement this\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "function check_fields() {\r\n \r\n $fail = false;\r\n\t\t$empty = true;\r\n\t\t\r\n // if first name contains any non-letter characters, exit\r\n\t\tif($_POST[\"InputFirstName\"] != '') {\r\n\t\t\tif(!filter_var($_POST[\"InputFirstName\"], FILTER_VALIDATE_REGEXP, array(\"options\"=>array(\"regexp\"=>\"/^[a-zA-Z]*$/\")))) {\r\n\t\t\t\t$GLOBALS['firstNameNotValid'] = true;\r\n\t\t\t\t$fail = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$empty = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n // if last name contains any non-letter characters, exit\r\n\t\tif($_POST[\"InputLastName\"] != '') {\r\n\t\t\tif(!filter_var($_POST[\"InputLastName\"], FILTER_VALIDATE_REGEXP, array(\"options\"=>array(\"regexp\"=>\"/^[a-zA-Z]*$/\")))) {\r\n\t\t\t\t$GLOBALS['lastNameNotValid'] = true;\r\n\t\t\t\t$fail = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$empty = false;\r\n\t\t\t}\r\n\t\t}\r\n \r\n // if phone number contains any non-digit or - characters, exit\r\n\t\tif($_POST[\"InputPhone\"] != '') {\r\n\t\t\tif(!filter_var($_POST[\"InputPhone\"], FILTER_VALIDATE_REGEXP, array(\"options\"=>array(\"regexp\"=>\"/^[0-9-]*$/\")))) {\r\n\t\t\t\t$GLOBALS['phoneNumberNotValid'] = true;\r\n\t\t\t\t$fail = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$empty = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n if(!$fail && !$empty) {\r\n change_info();\r\n }\r\n }", "function mwpc_check_register_input(&$errors, $value, $label) {\n if (empty($value) \n || !empty($value) \n && trim($value) == '') {\n $errors->add(\n $label . '_error', \n sprintf(\n '<strong>%s</strong>: %s', \n __('Erro', 'MWPC_DOWMAIN'), \n __('O ' . $label . ' é obrigatório.', 'MWPC_DOWMAIN')\n )\n );\n }\n}", "protected function checkInput($input)\n {\n if (empty($input['username'])) {\n throw new Exception\\UsernameMissing;\n }\n\n if (empty($input['password'])) {\n throw new Exception\\PasswordMissing;\n }\n }", "public function validate()\n {\n // FUTURE FIXME: no se deberia retornar un simple true/false, sino que \n // si una condicion no se cumple deberia devolverse un mensaje \n // indicando qué no se ha cumplido, posiblemente usando una excepcion \n // para cada caso, para que el controlador la capture y muestre el \n // mensaje adecuado a la vista y no un simple mensaje de error \n // generico.\n\n // name solo puede tener letras, números y guiones\n if (!filter_var($this->name, FILTER_VALIDATE_REGEXP, [\"options\" => [\"regexp\" => \"/[a-zA-Z0-9\\-]+/\"]]))\n return false;\n\n // descrpicion debe limpiarse para prevenir ataques XSS\n $this->description = filter_var($this->description, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n // nombre debe tener como minimo 4 caracteres y como maximo 255\n if (strlen($this->name) <4 || strlen($this->name) > 255)\n return false;\n\n // estado debe ser \"pendiente\", \"subasta\" o \"venta\" exclusivamente\n if ($this ->state !== \"pendiente\" && $this->state !== \"subasta\" && $this->state !== \"venta\")\n return false;\n\n // el propietario debe existir como usuario en la BD\n $user = new User($this->owner);\n if (!$user->fill()) return false;\n\n // todas las condiciones se han cumplido, retorna true\n return true;\n }", "private function validateData()\n {\n if (empty($this->nome)) {\n $this->errors->addMessage(\"O nome é obrigatório\");\n }\n\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->errors->addMessage(\"O e-mail é inválido\");\n }\n\n if (strlen($this->senha) < 6) {\n $this->errors->addMessage(\"A senha deve ter no minímo 6 caracteres!\");\n }\n if ($this->emailExiste($this->email, 'email')) {\n $this->errors->addMessage(\"Esse e-mail já está cadastrado\");\n }\n if ($this->emailExiste($this->usuario, 'usuario')) {\n $this->errors->addMessage(\"Esse usuário já está cadastrado\");\n }\n\n return $this->errors->hasError();\n }", "public function validate(): void\n {\n $errors = $this->getErrors();\n $this->throwExceptionIfErrors($errors);\n }", "public function invalidUsername() {\n\t\t$this->messages[] = \"Användarnamnet har för få tecken. Minst 3 tecken.\";\n\t}", "function form_check() {\n\tglobal $cert_amt_tbl;\n\t\n\t// required fields array\n\t$required_fields = array('Discount Amount'=> $cert_amt_tbl->discount_amount);\n\t\t\n\t// check error values and write error array\t\t\t\t\t\n\tforeach($required_fields as $field_name => $output) {\n\t if (empty($output)) {\n\t\t$errors_array[] = $field_name;\n\t }\n\t}\n\t\n\tif (!empty($errors_array)) {\n\t $error_message = 'You did not supply a value for these fields: ' . implode(', ',$errors_array);\n\t}\n\t\n return $error_message;\n }", "function form1()\r\n {\r\n global $f3;\r\n $isValid= true;\r\n if (!validString($f3->get('animal'))) {\r\n $isValid = false;\r\n $f3->set(\"errors['animal']\", \"Please enter an animal \");\r\n }\r\n if (!validQty($f3->get('qty'))) {\r\n $isValid = false;\r\n $f3->set(\"errors['qty']\", \"Please enter quantity\");\r\n }\r\n return $isValid;\r\n }", "public function validate()\n\t{\n\t\t$props = array('to', 'content', 'countryCode');\n\n\t\tforeach ($props as $p) {\n\t\t\tif (empty($this->$p)){\n\t\t\t\tthrow new ValidationException(\"Message property '$p' is required\", ValidationException::CODE_REQUIRED, $p);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! preg_match('/^(\\d{3}|\\d{5})$/', $this->countryCode)) {\n\t\t\tthrow new ValidationException(\"Country code must be exactly 3 or 5 digits long\", ValidationException::CODE_UNEXP_FORMAT, $p);\n\t\t}\n\t}", "public function validate()\n {\n $result = parent::validate();\n \n if ($result === true)\n $this->setErrorMessage('');\n else\n $this->setErrorMessage(Resources::getValue(Resources::SRK_FORM_ERRORGENERIC));\n \n return $result;\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}", "protected function performValidation()\n {\n // no required arguments\n }", "function validate() {\n\t\t// If it's not required, there's nothing to validate\n\t\tif ( !$this->get_attribute( 'required' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\n\t\t$field_value = isset( $_POST[$field_id] ) ? stripslashes( $_POST[$field_id] ) : '';\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t// Make sure the email address is valid\n\t\t\tif ( !is_email( $field_value ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s requires a valid email address', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t// Just check for presence of any text\n\t\t\tif ( !strlen( trim( $field_value ) ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s is required', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t}\n\t}", "function _valInput() {\r\n\t\tswitch(TRUE) {\r\n\t\t\tcase (empty($_POST['lynkvp_name'])):\r\n\t\t\t\t$this->note .= __('Please enter a Name.', $this->textdomain_name);\r\n\t\t\t\treturn FALSE; break;\r\n\t\t\tcase (empty($_FILES['lynkvp_file']['size']) && empty($_POST['lynkvp_url'])):\r\n\t\t\t\t$this->note .= __('Please choose a Video or enter an URL.', $this->textdomain_name);\r\n\t\t\t\treturn FALSE; break;\r\n\t\t\tcase (empty($_POST['lynkvp_type'])):\r\n\t\t\t\t$this->note .= __('Please choose a Video Type.', $this->textdomain_name);\r\n\t\t\t\treturn FALSE; break;\r\n\t\t\tcase (empty($_POST['lynkvp_size']) || !isset($this->videosizes[$_POST['lynkvp_size']])):\r\n\t\t\t\tif (empty($_POST['lynkvp_size']) || $_POST['lynkvp_size'] == 0) {\r\n\t\t\t\t\t$this->note .= __('Please select a Size.', $this->textdomain_name);\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t} elseif (preg_match('/[^\\d]/', $_POST['lynkvp_width'])) {\r\n\t\t\t\t\t$this->note .= __('Please enter a Width.', $this->textdomain_name);\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t} elseif(preg_match('/[^\\d]/', $_POST['lynkvp_height'])) {\r\n\t\t\t\t\t$this->note .= __('Please enter a Height.', $this->textdomain_name);\r\n\t\t\t\t\treturn FALSE; break;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn TRUE; break;\r\n\t\t}\r\n\t}", "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}", "function checkInput()\n\t{\n\t\tglobal $lng;\n\t\t\n\t\t$_POST[$this->getPostVar()][\"latitude\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"latitude\"]);\n\t\t$_POST[$this->getPostVar()][\"longitude\"] = \n\t\t\tilUtil::stripSlashes($_POST[$this->getPostVar()][\"longitude\"]);\n\t\tif ($this->getRequired() &&\n\t\t\t(trim($_POST[$this->getPostVar()][\"latitude\"]) == \"\" || trim($_POST[$this->getPostVar()][\"longitude\"]) == \"\"))\n\t\t{\n\t\t\t$this->setAlert($lng->txt(\"msg_input_is_required\"));\n\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function validate()\n {\n // Nombre\n //Requerido\n if ($this->name == '') {\n $this->errors[] = 'El nombre es requerido';\n }\n\n // Dirección de E-mail\n\n //Devuelve el mensaje si el e-mail no es un e-mail valido\n if (filter_var($this->email, FILTER_VALIDATE_EMAIL) === false) {\n $this->errors[] = 'La dirección de e-mail es inválida. Reintentar';\n }\n //Si la función emailExists devuelve true, genera el error de e-mail en uso\n //El segundo parámetro de emailExists puede ser null o el ID de usuario si existe (ejemplo: el usuario esta registrado)\n if(static::emailExists($this->email, $this->id ?? null)) {\n $this->errors[] = 'La dirección de E-mail ya está en uso';\n }\n\n // Password\n\n if (isset($this->password)) {\n\n //Devuelve el mensaje si $password no tiene por lo menos 6 caracteres\n if (strlen($this->password) < 6) {\n $this->errors[] = 'La contraseña debe tener por lo menos 6 caracteres';\n }\n //Usa regexp para matchear si no encuentra por lo menos una letra\n if (preg_match('/.*[a-z]+.*/i', $this->password) == 0) {\n $this->errors[] = 'La contraseña debe tener por lo menos una letra';\n }\n\n //Usa regexp para matchear si no encuentra por lo menos un numero\n if (preg_match('/.*\\d+.*/i', $this->password) == 0) {\n $this->errors[] = 'La contraseña debe tener por lo menos una número';\n }\n }\n \n }", "function validate() {\n\t\t$this->_validationErrors = array();\n\t\tif (null === $this->getsession_id()) {\n\t\t\t$this->_validationErrors[] = 'session_id must not be null';\n\t\t}\n\t\tif (null === $this->getclassroom_id()) {\n\t\t\t$this->_validationErrors[] = 'classroom_id must not be null';\n\t\t}\n\t\tif (null === $this->getname()) {\n\t\t\t$this->_validationErrors[] = 'name must not be null';\n\t\t}\n\t\treturn 0 === count($this->_validationErrors);\n\t}" ]
[ "0.7772143", "0.712842", "0.69577837", "0.68959486", "0.6710856", "0.6654891", "0.6647198", "0.65654784", "0.6496221", "0.648628", "0.64478433", "0.63250214", "0.63133407", "0.6303439", "0.6272516", "0.62717396", "0.6262827", "0.6244222", "0.62049675", "0.61535215", "0.61252135", "0.6119896", "0.6103401", "0.61005956", "0.6081208", "0.6072246", "0.606896", "0.6067023", "0.6057641", "0.6053293", "0.60475826", "0.6027483", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6012907", "0.6006798", "0.60019565", "0.5985856", "0.59784794", "0.5971254", "0.5966376", "0.5955434", "0.59551", "0.5945571", "0.59349906", "0.59348375", "0.59348375", "0.592926", "0.5918629", "0.5916518", "0.59162974", "0.59102285", "0.58983296", "0.58938104", "0.58919734", "0.5891842", "0.588831", "0.58880955", "0.5887768", "0.5874875", "0.5870501", "0.58684206", "0.5855654", "0.5854832", "0.582245", "0.58078206", "0.5806729", "0.5799701", "0.57927287", "0.57824826", "0.57682824", "0.5760711", "0.5755844", "0.5747018", "0.57459104", "0.5743617", "0.57392025", "0.5738812", "0.57372874", "0.57251894", "0.5710608", "0.5709758", "0.57012475", "0.5691614", "0.5690725", "0.56891084", "0.56863046", "0.5680679", "0.5677675", "0.56712264", "0.5664035", "0.56612194" ]
0.0
-1
Disables the post meta output for page override pages.
function et_divi_post_meta() { $pages = array( intval( \SermonManager::getOption( 'smp_archive_page', 0 ) ), intval( \SermonManager::getOption( 'smp_tax_page', 0 ) ), ); if ( in_array( get_the_ID(), $pages ) ) { return; } $postinfo = is_single() ? et_get_option( 'divi_postinfo2' ) : et_get_option( 'divi_postinfo1' ); if ( $postinfo ) : echo '<p class="post-meta">'; echo et_pb_postinfo_meta( $postinfo, et_get_option( 'divi_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Divi' ), esc_html__( '1 comment', 'Divi' ), '% ' . esc_html__( 'comments', 'Divi' ) ); echo '</p>'; endif; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GTPress_hide_pagemeta() {\r\n\tif ($options['hide_pagemeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' ); // allow comments for pages\r\n\t\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages\r\n\t\tremove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'page' , 'normal' ); // page trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'page' , 'normal' ); // page excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'page' , 'side' ); // page tags\r\n\t\tremove_meta_box( 'pageparentdiv','page','side'); // Page Parent\r\n\t\tremove_meta_box( 'slugdiv','page','normal'); // page slug\r\n\t}\r\n}", "function ssep_force_hide_meta() {\n\tglobal $post, $ss_blog;\n\n\t$hide_meta = ssep_hide_meta( $post->ID );\n\n\tif ( $hide_meta ) {\n\t\tremove_action( 'shoestrap_entry_meta', array( $ss_blog, 'meta_custom_render' ) );\n\t\tadd_filter( 'shoestrap_the_tags', '__return_null' );\n\t\tadd_filter( 'shoestrap_the_cats', '__return_null' );\n\t}\n}", "function GTPress_hide_postmeta() {\r\n\tif ($options['hide_postmeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'post' , 'normal' ); // allow comments for posts\r\n\t\tremove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts\r\n\t\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags\r\n\t\tremove_meta_box( 'slugdiv','post','normal'); // post slug\r\n\t}\r\n}", "function gtpressMenu_disable_metas() {\r\n\r\n\tif (current_user_can('manage_options') && get_option('gtpressMenu_admins_see_everything'))\r\n\t\treturn;\r\n\r\n\tremove_action('admin_head', 'index_js');\r\n\r\n\t$disabled_metas = get_option('gtpressMenu_disabled_metas');\r\n\tif (!empty($disabled_metas)) {\r\n\t\t$metas = implode(',', $disabled_metas);\r\n\t\techo '<style type=\"text/css\">'.$metas.' {display: none !important}</style>';\r\n\t}\r\n\r\n}", "public static function disable()\n {\n // Disable the page theme\n unset(self::$data['theme']);\n\n // Disable the optimizer\n self::$data['optimize'] = false;\n }", "function remove_post_support() {\n remove_post_type_support( 'page', 'editor' );\n }", "function magazine_remove_entry_meta() {\n\tif ( ! is_single() ) {\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );\n\t}\n\n}", "function wpcom_vip_disable_post_flair() {\n\tadd_filter( 'post_flair_disable', '__return_true' );\n}", "function cinerama_edge_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'cinerama_edge_filter_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}", "function fix_no_editor_on_posts_page($post)\n{\n\n if ($post->ID != get_option('page_for_posts')) {\n return;\n }\n\n remove_action('edit_form_after_title', '_wp_posts_page_notice');\n add_post_type_support('page', 'editor');\n\n}", "function power_disable_seo() {\n\n\tremove_filter( 'wp_title', 'power_default_title', 10 );\n\tremove_action( 'get_header', 'power_doc_head_control' );\n\tremove_action( 'power_meta', 'power_seo_meta_description' );\n\tremove_action( 'power_meta', 'power_seo_meta_keywords' );\n\tremove_action( 'power_meta', 'power_robots_meta' );\n\tremove_action( 'wp_head', 'power_canonical', 5 );\n\tremove_action( 'wp_head', 'power_meta_name' );\n\tremove_action( 'wp_head', 'power_meta_url' );\n\tremove_action( 'wp_head', 'power_paged_rel' );\n\tremove_filter( 'power_attr_head', 'power_attributes_head' );\n\tadd_filter( 'power_attr_head', 'power_attributes_empty_class' );\n\n\tremove_action( 'admin_menu', 'power_add_inpost_seo_box' );\n\tremove_action( 'save_post', 'power_inpost_seo_save', 1 );\n\n\tremove_action( 'admin_init', 'power_add_taxonomy_seo_options' );\n\n\tremove_action( 'show_user_profile', 'power_user_seo_fields' );\n\tremove_action( 'edit_user_profile', 'power_user_seo_fields' );\n\n\tremove_theme_support( 'power-seo-settings-menu' );\n\tadd_filter( 'pre_option_' . POWER_SEO_SETTINGS_FIELD, '__return_empty_array' );\n\n\tdefine( 'POWER_SEO_DISABLED', true );\n\n}", "function jn_htmlInUrl_deactive() {\r\n\t\tglobal $wp_rewrite;\r\n\t\tif ( in_array( 'page', $this->selected_post_type ) ) {\r\n\t\t\t$wp_rewrite->page_structure = str_replace( '.html','',$wp_rewrite->page_structure );\r\n\t\t\t$wp_rewrite->flush_rules();\r\n\t\t}\r\n\t}", "function sld_rm_post_custom_fields() {\n\t// pages\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' );\n\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'authordiv' , 'page' , 'normal' );\n\n\t// posts\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' );\n\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' );\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' );\n}", "function admin_speedup_remove_post_meta_box() {\n\tglobal $post_type;\n\tif ( is_admin() && post_type_supports( $post_type, 'custom-fields' )) {\n\t\tremove_meta_box( 'postcustom', $post_type, 'normal' );\n\t}\n}", "public function be_hide_editor() {\n // Get the Post ID\n if (isset($_GET['post']))\n $post_id = $_GET['post'];\n elseif (isset($_POST['post_ID']))\n $post_id = $_POST['post_ID'];\n\n if (!isset($post_id))\n return;\n\n // Get the Page Template\n $template_file = get_post_meta($post_id, '_wp_page_template', TRUE);\n\n //if ('template-photos.php' == $template_file)\n //echo '<style>#postdivrich{display: none;}</style>';\n remove_post_type_support('post', 'editor');\n }", "public function remove_post_custom_fields() {\n\n\t\tremove_meta_box('postcustom' , 'post' , 'normal');\n\n\t}", "function thb_disable_layout_default_options_splash_page() {\n\t\tif ( thb_get_admin_template() == 'template-splash.php' ) {\n\t\t\t$fields_container = thb_theme()->getPostType( 'page' )->getMetabox( 'layout' )->getContainer( 'layout_container' );\n\t\t\t$fields_container->removeField('subtitle');\n\t\t\t$fields_container->removeField('pageheader_disable');\n\t\t}\n\t}", "public function hideMetaBoxes()\n {\n remove_meta_box( 'pageparentdiv', 'playscripts', 'side' );\n // for some odd reason this doesn't always work. Very annoying.\n remove_meta_box( 'postimagediv', 'playscripts', 'side' );\n }", "function _disable_content_editor_for_navigation_post_type($post)\n {\n }", "function wpcom_vip_disable_postpost() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function clix_uppe_post_exclude( $posts ){\r\n\t$bail_out = ( ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) || ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) );\r\n\tif($bail_out){\r\n\t\treturn $posts;\r\n\t\t}\r\n\tif( is_category() ){\r\n\t\t$uppefield='_clix_uppe_disable_archive';\r\n\t\t}\r\n\telseif( is_tag() ){\r\n\t\t$uppefield='_clix_uppe_disable_tag';\r\n\t\t}\r\n\telseif( is_search() ){\r\n\t\t$uppefield='_clix_uppe_disable_search';\r\n\t\t}\r\n\telseif( is_home() ){\r\n\t\t$uppefield='_clix_uppe_disable_home';\r\n\t\t}\r\n\t//create an array to hold the posts we want to show\r\n\t$new_posts = array();\r\n\t//loop through all the post objects\r\n\tforeach( $posts as $post ){\r\n\t \tif(get_post_meta( $post->ID, $uppefield, true)==1 ){\r\n\t \t\tcontinue;\r\n\t \t\t}\r\n\t \telseif( !is_user_logged_in() && get_post_meta( $post->ID, '_clix_uppe_disable_unlesslogin', true )==1){\r\n\t \t\tcontinue;\r\n\t \t\t}\r\n\t \t$new_posts[] = $post;\r\n\t\t}\r\n\treturn $new_posts;\r\n}", "private function DisableGutenberg(){\n // disable for posts\n add_filter('use_block_editor_for_post', '__return_false', 10);\n // disable for post types\n add_filter('use_block_editor_for_post_type', '__return_false', 10);\n }", "function remove_postcustom() {\n\tremove_meta_box( 'postcustom', null, 'normal' );\n}", "function deactivate() {\r\n global $wp_rewrite;\r\n\r\n $wp_rewrite->page_structure = str_replace(\".\" . $this->options->extension, \"\", $wp_rewrite->page_structure);\r\n $wp_rewrite->flush_rules();\r\n }", "public function remove_page_editor() {\n\t\tremove_post_type_support('page', 'editor');\n\t}", "public function just_editing_post() {\n\t\tdefine('suppress_newpost_action', TRUE);\n\t}", "function genesisawesome_cond_actions() {\n\n\tif ( ! is_single() )\n\t\tremove_action( 'genesis_after_post_content', 'genesis_post_meta' );\n\n}", "function social_adrotate_to_page_deactivate() {\n\t\tdelete_option('social_add_adrotate_to_page_blocks');\n\t\tdelete_option('social_add_adrotate_to_page_position_default');\n\t}", "function remove_my_post_metaboxes() {\n remove_meta_box( 'formatdiv','post','normal' ); // Format Div\n remove_meta_box( 'postcustom','post','normal' ); // Custom Fields\n remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback and Pingback\n remove_meta_box( 'postexcerpt','post','normal' ); // Custom Excerpt\n remove_meta_box( 'slugdiv','post','normal' ); // Custom Slug\n}", "function init_remove_support(){\n if( !empty($_GET['post']) && intval($_GET['post']) == get_option( 'page_on_front' ) ) {\n remove_post_type_support('page', 'editor');\n }\n}", "function add_meta_to_plugin_pages() {\r\n echo '<meta name=\"robots\" content=\"noindex\"/>';\r\n echo '<meta name=\"robots\" content=\"nofollow\"/>';\r\n }", "function board_agenda_front_genesis_meta() {\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\n\t\t//* Remove the post content (requires HTML5 theme support)\n\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n\n\t\t//add_action( 'genesis_entry_content', 'sanders_front_content' );\n\t\tadd_action( 'genesis_loop', 'board_agenda_resource_centre' );\n\n\t\tadd_action('genesis_before_footer','board_agenda_front_latest_insight',1);\n\n}", "function board_agenda_front_genesis_meta() {\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\n\t\t//* Remove the post content (requires HTML5 theme support)\n\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n\n\t\t//add_action( 'genesis_entry_content', 'sanders_front_content' );\n\t\tadd_action( 'genesis_loop', 'board_agenda_resource_centre' );\n\n\t\tadd_action('genesis_before_footer','board_agenda_front_latest_insight',1);\n\n}", "function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }", "function wpcom_vip_disable_sharing() {\n\t// Post Flair sets things up on init so we need to call on that if init hasn't fired yet.\n\t_wpcom_vip_call_on_hook_or_execute( function() {\n\t\tremove_filter( 'post_flair', 'sharing_display', 20 );\n\t\tremove_filter( 'the_content', 'sharing_display', 19 );\n \t\tremove_filter( 'the_excerpt', 'sharing_display', 19 );\n\n\t\twpcom_vip_disable_sharing_resources();\n\t}, 'init', 99 );\n}", "function remove_dashboard_meta() {\r\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\r\n\t\t\t\tremove_meta_box( 'dashboard_welcome', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\r\n}", "function remove_generator_meta() {\n\t\tremove_action('wp_head', 'wp_generator');\n\t}", "function ks_disable_posts_admin_menu() {\n remove_menu_page('edit.php');\n}", "function elementor_default_setting()\n {\n\n if (false == yatri_enable_page_builder_compatibility() || 'post' == get_post_type()) {\n return;\n }\n\n\n // don't modify post meta settings if we are not on Elementor's edit page.\n if (!$this->is_elementor_editor()) {\n return;\n }\n\n global $post;\n\n $id = yatri_get_post_id();\n\n $page_builder_flag = '';//get_post_meta($id, 'yatri_pb_usage_flag', true);\n\n if (isset($post) && empty($page_builder_flag) && (is_admin() || is_singular())) {\n\n if (empty($post->post_content) && $this->is_elementor_activated($id)) {\n\n update_post_meta($id, 'yatri_pb_usage_flag', 'used');\n update_post_meta($id, 'yatri_sidebar_location', 'yatri_full_width_100');\n update_post_meta($id, 'yatri_page_breadcrumb_option', 'disable');\n update_post_meta($id, 'yatri_page_title_enable', 'no');\n update_post_meta($id, 'yatri_page_featured_image_enable', 'no');\n\n\n add_filter('yatri_page_title_enable', '__return_false');\n add_filter('yatri_page_featured_image_enable', '__return_false');\n }\n }\n }", "function kindred_disable_classic_editor()\r\n{\r\n $screen = get_current_screen();\r\n if ('page' !== $screen->id || !isset($_GET['post'])) {\r\n return;\r\n }\r\n\r\n if (kindred_disable_editor($_GET['post'])) {\r\n remove_post_type_support('page', 'editor');\r\n }\r\n}", "function _wp_block_editor_posts_page_notice()\n {\n }", "function remove_default_custom_fields( $type, $context, $post ) {\n foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n foreach ( $this->postTypes as $postType ) {\n remove_meta_box( 'postcustom', $postType, $context );\n }\n }\n }", "function childtheme_override_postfooter() {}", "function customize_meta_boxes()\n{\n // These remove meta boxes from POSTS\n //remove_post_type_support(\"post\",\"excerpt\"); //Remove Excerpt Support\n //remove_post_type_support(\"post\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"post\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"post\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"post\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"post\",\"editor\"); //Remove Editor Support\n //remove_post_type_support(\"post\",\"custom-fields\"); //Remove custom-fields Support\n //remove_post_type_support(\"post\",\"title\"); //Remove Title Support\n\n\n // These remove meta boxes from PAGES\n //remove_post_type_support(\"page\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"page\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"page\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"page\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"page\",\"custom-fields\"); //Remove custom-fields Support\n\n}", "function _reset_front_page_settings_for_post($post_id)\n {\n }", "function remove_guttenberg_from_pages() {\n\tremove_post_type_support( 'youthclub', 'editor' );\n}", "public function ignite() {\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_metabox' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_metabox' ), 10, 3 );\n\t\tadd_action( 'page_specific_menu', array( $this, 'output_menu' ) );\n\t}", "public function override_next_page() {\n return false;\n }", "function remove_post_type_support_for_pages() {\n\t\t// UNCOMMENT if you want to remove some stuff\n\t\t// Replace 'page' with 'post' or a custom post/content type\n\t\t# remove_post_type_support( 'page', 'title' );\n\t\t// remove_post_type_support( 'page', 'editor' );\n\t\tremove_post_type_support( 'page', 'thumbnail' );\n\t\t# remove_post_type_support( 'page', 'page-attributes' );\n\t\t# remove_post_type_support( 'page', 'excerpt' );\n}", "function disable_visual_editor()\n{\n if ( 'signature' == get_post_type() )\n {\n return false;\n }\n return true;\n}", "public function disable_author_page()\n {\n if (is_author()) {\n wp_redirect(home_url('/'), 301);\n exit;\n }\n }", "function ngng_remove_yoast_metabox_page_headers() {\n\tremove_meta_box( 'wpseo_meta', 'page_header', 'normal' );\n}", "function wbcDisabled() {\n if ( ! current_user_can('edit_posts') ) {\n add_filter('show_admin_bar', '__return_false');\n }\n}", "function extamus_remove_dashboard_meta() {\n\tif ( ! current_user_can( 'administrator' ) ) {\n\t\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n\t\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n\t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\n\t}\n}", "function d4tw_remove_dash_meta() {\r\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\r\n}", "function tct_noindex() {\n if ( '0' == get_option('blog_public') ) {\n echo \"<meta name='robots' content='noindex,nofollow'>\\n\";\n }\n}", "function tb_string_swap_disable_nag() {\n\n\tglobal $current_user;\n\n\tif ( ! isset($_GET['nag-ignore']) ) {\n\t\treturn;\n\t}\n\n\tif ( strpos($_GET['nag-ignore'], 'tb-nag-') !== 0 ) { // meta key must start with \"tb-nag-\"\n\t\treturn;\n\t}\n\n\tif ( isset($_GET['security']) && wp_verify_nonce( $_GET['security'], 'themeblvd-string-swap-nag' ) ) {\n\t\tadd_user_meta( $current_user->ID, $_GET['nag-ignore'], 'true', true );\n\t}\n}", "function _disable_block_editor_for_navigation_post_type($value, $post_type)\n {\n }", "public static function plugin_deactivated() {\n\n\t\t// define page array\n\t\t$page_definitions = [\n\t\t\t'codeable-users-table-shortcode-page' => [\n\t\t\t\t'title' => __( 'Codeable Users Table Shortcode Page', 'codeable-user-tables' ),\n\t\t\t\t'content' => '[codeable_users_table]'\n\t\t\t],\n\t\t];\n\n\t\tforeach ( $page_definitions as $slug => $page ) {\n\t\t\t// remove all the data we created\n\t\t\t$page = get_page_by_path( $slug, OBJECT, 'page' );\n\t\t\twp_delete_post( $page->ID, true );\n\t\t}\n\n\t}", "function disable_video_post_editor() {\n remove_post_type_support( 'video', 'comments' );\n remove_post_type_support( 'video', 'editor' );\n}", "function jetpackme_remove_rp() {\n\tif ( class_exists( 'Jetpack_relatedPosts')) {\n\t\t$jprp = Jetpack_relatedPosts::init();\n\t\t$callback = array ( $jprp, 'filter_add_target_to_dom' );\n\t\tremove_filter( 'the_content', $callback, 40);\n\t}\n}", "function ks_disable_posts_admin_bar() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('new-post');\n}", "function gtpress_disable_dashboard() {\r\n \tglobal $wp_meta_boxes;\r\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\r\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_wordpress_blog']);\r\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\r\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_other_wordpress_news']);\r\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\t\r\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\r\n}", "public function disableTopPageUpdate(): void\n {\n $this->topPageUpdate = false;\n }", "function unhide_kitchensink( $args ) {\n$args['wordpress_adv_hidden'] = false;\nreturn $args;\n}", "public function set_do_not_cache_flag_for_gated_content() {\r\n\t\t\r\n\t\t// Check if we are to try preventing caching of gated content\r\n\t\t\r\n\t\tif ( get_option( 'patreon-prevent-caching-gated-content', 'yes' ) != 'yes' ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tglobal $post;\r\n\r\n\t\t// Bail out if no post object present\r\n\t\tif ( !$post ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\t// Bail out if not a singular page/post\r\n\t\tif ( !is_singular() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// We are here, it means that this is singular content. Check if it is meant to be gated\r\n\t\t\r\n\t\t$gate_content = false;\r\n\t\t\r\n\t\t$lock_or_not = Patreon_Wordpress::lock_or_not( $post->ID );\r\n\t\t\t\r\n\t\tif ( isset( $lock_or_not['lock'] ) ) {\r\n\t\t\t$gate_content = $lock_or_not['lock'];\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ( $gate_content ) {\r\n\t\t\t\r\n\t\t\t// General caching plugin define - Prevents caching of non cached pages\r\n\t\t\tdefine( 'DONOTCACHEPAGE', true );\r\n\t\t\t\r\n\t\t\t// WP Super Cache - disables cache for already cached pages\r\n\t\t\tdefine( 'WPSC_SERVE_DISABLED', true );\r\n\t\t\t\r\n\t\t\t// W3 Total Cache - do not minify JS in gated page\r\n\t\t\tdefine( 'DONOTMINIFY', true );\r\n\t\t\t\r\n\t\t\t// W3 Total Caache - Do not serve gated page from CDN\r\n\t\t\tdefine( 'DONOTCDN', true );\r\n\t\t\t\r\n\t\t\t// W3 Total Cache - Do not use object cache for gated page\r\n\t\t\tdefine( 'DONOTCACHCEOBJECT', true );\r\n\t\t\t\r\n\t\t\t// Litespeed Cache - Equal to DONOTCACHEPAGE flag\r\n\t\t\tdefine('LSCACHE_NO_CACHE', true);\r\n\t\t\t\r\n\t\t\t// WP Fastest Cache compatibility - prevents page from being served from cache.\r\n\t\t\t\r\n\t\t\tif ( $this->check_if_plugin_active( 'wp-fastest-cache/wpFastestCache.php' ) AND function_exists( 'wpfc_exclude_current_page' ) ) {\r\n\t\t\t\twpfc_exclude_current_page();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function owlride_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function my_remove_post_type_support()\n{\n\tremove_post_type_support('page', 'editor');\n\tremove_post_type_support('post', 'editor');\n\tremove_post_type_support('companies', 'editor');\n\tremove_post_type_support('group_of_companies', 'editor');\n}", "function wmf_undo_redirect_template_changes_in_admin() {\n\tremove_filter( 'page_link', 'wmf_skip_redirect_template_in_page_link' );\n\tremove_filter( 'the_title', 'wmf_skip_redirect_template_in_title' );\n}", "private function setUserNag()\n {\n $currentUser = wp_get_current_user();\n if (isset($_GET['AssignmentAttachmentIgnoreNag']) && '1' == $_GET['AssignmentAttachmentIgnoreNag'] && current_user_can('install_plugins')){\n update_user_meta($currentUser->ID, 'AssignmentAttachmentIgnoreNag', 'true', true);\n }\n }", "function ngng_remove_revslider_metabox_page_headers() {\n\tremove_meta_box( 'mymetabox_revslider_0', 'page_header', 'normal' );\n}", "public function generatePage_postProcessing() {}", "function ithi_exclude_pages($query) {\n if ($query->is_search) {\n $query->set('post_type', 'post');\n }\n return $query;\n}", "function disable_author_page() {\n\tglobal $wp_query;\n\n\tif ( is_author() ) {\n\t\t$wp_query->set_404();\n\t\tstatus_header(404);\n\t\t// Redirect to homepage\n\t\t// wp_redirect(get_option('home'));\n\t}\n}", "function clix_uppe_save_postdata( $post_id ){\r\n \t// use nonces to ensure the values came from our own edit screen.\r\n\tif ( !wp_verify_nonce( $_POST['clix_uppe_nonce'], plugin_basename(__FILE__) ) ){\r\n\t\treturn $post_id;\r\n\t\t}\r\n\t// see if this is a page, if so then get out.\r\n\tif( 'page'==$_POST['post_type'] ){\r\n \treturn $post_id;\r\n \t\t}\r\n\t// check to see if the current user has edit authority.\r\n \telseif( !current_user_can( 'edit_post',$post_id ) ){\r\n \treturn $post_id;\r\n \t\t}\r\n\r\n \t// It makes no sense to have both of these set, because disable_unlesslogin will always override.\r\n\tif( !empty( $_POST[_clix_uppe_disable_unlesslogin] ) && !empty( $_POST[_clix_uppe_disable_unlessshow] ) ){\r\n\t\tunset( $_POST[_clix_uppe_disable_unlessshow] );\r\n\t\t}\r\n\r\n \t// all the option fields we are checking...\r\n\t$fields=array(\r\n\t\t'disable_home',\r\n\t\t'disable_tag',\r\n\t\t'disable_archive',\r\n\t\t'disable_search',\r\n\t\t'disable_unlesslogin',\r\n\t\t'disable_unlessshow'\r\n\t\t);\r\n\r\n\t// update/create or remove post_meta data for the specific exclusion specified by the author.\r\n\tforeach($fields as $field){\r\n \t \tif( !empty($_POST['_clix_uppe_'.$field]) ){\r\n\t\t\tupdate_post_meta( $post_id, \"_clix_uppe_$field\", '1' );\r\n\t \t\t}\r\n\t \telse{\r\n\t\t\tdelete_post_meta( $post_id, \"_clix_uppe_$field\" );\r\n\t \t\t}\r\n\t\t}\r\n\treturn true;\r\n}", "function ks_disable_post_archives($query){\n if ((!is_front_page() && is_home()) || is_category() || is_tag() || is_author() || is_date()) {\n global $wp_query;\n $wp_query->set_404();\n status_header(404);\n nocache_headers();\n }\n}", "function wpcom_vip_disable_sharing_resources() {\n\t_wpcom_vip_call_on_hook_or_execute( function() {\n\t\tadd_filter( 'sharing_js', '__return_false' );\n\t\tremove_action( 'wp_head', 'sharing_add_header', 1 );\n\t}, 'init', 99 );\n}", "function remove_dashboard_meta() {\nremove_meta_box( ‘dashboard_incoming_links’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_plugins’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_primary’, ‘dashboard’, ‘side’ );\nremove_meta_box( ‘dashboard_secondary’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_quick_press’, ‘dashboard’, ‘side’ );\nremove_meta_box( ‘dashboard_recent_drafts’, ‘dashboard’, ‘side’ );\nremove_meta_box( ‘dashboard_recent_comments’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’);//since 3.8\n}", "function theme_remove_admin_bar() {\r\n\treturn false;\r\n}", "function tm_pf_reset_like(){\n\t$screen = get_current_screen();\n\tif ( $screen->post_type == 'portfolio' && isset($_GET['action']) && $_GET['action']=='edit' && !isset($_GET['taxonomy']) ){\n\t\tglobal $post;\n\t\t$postID = $_GET['post'];\n\t\t$resetVal = get_post_meta($postID, '_thememount_portfolio_like_pflikereset' ,true );\n\t\tif( $resetVal=='on' ){\n\t\t\t// Do reset processs now\n\t\t\tupdate_post_meta($postID, 'thememount_likes' , '0' ); // Setting ZERO\n\t\t\tupdate_post_meta($postID, '_thememount_portfolio_like_pflikereset' ,'' ); // Removing checkbox\n\t\t}\n\t}\n\t\n}", "function disable_gutenberg( $can_edit, $post_type ) {\n\tif( ! ( is_admin() && !empty( $_GET['post'] ) ) ) {\n return $can_edit;\n }\n\n\tif( $_GET['post'] == get_option( 'page_on_front' ) ) {\n $can_edit = false;\n }\n\treturn $can_edit;\n}", "function briavers_remove_post_type_support() {\n // remove_post_type_support( 'sleep', 'title' );\n remove_post_type_support( 'sleep', 'editor' );\n }", "public function render_metabox_hide_fields_for_page($post){\n\n\t\twp_nonce_field('post_metabox_hide_fields_for_page', 'post_metabox_hide_fields_for_page_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function TS_VCSC_RemoveMetaBoxesPostTypeGlobal() {\r\n\t\t\tforeach ($this->TS_VCSC_PostTypeMenuNames_Default as $key => $value) {\r\n\t\t\t\tif (post_type_exists($key)) {\r\n\t\t\t\t\t$this->TS_VCSC_RemoveMetaBoxesPostTypeSingle($key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function remove_author_publish_cap(){\n\t// access author class instance\n\t$author = get_role( 'author' );\n\t// set publish_post capability to false\n\t$author->add_cap( 'publish_posts', false );\n}", "public function hooks() {\n\t\t\\add_filter( 'the_generator', '__return_false' );\n\t\t\\remove_action('wp_head', 'wp_generator');\n\t}", "function cmk_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); // disable Simple:Press dashboard widget\n remove_meta_box('sf_announce', 'dashboard', 'normal');\n}", "function swm_remove_divi_viewport_meta() {\n\tremove_action( 'wp_head', 'et_add_viewport_meta' );\n}", "function sc_hide_editor() {\n\t// Get the Post ID\n\tif( isset( $_GET['post'] ) ) $post_id = $_GET['post'];\n\telseif( isset( $_POST['post_ID'] ) ) $post_id = $_POST['post_ID'];\n\tif( !isset( $post_id ) ) return;\n\n\t// Get the Page Template\n\t$template_file = get_post_meta($post_id, '_wp_page_template', TRUE);\n \n if( 'template-schedule.php' == $template_file || 'template-speakers.php' == $template_file )\n \techo '<style>#postdivrich{display: none;}</style>';\n}", "function _wp_posts_page_notice()\n {\n }", "function e9_interiors_nopagination ($query) {\n if (is_post_type_archive('e9_interior')) {\n $query->set('nopaging', 1);\n }\n}", "public function plugin_deactivate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "public function plugin_deactivate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "function admin_disable_dashboard_widgets() {\n // remove_meta_box('dashboard_right_now', 'dashboard', 'normal');// Remove \"At a Glance\"\n // remove_meta_box('dashboard_activity', 'dashboard', 'normal');// Remove \"Activity\" which includes \"Recent Comments\"\n // remove_meta_box('dashboard_quick_press', 'dashboard', 'side');// Remove Quick Draft\n remove_meta_box('dashboard_primary', 'dashboard', 'core');// Remove WordPress Events and News\n}", "public static function remove_head_meta() {\r\n if (!is_admin()):\r\n remove_action('wp_head', 'rsd_link');\r\n remove_action('wp_head', 'wp_generator');\r\n //remove_action('wp_head', 'feed_links', 2);\r\n remove_action('wp_head', 'index_rel_link');\r\n remove_action('wp_head', 'wlwmanifest_link');\r\n remove_action('wp_head', 'feed_links_extra', 3);\r\n remove_action('wp_head', 'start_post_rel_link', 10, 0);\r\n remove_action('wp_head', 'parent_post_rel_link', 10, 0);\r\n remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);\r\n endif;\r\n }", "private function disableTopPageUpdate(): void\n {\n /** @var DataExtension $extension */\n $extension = singleton(DataExtension::class);\n $extension->disableTopPageUpdate();\n }", "public function deletePostMeta() {\n delete_post_meta($this->id, $this->_post_meta_name);\n }", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "function remove_yoast_acesso_camera() {\r\n remove_meta_box( 'wpseo_meta' , 'acesso_camera' , 'normal' ); \r\n}", "function disable_default_dashboard_widgets() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'core');\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'core');\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'core');\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'core');\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}" ]
[ "0.66883796", "0.6576502", "0.65356094", "0.63084507", "0.6219939", "0.62009853", "0.61779034", "0.6133651", "0.610209", "0.6045825", "0.6035358", "0.60270786", "0.60161924", "0.60146725", "0.60054636", "0.6002945", "0.59766525", "0.5958209", "0.59444606", "0.5912538", "0.5901426", "0.58879006", "0.5866481", "0.5847225", "0.58302075", "0.5819685", "0.58154684", "0.5798465", "0.5793325", "0.5783135", "0.577466", "0.5772218", "0.5772218", "0.57613826", "0.57581514", "0.5733699", "0.5723198", "0.5702077", "0.5693555", "0.5685683", "0.5665913", "0.56612456", "0.5654255", "0.56231135", "0.56189936", "0.5602589", "0.5595111", "0.55856407", "0.55273825", "0.5525746", "0.5518269", "0.55172104", "0.5508097", "0.5505656", "0.5502571", "0.54961073", "0.54885405", "0.54540503", "0.5449171", "0.5440285", "0.54363906", "0.5433343", "0.54278636", "0.5425019", "0.5421016", "0.541777", "0.54073244", "0.53888774", "0.5385646", "0.5384413", "0.53841597", "0.5370904", "0.536413", "0.5361361", "0.53487855", "0.53479815", "0.53457475", "0.53444856", "0.53357273", "0.53334785", "0.5332008", "0.53259313", "0.5317029", "0.5315716", "0.52971", "0.5296301", "0.52924013", "0.5290884", "0.5286709", "0.52790153", "0.5269093", "0.5243208", "0.5243208", "0.5241699", "0.5237543", "0.5237046", "0.5235815", "0.52285963", "0.52262723", "0.5222087" ]
0.5416802
66
/ This action is for AJAX request. It is update role to user
public function actionUserRole () { $userClass = $this->module->modelUser; $post = Yii::$app->request->post(); $user = $userClass::findOne($post[ 'id' ]); if (!is_null($user)) { LogManager::info(Yii::tr('Пользователю {user} забрали права {roles}', [ 'user' => Html::a($user->name, Url::toRoute([ 'user/view', 'id' => $user->id ])), 'roles' => implode(',', $user->getRolesNames()) ])); $user->revokeAllRoles(); if (is_array($post[ 'roles' ])) { foreach ($post[ 'roles' ] as $item) { $user->assignRole($item); } LogManager::info(Yii::tr('Пользователю {user} добавили права {roles}', [ 'user' => Html::a($user->name, Url::toRoute([ 'user/view', 'id' => $user->id ])), 'roles' => implode(',', $post[ 'roles' ]) ])); } } Yii::$app->end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateRole()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $roleId = $this->input->post('id');\n $permission = $this->input->post('permission');\n\n $result = $this->user_model->getRoleById($roleId);\n $roleInfo=$result;\n $roleInfo->permission = $permission;\n $result = $this->user_model->updateRole($roleInfo, $roleId);\n\n if ($result == true) {\n $this->session->set_flashdata('success', '用户更新成功.');\n echo(json_encode(array('status' => TRUE)));\n } else {\n $this->session->set_flashdata('error', '用户更新失败.');\n echo(json_encode(array('status' => FALSE)));\n }\n\n //redirect('roleListing');\n\n }\n }", "public function testUpdateRole()\n {\n }", "public function testUpdateRole()\n {\n }", "public function executeUpdate()\n {\n if (!$this->getRequestParameter('id'))\n {\n $role = new Role();\n }\n else\n {\n $role = RolePeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($role);\n }\n\n $role->setDisplay($this->getRequestParameter('display', ' '));\n $role->setXml($this->getRequestParameter('xml', ' '));\n $role->setCod($this->getRequestParameter('cod', ' '));\n\n $langs = sfConfig::get('app_lang_array', array('es'));\n foreach($langs as $lang){\n $role->setCulture($lang);\n $role->setName($this->getRequestParameter('name_'. $lang, ' '));\n $role->setText($this->getRequestParameter('text_'. $lang, ' '));\n }\n\n try{\n $role->save();\n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Metadatos del rol actualizados.\"));\n }catch(Exception $e){\n $this->msg_alert = array('error', $this->getContext()->getI18N()->__(\"Código de rol repetido.\"));\n }\n \n $this->getUser()->setAttribute('id', $role->getId(), 'tv_admin/role');\n\n return $this->renderComponent('roles', 'list');\n }", "public static function update_roles_via_ajax()\n\t\t{\n\t\t\tdo_action('ws_plugin__s2member_before_update_roles_via_ajax', get_defined_vars());\n\n\t\t\tstatus_header(200); // Send a 200 OK status header.\n\t\t\theader('Content-Type: text/plain; charset=UTF-8'); // Content-Type with UTF-8.\n\t\t\twhile(@ob_end_clean()) ; // Clean any existing output buffers.\n\n\t\t\tif(current_user_can('create_users')) // Check privileges. Ability to create Users?\n\n\t\t\t\tif(!empty($_POST['ws_plugin__s2member_update_roles_via_ajax']))\n\t\t\t\t\tif(($nonce = $_POST['ws_plugin__s2member_update_roles_via_ajax']))\n\t\t\t\t\t\tif(wp_verify_nonce($nonce, 'ws-plugin--s2member-update-roles-via-ajax'))\n\n\t\t\t\t\t\t\tif(!apply_filters('ws_plugin__s2member_lock_roles_caps', FALSE))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_roles_caps::config_roles();\n\t\t\t\t\t\t\t\t$success = TRUE; // Roles updated.\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse // Else flag as having been locked here.\n\t\t\t\t\t\t\t\t$locked = TRUE;\n\n\t\t\texit(apply_filters('ws_plugin__s2member_update_roles_via_ajax', // Also handle ``$locked`` here.\n\t\t\t\t((isset($success) && $success) ? '1' : ((isset($locked) && $locked) ? 'l' : '0')), get_defined_vars()));\n\t\t}", "public function actionUpdateRole()\n {\n $request = Yii::$app->request;\n\n if (! $request->isPost) {\n return $this->redirect(['index']);\n }\n\n $roleListName = $request->post('roleListName');\n $page = $request->post('page') ? $request->post('page') : 1;\n $user = $this->findModel((int)$request->post('id'));\n if (empty($roleListName)) {\n $this->showMessage(self::WARNING_ROLE_USER, 'warning');\n\n return $this->redirect(array_merge(['index'], ['page' => $page]));\n }\n\n if (! $user || ! Yii::$app->authManager->updateRoleListByUser($roleListName, $user)) {\n Yii::$app->getSession()->setFlash('error', Yii::t('app', 'Error update role.'));\n }\n\n return $this->redirect(array_merge(['index'], ['page' => $page]));\n }", "public function actionUpdate()\n {\n $bodyRaw = json_decode(Yii::$app->getRequest()->getRawBody(), true);\n //$body = json_decode(Yii::$app->getRequest()->getBodyParams(), true);\n\n if (is_array($bodyRaw)) {\n // check user is a guest\n if (array_key_exists('token', $bodyRaw)) {\n $userByToken = \\Yii::$app->user->loginByAccessToken($bodyRaw['token']);\n if (empty($userByToken)) {\n //return $this->goHome();\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n } else {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n\n // Get array with user Roles\n $userRole =[];\n $userAssigned = Yii::$app->authManager->getAssignments($userByToken->id);\n foreach($userAssigned as $userAssign){\n array_push($userRole, $userAssign->roleName);\n }\n //return Json::encode(array('method' => 'GET', 'status' => 1, 'type' => 'error', 'message' => $userRole));\n\n // Check rights\n // If user have create right that his allowed to other actions to the Spacialization table\n if (static::CHECK_RIGHTS_RBAC && !\\Yii::$app->user->can('createCustomer') && !\\Yii::$app->user->can('createMediator')) {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию обновления'));\n }\n /*\n $flagRights = false;\n foreach(array('admin', 'customer', 'contractor') as $value) {\n if (in_array($value, $userRole)) {\n $flagRights = true;\n }\n }\n if (!$flagRights) return Json::encode(array('method' => 'POST', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию добавления'));\n */\n\n // Because the field names may match within a single query, the parameter names may not match the table field names. To solve this problem let's create an associative arrays\n $arrayFeedbackAssoc = array ('id' => 'id', 'profile_id' => 'profile_id', 'status_feedback_id' => 'status_feedback_id', 'content' => 'content');\n\n if (array_key_exists($arrayFeedbackAssoc['id'], $bodyRaw)) {\n // check id parametr\n if (!preg_match(\"/^[0-9]*$/\",$bodyRaw[$arrayFeedbackAssoc['id']])) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: id'));\n }\n\n // Search record by id in the database \n if (in_array('admin', $userRole)) {\n $queryFeedback = Feedback::find()->where(['id' => $bodyRaw[$arrayFeedbackAssoc['id']]]); // get all records\n } else {\n $queryFeedback = Feedback::find()->where(['AND', ['id' => $bodyRaw[$arrayFeedbackAssoc['id']]], ['created_by'=> $userByToken->id]]); // get records created by this user\n }\n $modelFeedback = $queryFeedback->one();\n\n if (empty($modelFeedback)) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: В БД не найден Отзыв по id'));\n }\n\n foreach ($arrayFeedbackAssoc as $nameFeedbackAssoc => $valueFeedbackAssoc) {\n if (array_key_exists($valueFeedbackAssoc, $bodyRaw)) {\n if ($modelFeedback->hasAttribute($nameFeedbackAssoc)) {\n $modelFeedback->$nameFeedbackAssoc = $bodyRaw[$arrayFeedbackAssoc[$nameFeedbackAssoc]];\n if (!$modelFeedback->validate($nameFeedbackAssoc)) return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: параметр '.$valueRequestAssoc));\n\n $modelFeedback->created_by = $userByToken->id;\n $modelFeedback->updated_at = time();\n }\n }\n }\n\n // Save Feedback object\n if ($modelFeedback->validate()) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n $flagFeedback = $modelFeedback->save(false); // update Feedback table\n\n if ($flagFeedback) {\n $transaction->commit();\n } else {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } catch (Exception $ex) {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации'));\n }\n\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 0, 'type' => 'success', 'message' => 'Отзыв успешно сохранен'));\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Отсутствет id параметр в запросе'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Тело запроса не обработано'));\n }\n }", "public function updateRolesAction(){\n \n $isInvalid = false;\n $request = $this->getRequest();\n \n if($request->id) {\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findOneById';\n \n $role = $this->em->getRepository($entity)->$repositoryFunction($request->id);\n \n // TODO Zend_Form - scheint mir ein wneig durcheinander\n if($role !== null) {\n \n $form = new Admin_Model_Forms_RolesForm($this->em);\n $form->getElement('submit')->setLabel('Update Role');\n \n if($request->isPost()) {\n if($form->isValid($request->getParams())) {\n $role->name = $request->name;\n \n if($request->parentRole)\n $role->parent = $this->em->getReference('Jbig3\\Entity\\RolesEntity',\n $request->parentRole);\n \n $this->em->persist($role);\n $this->em->flush();\n \n // TODO Masseges\n $this->_helper->messenger('success', \n sprintf(Zend_Registry::get('config')->messages->role->update, \n $request->name));\n return $this->_redirect('/admin/role');\n } else {\n $this->view->errors = $form->getErrors();\n }\n }\n $formData['name'] = $role->name;\n if($role->parent !== null) {\n \n $formData['parentRole'] = $role->parent->id;\n }\n \n $form->populate($formData);\n $this->view->form = $form;\n } else {\n $isInvalid = true;\n }\n } else {\n $isInvalid = true;\n }\n \n // TODO Massege\n if($isInvalid) {\n $this->_helper->messenger('error', \n Zend_Registry::get('config')->messages->role->invalid);\n return $this->_redirect('/admin/role');\n }\n }", "public function actionRole()\n {\n foreach (USER::getRoleOptions() as $key => $val) {\n\n self::log(\"\\n\" . $val . ' Role-id is ' . $key . \"\\n\");\n }\n\n if (is_null($this->email)) {\n\n self::log('Email required ! (Hint -e=)');\n\n return ExitCode::DATAERR;\n }\n\n $model = User::findOne([\n 'email' => $this->email\n ]);\n\n if (is_null($model)) {\n\n self::log('User not found');\n\n return ExitCode::NOUSER;\n }\n\n if (is_null($this->role_id)) {\n\n self::log('Current Role Id is ' . $model->role_id . \"\\n\");\n self::log('Add correct Role id (Hint -r=)');\n\n return ExitCode::DATAERR;\n }\n\n if (is_null(ArrayHelper::getValue(USER::getRoleOptions(), $this->role_id))) {\n\n self::log('Please enter correct role id :');\n\n return ExitCode::DATAERR;\n }\n\n $model->role_id = $this->role_id;\n\n if (! $model->save()) {\n\n self::log('Please enter valid Role Id ');\n\n return ExitCode::DATAERR;\n }\n\n self::log($this->email . ' = Role Id successfully Updated !');\n\n return ExitCode::OK;\n }", "public function update_user_role(Request $request) {\n $user = User::find($request->member_id);\n if((string)$request->new_value == '1') {\n $user->roles()->attach($request->role_id);\n return $user->first_name . ' ' . $user->last_name . ' now has new role (' . $request->role_id . ')';\n }\n else {\n $user->roles()->detach($request->role_id);\n return $user->first_name . ' ' . $user->last_name . ' no longer has role role (' . $request->role_id . ')';\n }\n }", "function updateUser($userID, $role)\n{\n}", "public function actionUpdate($id)\n {\n Url::remember('', 'actions-redirect');\n $user = $this->findModel($id);\n // var_dump($user);die;\n $user->scenario = 'update';\n \n $session = Yii::$app->session;\n $company=$session->get('user.company');\n\t\t\n \n $commonCode=new \\common\\models\\CommonCode();\n \n $userPermission= json_decode($session->get('userPermission'));\n\t\t$company_id = $userPermission->company_id;\n $roles=$userPermission->roles;\n $roleId=$this->getUserPermissionRoleId($roles);\n $ownupdate=0;\n if($userPermission->isSystemAdmin)\n {\n \n $roleObj = \\backend\\models\\Roles::find()->where([\"is_superadmin\"=>1])->asArray()->all(); \n $user->is_superadmin=1;\n \n \n }else if($userPermission->isSuperAdmin) \n {\n if($id==$userPermission->user_id)\n {\n $roleObj = \\backend\\models\\Roles::find()->where([\"company_id\"=>$company_id,\"id\"=>$roleId])->asArray()->all(); \n \n $ownupdate=1;\n }\n else\n {\n $roleObj = \\backend\\models\\Roles::find()->where([\"company_id\"=>$company_id,\"is_superadmin\"=>0])->asArray()->all(); \n }\n \n \n }else{\n \n if($commonCode->canAccess(\"user-create\") || $commonCode->canAccess(\"user-update\"))\n {\n if($id==$userPermission->user_id)\n {\n $ownupdate=1;\n }\n $roleObj = \\backend\\models\\Roles::find()->where([\"company_id\"=>$company['id'],\"is_superadmin\"=>0])->asArray()->all();\n \n }else\n {\n \n $roleObj = \\backend\\models\\Roles::find()->where([\"company_id\"=>$company['id'],\"id\"=>$roleId])->asArray()->all(); \n \n \n }\n }\n $roleArray = ArrayHelper::map($roleObj, 'id', 'role_name'); \n if($userPermission->isSystemAdmin)\n {\n if($id==$userPermission->user_id)\n {\n \n $companyObj = \\backend\\models\\CompanyMaster::find()->where([\"=\",\"id\",$company['id']])->asArray()->all();\n \n }\n else{\n \n $companyObj = \\backend\\models\\CompanyMaster::find()->where([\"!=\",\"id\",$company['id']])->asArray()->all();\n }\n \n }else{\n \n $companyObj = \\backend\\models\\CompanyMaster::find()->where([\"id\"=>$company['id']])->asArray()->all();\n }\n \n $companyArray = ArrayHelper::map($companyObj, 'id', 'company_code'); \n \n if(isset($param['User']['company_id']))\n {\n $user->company_id=$param['User']['company_id'];\n }else{\n \n $user->company_id=$user->getUserCompany($id);\n }\n\n $this->performAjaxValidation($user);\n \n $param=Yii::$app->request->post();\n $rarray=$selectedRoleArray= $user->getUserRole($id);\n if(isset($param['selectItemUser']['role_id']))\n {\n $selectedRoleArray=implode(\",\",$param['selectItemUser']['role_id']); \n \n }\n \n $userdbrole=$user->getDBRole($id);\n \n \n if($userdbrole)\n $dbRole=explode(\",\",$userdbrole);\n\n if ($user->load(Yii::$app->request->post()) && $user->save()) \n {\n $user->company_id=$param['User']['company_id'];\n if(isset($param['selectItemUser']['role_id']))\n {\n if($param['selectItemUser']['role_id']!=explode(\",\",$rarray))\n {\n $auth = Yii::$app->authManager;\n $userroledelete=$user->deleteuserrole($id);\n $userrole=$auth->getRolesByUser($id);\n\n if(isset($param['selectItemUser']['role_id']))\n {\n $roles=$param['selectItemUser']['role_id'];\n foreach($roles as $role)\n {\n $userrole=new \\backend\\models\\UserRoles(); \n $userrole->role_id=$role;\n $userrole->user_id=$user->id; \n $userrole->save();\n }\n\n //assign permission to user\n $rolepermission=$user->UpdateRolePermission($user->id,$param['selectItemUser']['role_id'],$userdbrole);\n\n\n\n }else{\n\n $user->addError(\"role_id\",\"please select role\");\n return $this->render('_account', [\n 'user' => $user,\n 'roleArray'=>$roleArray,\n 'companyArray'=>$companyArray,\n \"selectedRoleArray\"=>$selectedRoleArray,\n 'ownupdate'=>$ownupdate\n ]); \n }\n }\n \n }else{\n \n $user->addError(\"role_id\",\"please select role\");\n return $this->render('_account', [\n 'user' => $user,\n 'roleArray'=>$roleArray,\n 'companyArray'=>$companyArray,\n \"selectedRoleArray\"=>$selectedRoleArray,\n 'ownupdate'=>$ownupdate]);\n }\n $user->updateUserCompany($id,$user->company_id);\n \n Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Account details have been updated'));\n\n return $this->refresh();\n }\n\n return $this->render('_account', [\n 'user' => $user,\n 'roleArray'=>$roleArray,\n 'companyArray'=>$companyArray,\n \"selectedRoleArray\"=>$selectedRoleArray,\n 'ownupdate'=>$ownupdate\n ]);\n }", "public function update(Request $request, Role $role)\n {\n\n $id =$role->id;\n $validated = $request->validate([\n 'name' => \"required|unique:roles,name,$id\",\n ]);\n\n $role->update($request->except('permissions'));\n $permissions = $request->input('permissions') ? $request->input('permissions') : [];\n\n if($request->ajax()){\n $permissions = explode(',', $permissions);\n $role->givePermissionTo($permissions);\n // If request from AJAX\n return [\n 'success' => true,\n 'redirect' => route('roles.index'),\n ];\n } else {\n $role->givePermissionTo($permissions);\n return redirect()->route('roles.index');\n }\n }", "public function update(Request $request, UserRole $userRole)\n {\n //\n }", "public function setRole(Request $request)\n {\n $user = auth()->user();\n $role = $request->get('role');\n\n if($role!='admin' && !$user->isAdmin())\n {\n $role_id = User::getRoleIdBySlug($role);\n $user->update(['role_id' => $role_id]);\n }\n\n $user->load(['account','channel']);\n\n UserResource::withoutWrapping();\n\n return response()->json([\n 'data' => new UserResource($user),\n 'message' => trans('api/user.successfully_updated')\n ]);\n }", "public function update(Request $request,Role $role)\n {\n \n }", "public function updateUserRole()\r\n{\r\n $query_string = \"UPDATE users \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"role = :role \";\r\n $query_string .= \"WHERE userid = :userid\";\r\n\r\n return $query_string;\r\n}", "public function UpdateRole($data)\n {\n $sql = \"UPDATE USER SET role=? WHERE rowid=?\";\n $resutl = $this->getDb()->fetchAssoc($sql, array($data['role'], $data['id']));\n return $resutl;\n }", "public function update(Request $request, $id)\n {\n DB::beginTransaction();\n try {\n $authId= authId();\n $resultRoleUser= role($authId,1);\n if($resultRoleUser==true){\n $User= User::where(['id'=>$id])->first(); \n $User->name=$request->name;\n $User->email=$request->email;\n $User->phoneNo=$request->phoneNo;\n $User->password=bcrypt($request->password);\n $User->address=$request->address;\n $User->role_id=3;\n $User->save();\n DB::commit();\n return \\response()->json([\n 'message'=>'updated successfully',\n 'status'=>200\n ]);\n }else{\n return \\response()->json([\n 'data'=>'you cannt enter here , because you havent auth admin',\n 'status'=>401\n ]);\n } \n } catch (Throwable $err) {\n DB::rollback();\n return \\response()->json($err, 500);\n }\n }", "public function update(): void\n {\n abort_if(Gate::denies('roleUpdate'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $this->validate([\n 'title' => [\n 'required',\n 'string',\n 'max:100',\n Rule::unique('App\\Models\\Role', 'title')->ignore($this->dataId)->where(function ($query) {\n return $query->whereNull('deleted_at');\n }),\n function ($attribute, $value, $fail) {\n // check unique case sensitive\n $data = Role::where('id', '<>', $this->dataId)->whereRaw('LOWER(title) = ?', [Str::lower($value)])->first();\n if ($data) {\n $fail('The ' . $attribute . ' has already been taken.');\n }\n }\n ],\n 'detail' => [\n 'nullable',\n 'string',\n 'max:200',\n ],\n ]);\n\n $data = Role::find($this->dataId);\n $data->title = $this->title;\n $data->detail = $this->detail;\n $data->save();\n\n $data->permissions()->sync($this->permissionId);\n\n session()->flash('message', 'data updated successfully.');\n\n $this->updateModal = false;\n $this->resetInputFields();\n\n $this->emit('showMessage');\n $this->emit('refreshDatatable');\n }", "function update()\n\t{\n\t\t// response array\n\t\t$jsonData = array('success' => false, 'check' => false, 'errors' => array());\n\t\t\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_rules('role_name', 'Name', 'required');\n\t\tif ($this->form_validation->run()) {\n\t\t\t// if form validation successfull\n\t\t\t$jsonData['check'] = true;\n\t\t\t$data = array(\n\t\t\t\t'role_name' => $this->input->post('role_name'),\n\t\t\t\t'role_creator' => $this->user_id,\n\t\t\t);\n\t\t\t$role_id = $this->input->post('role_id');\n\n\t\t\t$result = $this->role_model->update($data, $role_id);\n\n\t\t\t// if data updated make success true\n\t\t\tif ($result) {\n\t\t\t\t$jsonData['success'] = true;\n\t\t\t}\n\t\t}else {\n\t\t\t// return formvalidation errors\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$jsonData['errors'][$key] = form_error($key);\n\t\t\t}\n\t\t}\n\n\t\t// send response to clint\n\t\techo json_encode($jsonData);\n\t}", "public function update($id)\n\t{\n $role = Roles::find($id);\n\n //udating password\n if(Input::has(\"role\")){\n\n $role->role = Input::get(\"role\");\n $role->save();\n $updatedrole = $role->role;\n }else{}\n\n Logs::create(array(\n \"user_id\"=> Auth::user()->id,\n \"action\" =>\"Update role named \".$updatedrole\n ));\n return \"<h4 class='text-success'>Role Updated Successfull</h4>\";\n\t}", "public function update(Request $request, rbacRoleUser $rbacRoleUser)\n {\n //\n }", "public function update(Request $request, User $user){\n $user->roles()->sync($request->roles);\n return redirect()->route('admin.users.index');\n}", "public function update(Request $request, $id)\n {\n if(is_null($this->user) || !$this->user->can('admin.edit')){\n abort(403,\"The User Cant Access this Page\");\n }\n$user = Admin::find($id);\n $validateData=$request->validate([\n\n 'name' =>'required|max:100',\n 'email' =>'required|max:100|email|unique:admins,email,' .$id,\n 'password' =>'nullable|min:6|confirmed'\n ],\n [\n 'name.required' =>'Please Enter Your Name',\n 'email.required' =>'Please Enter Your Email',\n 'email.unique' =>'Email Already Exists',\n ]\n );\n\n$user->name=$request->name;\n$user->username=$request->username;\n$user->email=$request->email;\nif($request->password){\n\n $user->password=Hash::make($request->password);\n}\n$user->save();\n$user->roles()->detach();\nif($request->roles){\n $user->assignRole($request->roles);\n}\n return back()->with('success','Admin Updated Successfully !');\n\n\n\n }", "public function adminUser(Request $request)\n {\n if (Auth::user()->role_id == 1) {\n $user = Users::findOrFail($request->input('user_id'));\n //нельзя снять права админа с самого себя и юзера с id = 1\n if (!((Auth::user()->id == $user->id) || ($user->id == 1))) {\n $user->role_id = $request->input('action');\n $user->save();\n $data = array( 'text' => 'success' );\n } else {\n $data = array( 'text' => 'fail' . $request->input('action') );\n }\n } else {\n $data = array( 'text' => 'fail' . $request->input('action') );\n }\n return Response::json($data);\n }", "public function update($id)\n {\n $user = User::findOrfail($id);\n $user->role = 1;\n $user->save();\n Session::flash('status_updated_role_user', 'Le role modifié avec succès.');\n return redirect()->route('admin');\n }", "public function update(Request $request, $id)\n {\n DB::beginTransaction();\n try {\n\n $authId= authId();\n $resultRoleAdmin= role($authId,3);\n if($resultRoleAdmin==true){\n $User= User::where(['id'=>$id])->first();\n if(!empty($User)){\n $User->email=$request->email;\n $User->name=$request->name;\n $User->phoneNo=$request->phoneNo;\n $User->password=$request->password;\n $User->address=$request->address;\n $User->role_id=3;\n $User->save();\n DB::commit();\n return \\response()->json([\n 'message'=>'updated successfully',\n 'status'=>200\n ]);\n \n \n }else{\n return \\response()->json([\n 'data'=>'there is no data',\n 'status'=>404\n ]);\n }\n }else{\n return \\response()->json([\n 'data'=>'you cannt enter here , because you havent auth admin',\n 'status'=>401\n ]);\n }\n\n } catch (Throwable $err) {\n DB::rollback();\n return \\response()->json($err, 500);\n }\n }", "public function update(Request $request, $id)\n {\n $s= session_n_role_chk();\n $this->validate($request,[\n 'name' => 'required|max:255',\n ]);\n //-------------------------\n $roled = role::find($id);\n $roled->name = $request->input('name');\n //for update in table\n $roled->save();\n return redirect('/admin/role')->with('completed', 'Role has been updated');\n \n //----------------------\n }", "function status()\n {\n if(!$this->session->userdata['userData']['session_user_id']){\n redirect('users/login');\n }\n\n $this->session->unset_userdata('active_menu');\n $this->session->set_userdata('active_menu', 'roles');\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $role_id = $this->input->post('id');\n\n\n $role_data = $this->user_mod->get_role_by_id($role_id);\n $title = $role_data->name;\n\n if ($this->input->post('s') == 1) {\n $status = 0;\n $_POST['data']['status'] = $status;\n $status_result = 0;\n } else {\n $status = 1;\n $_POST['data']['status'] = $status;\n $status_result = 1;\n }\n\n $update = $this->user_mod->update_role($_POST['data'], $role_id);\n\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: ' . date('r', time() + (86400 * 365)));\n header('Content-type: application/json');\n\n echo json_encode(array(\n 'valid' => true,\n 'success_message' => $status_result,\n 'title' => $title\n ));\n exit();\n }\n }", "public function editAction()\n {\n // try to get the role\n $role = $this->_checkRoleExists($this->getRequest()->getParam('id'));\n \n $this->view->layout()->title = $this->view->t(\n 'Edit role <em>%s</em>', $role->name\n );\n \n // get the form\n $form = $this->_model->getRoleForm($role);\n $form->setAction($this->view->url());\n $this->view->form = $form;\n \n // Post?\n if (!$this->_request->isPost()) {\n return;\n }\n \n // Validate the form\n $isValid = $form->isValid($this->_request->getPost());\n \n // Check if cancel not clicked\n if($form->getElement('cancel')->isChecked()) {\n $this->_goToOverview();\n return;\n }\n \n // Has errors?\n if(!$isValid) {\n return;\n }\n \n // update the role in the DB\n $role = $this->_model->saveRoleForm($form);\n if(!$role) {\n $this->_messenger->addError($this->view->t(\n 'There was a problem saving the role, try again or contact platform administrator.'\n ));\n return;\n }\n \n // we created the role\n $this->_messenger->addSuccess($this->view->t(\n 'Role <strong>%s</strong> updated', $role->name\n ));\n \n $this->_goToOverview();\n }", "public function update(UpdateRoleRequest $request, $id)\n {\n $role = Role::find($id);\n if($role){\n $role->name = $request->name;\n $role->permission = $request->permission;\n $role->updated_at = date('Y-m-d H:i:s');\n\n if($role->save()){\n $res=array('status'=>\"200\",\"Message\"=>\"Cập nhật thông tin thành công\"); \n }else{\n $res=array('status'=>\"401\",\"Message\"=>\"Cập nhật thông tin không thành công!\"); \n }\n }\n echo json_encode($res);\n }", "public function actionUpdate($id)\n {\n // get role\n $role = Role::findOne(['user_id' => $id]);\n\n // get user details\n $user = $this->findModel($id);\n\n // only The Creator can update everyone`s roles\n // admin will not be able to update role of theCreator\n if (!Yii::$app->user->can('theCreator')) {\n if ($role->item_name === 'theCreator') {\n return $this->goHome();\n }\n }\n\n // load user data with role and validate them\n if (\n $user->load(Yii::$app->request->post()) &&\n $role->load(Yii::$app->request->post()) && Model::validateMultiple([$user, $role])\n ) {\n $user->setPassword($user->password);\n $user->generateAuthKey();\n $user->status = 10;\n $user->role_id = \"Admin\";\n $datetime = new DateTime();\n $timezone = new DateTimeZone('Asia/Tashkent');\n $datetime->setTimezone($timezone);\n $now_date = ($datetime->format('Y-m-d'));\n $password = ($_POST['User'][\"password\"]);\n $encrption = Password::findOne(['user_id' => $id]);\n if ($user->save()) {\n $role->user_id = $user->getId();\n $role->save();\n if ($password) {\n $key_id = $this->keyselecter(); // keyselecter method selects randomly and written bottom\n $key = Keys::findOne($key_id);\n $key = $key->key;\n $key = md5('defender' . $key);\n $encrption->password = rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $password, MCRYPT_MODE_ECB)));\n $encrption->key_id = $key_id;\n $encrption->save();\n }\n return $this->redirect('index');\n }\n } else {\n return $this->render('update', [\n 'user' => $user,\n 'role' => $role,\n ]);\n }\n }", "public function update(Request $request, Role $role)\n {\n if(Auth::user()->can('update-roles')){\n ActivityLogger::activity(\"Modification des informations du role ID:\".$role->id.'('.$role->name.') par l\\'utilisateur ID:'.Auth::id().'('.Auth::user()->name.')');\n $role->update($request->all());\n return redirect()->route(\"roles.index\")->with('success','Role modifié avec succès.');\n \n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }", "public function actionUpdate($id)\n {\n \n $model = $this->findModel($id);\n \n\n if (Yii::$app->request->isAjax) \n {\n if ($model->load(Yii::$app->request->post())) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return \\yii\\widgets\\ActiveForm::validate($model);\n } else {\n return $this->renderAjax('update', [\n 'model' => $model\n ]);\n }\n }\n else if ($model->load(Yii::$app->request->post())) \n {\n if($model->save())\n {\n $roleFind = AuthItem::findOne(['name' => \"$model->Role_Id\", 'type' => 1 ]);\n if(empty($roleFind))\n {\n $auth = new AuthItem();\n $auth->name = \"$model->Role_Id\";\n $auth->type = 1;\n $auth->description = $model->Role_Name;\n $auth->created_at = strtotime(date('Y-m-d H:i:s'));\n $auth->updated_at = strtotime(date('Y-m-d H:i:s'));\n if($auth->save())\n {\n Yii::$app->session->setFlash('success', $model->Role_Name . ' Role has been updated successfully!');\n }\n else\n {\n Yii::$app->session->setFlash('error', 'error occured during role update!');\n }\n }\n else\n {\n $auth = $roleFind;\n $auth->description = $model->Role_Name;\n $auth->updated_at = strtotime(date('Y-m-d H:i:s'));\n if($auth->save())\n {\n Yii::$app->session->setFlash('success', $model->Role_Name . ' Role has been updated successfully!');\n }\n else\n {\n Yii::$app->session->setFlash('error', 'error occured during role update!');\n }\n }\n \n } \n return $this->redirect(['index']);\n } else {\n Yii::$app->session->setFlash('error', \"The requested Item could not be found.\");\n return $this->redirect(['index']);\n }\n }", "public function putSelectRole()\n {\n $client = $this->getEActivitiesClientEnsureSignedIn();\n if ($client instanceof Response) {\n return $client;\n }\n\n $role_id = (int) Input::get('role_id');\n $roles = $client->getCurrentAndOtherRoles();\n\n if (isset($roles['others'][$role_id])) {\n $client->changeRole($role_id);\n $roles = $client->getCurrentAndOtherRoles();\n return Redirect::action('Admin\\UsersEActivitiesController@getRoles')\n ->with('success', 'Successfully changed role and society to '.$roles['current']);\n } else {\n return Redirect::action('Admin\\UsersEActivitiesController@getRoles')\n ->with('danger', 'Cannot change role');\n }\n }", "public function update(Request $request, $id)\n {\n $userToUpdate = User::find($id);\n $userToUpdate->role = $request->role;\n $userToUpdate->save();\n return redirect('/admin')->with('success','تم تعديل وظيفة '.$userToUpdate->name.' بنجاح');\n }", "function roleConfirmationAjax($param=null){\n\t\t// Checking whether parametres are nullor not\n\t\tif ($param != null) { \n\t\t\t$role = $param['role'];\n\t\t\t$user_id = $param['user_id'];\n\t\t\t$objResponse = new xajaxResponse();\n\t\t\t$status = ($role == TUTOR)? APPROVAL_STATUS_ID:ACTIVE_STATUS_ID;\n\t\t\t$changeRole = $this->user_model->changeUserRole($user_id,$role,$status);\n\t\t\tif($changeRole){\n\t\t\t\t$objResponse->script( \"window.location = '\".ROUTE_PROFILE.\"';\" );\n\t\t\t}\n\t\t}\n\t\treturn $objResponse;\n\t}", "public function toggleRole($request);", "public function actionUpdate()\n {\n\t\t/**\n\t\t * @author \t: ptrnov <[email protected]>\n\t\t * @since \t\t: 1.2\n\t\t * Subject\t\t: PERMISSION PER MODUL.\n\t\t * Metode\t\t: PUT (Update)\n\t\t * URL\t\t\t: http://production.kontrolgampang.com/login/user-permissions\n\t\t * Body Param\t: ACCESS_ID (key),MODUL_ID (key), BTN_VIEW/BTN_CREATE/BTN_UPDATE/BTN_DELETE/STATUS.\n\t\t * Alert\t\t: {\"result\": \"ACCESS_ID-Empty\"}=> Field ACCESS_ID Param tidak ada.\n\t\t *\t\t\t\t {\"result\": \"User-Not-Exist\"}=> user tidak di temukan.\n\t\t */\n\t\t$paramsBody \t\t= Yii::$app->request->bodyParams;\n\t\t$accessId\t\t\t= isset($paramsBody['ACCESS_ID'])!=''?$paramsBody['ACCESS_ID']:'';\n\t\t$modulId\t\t\t= isset($paramsBody['MODUL_ID'])!=''?$paramsBody['MODUL_ID']:'';\n\t\t$btnView\t\t\t= isset($paramsBody['BTN_VIEW'])!=''?$paramsBody['BTN_VIEW']:'';\n\t\t$btnCreate\t\t\t= isset($paramsBody['BTN_CREATE'])!=''?$paramsBody['BTN_CREATE']:'';\n\t\t$btnUpdate\t\t\t= isset($paramsBody['BTN_UPDATE'])!=''?$paramsBody['BTN_UPDATE']:'';\n\t\t$btnDelete\t\t\t= isset($paramsBody['BTN_DELETE'])!=''?$paramsBody['BTN_DELETE']:'';\n\t\t$status\t\t\t\t= isset($paramsBody['STATUS'])!=''?$paramsBody['STATUS']:'';\n\t\t\n\t\tif($accessId){\n\t\t\t$cntUser= User::find()->where(['ACCESS_ID'=>$accessId])->count();\n\t\t\tif($cntUser){\n\t\t\t\t$modalPermission = AppModulPermission::find()->where(['ACCESS_ID'=>$accessId,'MODUL_ID'=>$modulId])->one();\n\t\t\t\tif ($btnView!=''){$modalPermission->BTN_VIEW=$btnView;};\n\t\t\t\tif ($btnCreate!=''){$modalPermission->BTN_CREATE=$btnCreate;};\n\t\t\t\tif ($btnUpdate!=''){$modalPermission->BTN_UPDATE=$btnUpdate;};\n\t\t\t\tif ($btnDelete!=''){$modalPermission->BTN_DELETE=$btnDelete;};\n\t\t\t\tif ($status!=''){$modalPermission->STATUS=$status;};\n\t\t\t\tif($modalPermission->save()){\n\t\t\t\t\t$modalView = AppModulPermission::find()->where(['ACCESS_ID'=>$accessId,'MODUL_ID'=>$modulId])->one();\n\t\t\t\t\treturn array('USER_PERMISSIONS'=>$modalView);\t\n\t\t\t\t}else{\n\t\t\t\t\treturn array('result'=>'permission-Not-Exist');\n\t\t\t\t}\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn array('result'=>'User-Not-Exist');\n\t\t\t}\n\t\t}else{\n\t\t\treturn array('result'=>'ACCESS_ID-Empty');\n\t\t}\n\t}", "public function update(Request $request, $id)\n { \n if(!$this->checkAccess('UPDATE_USERROLE', $request))\n return response()->json(['message' => 'Unauthorized'], Response::HTTP_FORBIDDEN);\n\n $data = $this->userRoleRepository->update($request->all(), $id);\n return response()->json($data, Response::HTTP_OK);\n }", "public function update(User $user, Role $role)\n {\n return $user->hasRole('Admin') || $user->hasPermissionTo('Update roles');\n\n $this->deny('info','No puedes actualizar roles, contacta al administrador');\n //return back()->whit('info','No puedes actualizar roles, contacta al administrador');\n\n }", "public function update(Request $request, Admin $admin)\n {\n //\n\n $request->validate([\n 'roles'=>'array',\n 'name'=>'string',\n 'email'=>'email',\n ]);\n// if (!$admin->hasRole('super_admin')) return redirect()->route('dashboard')->with('error','for super admins only !');;\n $requestdata = $request->all();\n// echo $requestdata->role ;\n $admin->update($requestdata);\n //dd($request->roles) ;\n$admin->syncRoles($request->roles);\n \n return redirect()->route('dashboard');\n }", "public function update(UserRoleRequest $request, $id)\n {\n DB::beginTransaction();\n try {\n $user_role = TblUserRole::find($id);\n $user_role->update($request->all());\n DB::commit();\n $detail_new = TblUserRole::with('member')->where('project_id', $user_role->project_id)->get();\n return Response::json([\n 'errors' => false,\n 'data' => $detail_new,\n 'msg' => 'Update successfully'\n ], 201);\n } catch (Exception $e) {\n DB::rollBack();\n }\n }", "public function update(Request $request, $id)\n {\n $role = Role::find($id);\n $role->user_id = $request['user_id'];\n $role->name = $request['name'];\n $role->role = $request['role'];\n $role->save();\n return response()->json([\n 'role'=>$role,\n 'message'=>\"success\"\n ],200);\n }", "function update_user_role($id,$params)\n {\n $this->db->where('id',$id);\n return $this->db->update('user_role',$params);\n }", "public function update(UpdateUserRequest $request, $id) {\n // dd($request->all()); // <-- ver datos recibidos\n $usuario = User::findOrFail($id);\n $this->authorize($usuario);\n // $request->all() | $request->only | $request->except\n $usuario->update($request->except('password')); \n $usuario->roles()->sync($request->roles); // attach duplica\n return back()->with('info', 'Usuario actualizado');\n }", "public function update(Request $request,$id)\n {\n $user = \\App\\Models\\User::findOrFail($id);\n $role = Role::findByName($request->role_name);\n $userRole = $user->roles->pluck('name')->first();\n if (isset($user) and isset($role)) {\n if ($user->syncRoles([$role])) {\n return redirect('/user')->with(\"msg\",\"Cargo de \".$user->name.\" atualizado de \".$userRole.\" para \".$role->name);\n } else {\n return redirect('/user')->with(\"msg\",\"Cargo de\".$user->name.\" não foi atualizado\");\n }\n } else {\n return redirect('/');\n }\n }", "public function updated(Role $role)\n {\n //\n }", "public function changeRole(Request $request)\n {\n // Check if this user is an admin\n if (User::where('id', '=', \\Auth::user()->id)->first()->role === \"admin\") {\n // Check if inputs are valid\n if (User::where('id', '=', $request['user_ID'])->exists() &&\n ($request['user_role'] === \"subscriber\" || $request['user_role'] === \"admin\")) {\n User::where('id', '=', $request['user_ID'])->update(['role' => $request['user_role']]);\n }\n }\n else {\n return redirect('logout');\n }\n\n return redirect('home');\n }", "public function setRole() {\n\n $res= $_POST['link']->query(\"SELECT t2.perm_name FROM role_perm as t1\n JOIN permissions as t2 ON t1.perm_id = t2.perm_id\n WHERE t1.role_id = $this->rol_id\");\n\n\n foreach($res as $item)\n $this->role_perm[]= $item['perm_name'];\n }", "function update_role_permision() {\n\t\t$user_role = $this->get_role_permission($_POST['role_id']);\n\t\tforeach ($user_role->result() as $role) {\n\t\t\t\n\t\t\t$this->db->where('entry_id', $role->entry_id);\n\t\t\t$list = $_POST['role_permission'];\n\t\t\t$allow = isset($list[$role->entry_id]) ? 1 : 0;\n\t\t\t$this->db->update('system_security.security_role_permission', array('allow_deny' => $allow));\n\t\t}\n\t}", "public function update(Request $request, $id)\n {\n $user = User::find($id);\n if(!isset($user)){\n return response()->json(['saved'=>'false','user'=>$user]);\n\n }else{\n $user->name = $request->get('username');\n //echo $request->get('usertype-select'); exit;\n\n $role = Role::find($request->get('usertype-select'));\n $user->roles()->detach(); \n $user->assignRole($role->name);\n if($role->name == 'public-viewer'){\n $user->department_id = null;\n }\n $user->update();\n return response()->json(['saved'=>'true','user'=>$user]);\n\n }\n\n\n //return redirect()->route('user.index')->with('success','User added successfully');\n }", "public function update(CreateReqeust $request, Role $role)\n {\n if ($role->name == 'super-admin') {\n if (!optional(auth()->user())->hasRole('super-admin')) {\n return redirect()->route('role.index');\n }\n }\n\n app()['cache']->forget('spatie.permission.cache');\n if (optional(auth()->user())->hasRole('super-admin')) {\n $role->update(['name' => $request->name]);\n }\n\n $role->permissions()->detach();\n $inputs = $request->all();\n app()['cache']->forget('spatie.permission.cache');\n $assigningUser = [];\n $userOb = $this->user;\n if ($request->userIds != null) {\n $assigningUser = collect($request->userIds)->map(function ($userId) use ($userOb, $role) {\n $user = $userOb::find($userId);\n if (!($user->hasRole($role->name))) {\n $user->assignRole($role->name);\n }\n\n return $userId;\n });\n }\n\n $this->user::all()->pluck('id')->diff(collect($assigningUser))->each(function ($userId, $key) use ($userOb, $role) {\n $user = $userOb::find($userId);\n if (($user->hasRole($role->name))) {\n $user->removeRole($role->name);\n }\n });\n\n app()['cache']->forget('spatie.permission.cache');\n\n collect($inputs)->except(['_token', 'name', 'guard_name', '_method', 'userIds'])\n ->each(function ($input, $key) use ($role) {\n $key = str_replace('_', '-', $key);\n $role->givePermissionTo($key);\n });\n\n return redirect()->route('role.show', [$role->id]);\n }", "public function update($id, Request $request) {\n\n // find role by id\n $role = Sentinel::findRoleById($id);\n // inputs\n $data = $request->get('data');\n $value = $request->get('value');\n $type = $request->get('type');\n \n //minor improvement to prevent inserting unwated values\n if(!(string)$value)\n return \"failed\";\n \n switch ($type) {\n case 'single':\n if (isset($role->permissions[$value])) {\n $role->updatePermission($value, ($data == 'true') ? true : false);\n $role->save();\n return \"update\";\n } else {\n $role->addPermission($value, ($data == 'true') ? true : false);\n $role->save();\n return \"add\";\n }\n case 'menu':\n $menu = ModuleMenu::find($value);\n if ($menu) {\n foreach ($menu->permissions as $permission) {\n $permission_name = $permission->permission;\n if (isset($role->permissions[$permission_name])) {\n $role->updatePermission($permission_name, ($data == 'true') ? true : false);\n } else {\n $role->addPermission($permission_name, ($data == 'true') ? true : false);\n }\n }\n $role->save();\n return \"success\";\n }\n return \"failed\";\n }\n }", "public function update(Request $request, int $id)\n {\n $model = Role::find($id);\n $data = $request -> except(['_token']);\n\n $model -> update($data);\n return redirect(route('admin.role.index')) -> with('success','情報を更新しました'); \n }", "public function update(UserRequest $request, $id)\n {\n //\n $user = User::find($id);\n if ($user->update($request->all())) {\n $user->roles->sync($request->input('role'));\n Session::flash('message', 'Success! Account have been updated');\n return Redirect::to('/users');\n }else{\n Session::flash('warning', 'Failed! User not updated');\n return Redirect::to('/users'); \n }\n /* echo\"<pre>\";\n print_r($request->all());\n echo\"</pre>\";*/\n }", "public function saveRole()\r\n {\r\n $this->checkIfDemo();\r\n $this->form_validation->set_rules('title', 'Role Title', 'required|min_length[2]|max_length[50]');\r\n\r\n $edit = $this->xssCleanInput('role_id') ? $this->xssCleanInput('role_id') : false;\r\n\r\n if ($this->form_validation->run() === FALSE) {\r\n echo json_encode(array(\r\n 'success' => 'false',\r\n 'messages' => $this->ajaxErrorMessage(array('error' => validation_errors()))\r\n ));\r\n } elseif ($this->AdminRoleModel->valueExist('title', $this->xssCleanInput('title'), $edit)) {\r\n echo json_encode(array(\r\n 'success' => 'false',\r\n 'messages' => $this->ajaxErrorMessage(array('error' => lang('role_already_exist')))\r\n ));\r\n } else {\r\n $data = $this->AdminRoleModel->storeRole($edit);\r\n echo json_encode(array(\r\n 'success' => 'true',\r\n 'messages' => $this->ajaxErrorMessage(array('success' => lang('role').' ' . ($edit ? lang('updated') : lang('created')))),\r\n 'data' => $data\r\n ));\r\n }\r\n }", "public function update(Request $request, $id)\n {\n try{\n DB::beginTransaction();\n //update user table\n $this->user->where('id',$id)->update([\n 'name'=>$request->name,\n ]);\n //update to role\n DB::table('role_user')->where('user_id',$id)->delete();\n $userCreate = $this->user->find($id);\n $userCreate->roles()->attach($request->role);\n DB::commit();\n return redirect()->route('user.index');\n }catch (\\Dropbox\\Exception $exception){\n DB::rollBack();\n }\n\n\n }", "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'username'=> 'required',\n 'email'=>'required',\n \n ]);\n $user= User::find($id);\n $user-> name=$request-> username;\n $user-> email=$request-> email; \n \n if($user->save())\n {\n $output=\"inserted\";\n }\n else {\n $output=\"error\";\n }\n /*$roleid=$request->role;\n $user->attachRole($roleid);*/\n /* return compact('output');*/\n\n return back();\n\n }", "public function actionUser_role() {\n if (isset($_POST['dep_id']) != 0) {\n $output = '';\n $dep_id = $_POST['dep_id'];\n $UserRole = DvUsersRole::find()->where(['status' => 1])->all();\n $Urole = ArrayHelper::map($UserRole, 'id', 'name');\n echo '<select id=\"UsersRole\" class=\"form-control\" name=\"usermeta[role]\" required=\"required\" aria-invalid=\"false\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Select Role\">';\n echo '<option value=\"\">Select Role</option>';\n foreach ($Urole as $key => $val) {\n if($key != 1){\n //Removed \"Super Admin\" 03 June 2019\n if (($dep_id == 7) && ($key == 4)) {\n echo '<option value=\"' . $key . '\" selected=\"selected\" >' . $val . '</option>';\n } else {\n echo '<option value=\"' . $key . '\">' . $val . '</option>';\n }\n }\n }\n echo '</select>';\n return $output;\n } else {\n return $this->redirect(['dv-users/index']);\n }\n }", "function edit($iAccountNo=0) {\n\n\n\t\t$this->authentication->is_admin_logged_in(true);\n\n\t\tif( !$this->mcontents['oUser'] = $this->user_model->getUserBy('account_no', $iAccountNo) ) {\n\n\t\t\tsf('error_message', 'Invalid user');\n\t\t\tredirect('user/listing');\n\n\t\t}\n\n\t\tisAdminSection();\n\n\t\t$this->mcontents['page_heading'] = $this->mcontents['page_title'] = 'Edit User';\n\t\t$this->mcontents['aExistingRoles'] = getUserRoles( $this->mcontents['oUser']->account_no );\n\n\t\tif ( isset($_POST) && !empty($_POST)) {\n\n\n\t\t\t$this->form_validation->set_rules('status', 'Status', 'trim|required');\n\t\t\t//$this->form_validation->set_rules('user_roles','User Roles', '');\n\t\t\tif ($this->form_validation->run() == TRUE) {\n\n\t\t\t\t$aData = array(\n\t\t\t\t\t\t\t'email_id' => safeText('email_id'),\n\t\t\t\t\t\t\t'status' => safeText('status'),\n\t\t\t\t\t\t\t'gender' => safeText('gender'),\n\t\t\t\t\t\t);\n\n\t\t\t\t$this->db->where('account_no', $iAccountNo);\n\t\t\t\t$this->db->update('users', $aData);\n\n\t\t\t\t//update roles.\n\t\t\t\t$aRoles \t\t\t= array_trim( safeText('user_roles') );\n\n\t\t\t\t$aDeletedRoles \t= array_diff($this->mcontents['aExistingRoles'], $aRoles);\n\t\t\t\t$aNewRoles \t\t= array_diff($aRoles, $this->mcontents['aExistingRoles']);\n\n\n\t\t\t\t//echo 'EXISTING : ';p( $this->mcontents['aExistingRoles']);\n\t\t\t\t//echo 'DELETED : ';p( $aDeletedRoles );\n\t\t\t\t//echo 'NEW : ';p( $aNewRoles );\n\n\t\t\t\t//p($aNewRoles);\n\t\t\t\t$this->_createRoles($aNewRoles, $this->mcontents['oUser']->account_no);\n\t\t\t\t$this->_deleteRoles($aDeletedRoles, $this->mcontents['oUser']->account_no);\n\n\t\t\t\tsf('success_message', 'The user data has been updated');\n\t\t\t\tredirect('user/edit/'.$iAccountNo);\n\n\t\t\t}\n\t\t}\n\n\t\t//p($this->mcontents['aExistingRoles']);\n\n\t\t$this->mcontents['aUserRolesTitles'] \t= $this->config->item('user_roles_title');\n\t\t$this->mcontents['iTotalNumRoles'] \t\t= count( $this->mcontents['aUserRolesTitles'] );\n\t\t$this->mcontents['aUserStatusFlipped'] \t= array_flip( $this->config->item('user_status') );\n\t\t$this->mcontents['iAccountNo'] \t\t\t= $iAccountNo;\n\n\t\tloadAdminTemplate('user/edit');\n\t}", "public function update(Request $request)\n {\n $role = DB::table('roles')\n ->where('id',$request['id'])\n ->update([\n 'name' => $request['name'],\n 'parent_id' => $request['parent_id'],\n ]);\n return redirect()->route('roles');\n }", "public function update(Request $request)\n {\n $request->validate([\n 'name' => 'required'\n ]);\n\n $role = Role::where('id', $request->id)->first();\n\n $role->name = $request->name;\n\n if($role->update()){\n return response()->json([\n 'error' => false,\n 'message' => 'Role Updated Successfully!'\n ]);\n }else{\n return response()->json([\n 'error' => true,\n 'message' => 'Could not update role'\n ]);\n }\n }", "public function actionUserRole() {\n $model = new Configuration();\n $modules = $model->getModels();\n $modelArr = array();\n if (isset($_GET['id']) && $_GET['id'] != '') {\n $modelArr = $model->getUserRole($_GET['id']);\n }\n if (isset($_POST['UserRolesSearch'])) {\n if ($id = $model->saveUserRole()) {\n return $this->redirect(['index', 'fromRoles' => 1]);\n }\n }\n return $this->render('user-role', [\n 'model' => $modelArr,\n 'modules' => $modules\n ]);\n }", "public function update(Request $request, $id) {\n $user = User::findOrFail($id); //Uzima role sa izbranim id-ijem\n\n //Validiera ime, email i lozinku \n $this->validate($request, [\n 'name'=>'required|max:120',\n 'email'=>'required|email|unique:users,email,'.$id,\n 'password'=>'required|min:6|confirmed'\n ]);\n $input = $request->only(['name', 'email', 'password']); //Prikazuje polja za ime, email i lozinku\n $roles = $request['roles']; //Prikazuje sve rol-ove\n $user->fill($input)->save();\n\n if (isset($roles)) { \n $user->roles()->sync($roles); //Ako je jedna ili vise rol-ova izabrano povezati ih sa korisnikom \n } \n else {\n $user->roles()->detach(); //Ako ni jedan role nije izabran, ukloniti postojeci role koji je povezan za korisnika\n }\n return redirect()->route('users.index')\n ->with('flash_message',\n 'Korisnik je uspesno editovan.');\n }", "public function update(Request $request, $id)\n {\n //Approve user\n $user = Pending::find($id);\n\n if($user->user_role == 102) {\n $user->user_role = 2;\n } \n if($user->user_role == 103) {\n $user->user_role = 3;\n } \n \n $user->save();\n\n return redirect('/pending')->with('success', 'User Approved');\n }", "public function updateUserRole(Request $request){\n\n $validate = $this->validate($request, [\n 'project_id' => 'required',\n 'user_id' => 'required',\n 'user_role' => 'required|string|max:255',\n ]);\n\n $project_id = $request->input('project_id');\n $user_id = $request->input('user_id');\n $user_role = $request->input('user_role');\n\n $project = Project::find($project_id);\n\n /**\n * Documentacion de laravel\n * Updating A Record On A Pivot Table\n */\n $project->users()->updateExistingPivot($user_id, ['user_role' => $user_role]);\n /**\n * Esta forma funciona, la deduje yo, la otra \n * es de la documentacion de laravel.\n */\n /*\n $user = $project->users;\n $user = $user->find($user_id);\n $user->pivot->user_role = $user_role;\n $user->pivot->update();\n */\n\n return redirect()->route('projects.show', $project->id)\n ->with(['message' => 'Rol de usuario modificado correctamente']);\n }", "public function update(Request $request, $id)\n {\n $idRol=Input::get('id_rol');\n \n \n \n if($idRol==0){\n Session::flash('message','Seleccione un rol');\n return Redirect::to('user_role/'.$id.'/edit');\n }else{\n $user = User::find($id);\n $user->roles()->sync([$idRol]);\n \n Session::flash('message', 'Agregados correctamente');\n return Redirect::to('user_role');\n }\n }", "public function ajax_updateperm() {\n\t\t\t\n\t\t\tif( !isset($_GET['usergroup']) || !isset($_GET['key']) || !isset($_GET['value']) )\n\t\t\t\tdie( \"error\" );\n\t\t\t\t\n\t\t\t$Usergroup = $this->usergroup_model->GetByID( intval( $this->input->get('usergroup') ) );\n\t\t\tif( $Usergroup == false ) die( \"error\" );\n\t\t\t\n\t\t\tif( $_GET[ \"key\" ] == \"name\" ) {\n\t\t\t\t$NewName = $this->db->escape( $_GET[ \"value\" ] );\n\t\t\t\tget_instance()->db->query( \"UPDATE `usergroups` SET `Name` = {$NewName} WHERE `ID` = {$Usergroup->ID};\" );\n\t\t\t\tdie( \"success\" );\n\t\t\t}\n\t\t\t\n\t\t\tif( $_GET[ \"value\" ] == \"enable_cat\" || $_GET[ \"value\" ] == \"disable_cat\" ) {\n\t\t\t\t$CatID = intval( $_GET['key'] );\n\t\t\t\t\n\t\t\t\tif( $_GET[ \"value\" ] == \"enable_cat\" ) {\n\t\t\t\t\t$Usergroup->AddTicketCat( $CatID );\n\t\t\t\t}else{\n\t\t\t\t\t$Usergroup->RemoveTicketCat( $CatID );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdie( \"success\" );\n\t\t\t}\n\t\t\t\n\t\t\t$Permission = Permissions::GetByKey( $this->input->get('key') );\n\t\t\tif( $Permission == false ) die( \"error\" );\n\t\t\t\n\t\t\tif( intval( $_GET['value'] ) == 1 ) {\n\t\t\t\t$Usergroup->GivePermission( $Permission->ID );\n\t\t\t}else{\n\t\t\t\t$Usergroup->RemovePermission( $Permission->ID );\n\t\t\t}\n\t\t\t\n\t\t\tdie( \"success\" );\n\t\t}", "public function update(Request $request, $id)\n {\n \n $role = Sentinel::findRoleByID($id);\n \n $data = Request::json()->all();\n\n // Update the role details\n $role->name = $data[\"name\"];\n\n // Update the role\n if ($role->save())\n {\n // role information was updated\n }\n else\n {\n // role information was not updated\n }\n\n return response()->json($role,200);\n }", "public function act_edit_user()\n {\n $id = strip_tags($this->input->post('id'));\n $email = strip_tags($this->input->post('email'));\n $pass = strip_tags(hash('sha256',$this->input->post('password')));\n\n\n if (validation_edit_admin()) {\n $update_user = $this->dashboard->update('m_admin', array('id' => $id), array('email' => $email, 'password' => $pass));\n if ($update_user) {\n $response = array('error'=>false,'title'=>'Update Berhasil','pesan'=>'');\n echo json_encode($response);\n }\n\n }else{\n $response = array('error'=>true,'title'=>'Update Gagal!','pesan'=>strip_tags(validation_errors()));\n echo json_encode($response);\n }\n }", "function superadmin_update($id=NULL) {\n\t\t $this->set('meta_title','Edit User Group');\n\t\t $errors ='';\n\t\t if(isset($this->data['Role']['id'])) {\n\t\t\t $this->id = (int)$this->data['Role']['id'];\n\t\t\t $this->set('id',$this->id);\n\t\t }\n\t\t else {\n\t\t \t$this->id = (int)$id;\n\t\t\t$this->set('id',$this->id);\n\t\t }\t\n\t\t if(!$this->id) {\n\t\t \t$this->Session->setFlash('Invalid User Group update id.');\n\t\t $this->redirect(array('controller'=>'roles','action'=>'index'));\n\t\t }\n\t\t $this->Role->set($this->data);\n\t\t\n\t \t if(!empty($this->data) && is_array($this->data)){\n\t\t \n\t\t\t\n\t\t \n\t\t $this->Role->set($this->data);\n\t\t \n\t\t$errorsArr='';\n\t\t if(!$this->Role->validates()) \n\t\t\t{\n\t\t\t\n\t\t\t\t$errorsArr = $this->Role->validationErrors;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\n \t\t if($errorsArr) {\n\t\t \n\t\t $this->Session->setFlash($errors);\n\t\t\t\t\n\t\t\t\t $this->set('data',$this->data);\n\t\t\t\t\n\t\t\t// $this->redirect(array('controller'=>'roles','action' =>\"update\",$this->id));\n\t\t\t}\n\t\t\telse { \n\t\t\t\t $this->request->data['Role']['id']\t= $this->id;\n\t\t\t\t if($this->request->data['Role']['id'] != 1) {\n\t\t\t\t\t if(in_array($this->params['controller'].'/'.substr($this->params['action'],5),$userpermissions) || $this->Session->read('Auth.Adminuser.role_id')==1) {\n\t\t\t\t\t $this->data['Role']['allowedfunctions']= $this->common->arrayToCsvString($this->data['Role']['allowedfunctions']);\n\t\t\t\t\t }\t\n\t\t\t\t } \t\t\t \n\t\t\t\t // pr($this->data);\n\t\t\t \t if($this->Role->save($this->data)) {\n\t\t\t\t $this->Session->write('popup','User Group has been updated successfully.');\n\t\t\t\t\t\t$this->Session->setFlash('User Group has been updated successfully.'); \n\t\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"index/message:success\"));\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \t$this->Session->setFlash('Data save problem, Please try again.'); \n\t\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"update\",$this->id));\n\t\t\t\t }\t\t\n\t\t \t}//end if not error\n\t \t}// end if of check data array\n\t\t else {\n\t\t $this->set('data',$this->Role->read('',$id));\n\t\t }\n\t }", "public function update(Request $request, User $user)\n {\n $this->authorize('haveaccess','misdatos');\n\n\n $user->update($request->all());\n\n $nombre='Su ubicación actual es: '.$request->nombremp;\n\n if($request->sucursal==\"2\"){\n DB::table('role_user')->where('user_id', $user->id)\n ->update(['role_id' => $request->role_id]);\n\n return redirect()->route('user.edit',$user->id)\n ->with('status_success', $nombre );\n } else {\n\n $asignado = DB::table('empresa_users')->where('user_id', $user->id)\n ->where('empresa_id', $user->empresa)\n ->select('role_id')\n ->first();\n\n if(empty($asignado)){\n\n $rolactual = DB::table('empresa_users')->where('user_id', $user->id)\n ->where('empresa_id', $request->empresactual)\n ->select('role_id')\n ->first();\n\n DB::table('empresa_users')->insert([\n 'user_id' => $user->id,\n 'empresa_id' => $user->empresa,\n 'role_id' => $rolactual->role_id,\n 'name' => $user->name,\n 'sucursal_id' => $request->sucurid,\n 'sucursal' => $request->sucurnom,\n 'area_id' => $request->areaid,\n 'area' => $request->areanom\n\n ]);\n }\n\n\n\n return redirect()->route('sucursal')\n ->with('status_success',$nombre);\n }\n\n\n }", "public function update(Request $request, $id) {\n // Decode the role id\n $id = Crypt::decryptString($id);\n // Validate the form data\n $input = $request->all();\n\n $extra_rules = array(\n 'role_name' => [\n 'required',\n 'max:191',\n Rule::unique('roles')->where(function ($query) {\n $query->where('deleted', '0');\n })->ignore($id),\n ],\n 'slug' => [\n 'required',\n 'max:191',\n 'alpha_dash',\n Rule::unique('roles')->where(function ($query) {\n $query->where('deleted', '0');\n })->ignore($id),\n ]\n );\n $this->validator($request->all(), 'edit', $extra_rules)->validate();\n\n // Fetch the role object\n // $role = $this->roleRepository->findById($id);\n $role = Role::findOrFail($id);\n\n if (!$role) {\n if ($request->ajax()) {\n return response()->json(trans(\"comman.invalid_role\"), 422);\n }\n Flash::error(trans(\"comman.invalid_role\"));\n return redirect()->back()->withInput();\n }\n\n // Update the role\n $role->role_name = trim($request->get('role_name'));\n $role->slug = trim($request->get('slug'));\n\n // Cast permissions values to boolean\n $permissions = [];\n if(isset($input['hdn_permission']) && isset($input['permission'])) {\n foreach ($input['hdn_permission'] as $hdn_permission => $value) {\n foreach ($value as $key => $val) {\n $permission_value = (array_get($input['permission'], $hdn_permission. '.' . $key));\n $permissions[base64_decode($key)] = (bool) $permission_value;\n }\n }\n }\n // Set the role permissions\n $role->permission = json_encode($permissions);\n $role->save();\n\n // All done\n if ($request->ajax()) {\n return response()->json(['role' => $role], 200);\n }\n\n Flash::success(trans(\"comman.role_updated\"));\n if($request->get('save_exit')){\n return redirect()->route('roles.index');\n }else{\n return redirect()->route('roles.edit', Crypt::encryptString($id));\n }\n }", "public function editUserRole(Request $request) {\n $data = $request->all();\n $userDataArray = $this->userRepo->find($data['user_id']);\n $roleData = $this->userRepo->getRoleDataById($data['user_id']);\n return view('backend.acl.edit_user_role')\n ->with('userData', $userDataArray)\n ->with('roleData', $roleData);\n }", "public function executeEdit()\n {\n $this->role = RolePeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($this->role);\n\n $this->langs = sfConfig::get('app_lang_array', array('es')); \n }", "public function update(Request $request, $id)\r\n {\r\n $rules = array(\r\n 'role_name' => 'required',\r\n );\r\n $validator = Validator::make($request->all(), $rules);\r\n if ($validator->fails()) {\r\n return Redirect::back()->withInput()->withErrors($validator);\r\n } else {\r\n $admin_user = $this->admin_role_repository->update($id, $request->all());\r\n flash()->success(config('message.role.update-success'));\r\n return Redirect('admin/role');\r\n }\r\n flash()->error(config('message.role.update-error'));\r\n return Redirect::back();\r\n }", "public function update(Request $request)\n {\n $role = Role::findOrFail($request->id);\n $role->name = $request->name;\n $role->syncPermissions($request->permissions);\n\n $save = $role->save();\n\n if($save) {\n Alert::toast('Sukses mengubah data', 'success');\n } else {\n Alert::toast('Terjadi kesalahan!', 'error');\n }\n return redirect()->route('admin.user.index');\n }", "public function update(Request $request, $id)\n {\n $user = User::withTrashed()->find($id);\n $roles = $request->roles;\n DB::table('role_user')->where('user_id',$id)->delete();\n\n foreach ($roles as $role){\n $user->attachRole($role);\n }\n\n return back()->withMessage('Updated');\n\n }", "public function update(Request $request,$id)\n {\n try{\n $User = User::find($id);\n $User->update($request->except(['_token','id','created_at','updated_at','role']));\n $User->password= bcrypt($request->password);\n $User->syncRoles(json_decode($request->roles,true));\n $User->save();\n $data['data'] = $User;\n $data['message'] = 'update';\n return $this->apiResponse($data,200);\n }catch(\\Exception $e){\n $data['message'] = $e->getMessage();\n return $this->apiResponse($data,404);\n }\n }", "function SetUserRole ($userRoleId = null, $data = array()) {\n $answer = $this->answer;\n\n if ($userRoleId) {\n // update user role\n $this->db\n ->where('role_id', $userRoleId)\n ->update('user_role', $data);\n // here must be notification email function\n }\n else {\n // create user role\n $this->db->insert('user_role', $data);\n $userRoleId = $this->db->insert_id();\n\n // here must be notification email function, new id is for it\n }\n\n $answer['success'] = true;\n $answer['result'] = $userRoleId;\n return $answer;\n }", "public function update(Request $request)\n {\n // Si no tiene permisos para modificar o visualizar lo echamos\n if (!auth()->user()->can('admin-roles-update')) {\n app()->abort(403);\n }\n\n $idpermissions = explode(\",\", $request->input('results'));\n $idrole = $request->input(\"id\");\n\n // Compruebo que el rol al que se quieren asignar datos existe\n $role = Role::find($idrole);\n\n if (is_null($role)) {\n app()->abort(500);\n }\n\n try {\n DB::beginTransaction();\n\n // Asigno el array de permisos al rol\n $role->syncPermissions($idpermissions);\n\n DB::commit();\n\n // Y Devolvemos una redirección a la acción show para mostrar el usuario\n return redirect()->route('roles.edit', array($idrole, '2'))\n ->with('success', trans('roles/lang.okUpdate_permission'))\n ->with('tab', \"tab_2\");\n } catch (\\PDOException $e) {\n DB::rollBack();\n return redirect()->route('roles.edit', array($idrole, '2'))\n ->with('error', trans('roles/lang.errorediciion'))\n ->with('tab', \"tab_2\");\n }\n }", "public function updateExtra($request, $id)\n {\n $roleIds = DB::table('role_users')\n ->where('user_id', $id)\n ->pluck('role_id')\n ->toArray();\n\n $roles = ($request->roles) ? $request->roles : [];\n\n foreach($roles as $role) {\n if(in_array($role, $roleIds)) {\n // remove item from list, no update needed\n if(($key = array_search($role, $roleIds)) !== false) {\n unset($roleIds[$key]);\n }\n }\n else {\n // add item\n DB::table('role_users')\n ->insert([\n 'user_id' => $id,\n 'role_id' => $role,\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 DB::table('role_users')->where('user_id', $id)->whereIn('role_id', $roleIds)->delete();\n }", "public function update(Request $request, $id)\n {\n $messages = [\n 'name.required' => trans('user.err_name_required'),\n 'email.required' => trans('user.err_email_required'),\n 'email.unique' => trans('user.err_email_unique'),\n 'password.required' => trans('user.err_password_required'),\n 'password.min' => trans('user.err_password_min'),\n 'password.confirmed' => trans('user.err_password_confirmed'),\n 'password_confirmation.required' => trans('user.err_password_confirmation_required'),\n 'roles.required' => trans('user.err_roles_required')\n ];\n $user = User::find($id);\n $input = $request->all();\n\n $rules = [\n 'name' => 'required',\n 'email' => 'required|unique:users,email,'.$user->id,\n 'roles' => 'required',\n ];\n\n if(!empty($request->input('password'))) {\n $rules['password'] = 'required|min:6|confirmed';\n $rules['password_confirmation'] = 'required';\n }\n\n $validator = Validator::make($request->all(), $rules, $messages);\n\n if($validator->fails()){\n if($request->ajax()) {\n return response()->json(['hasError' => true, 'errorMessage' => $validator->errors()]);\n }\n\n return \\Redirect::back()->withInput()->withErrors($validator);\n }\n\n if(!empty($request->input('password'))) {\n $user->password = Hash::make($input['password']);\n }\n\n $user->name = $request->input('name');\n $user->email = $request->input('email');\n $user->status = $request->input('status');\n $user->language = $request->input('language');\n $user->save();\n\n\n if(!$request->has('id')) {\n $user->detachRoles();\n\n foreach ($request->input('roles') as $key => $value) {\n $user->attachRoles($value);\n }\n }\n //return var_dump($request->ajax());die;\n return redirect()->back();\n\n if($request->ajax()) {\n switch ($request->input('save')) {\n case 1 :\n return response()->json(['redirectPath' => url('panel/user')]);\n case 2 :\n return response()->json(['redirectPath' => url('panel/user/create')]);\n case 3:\n return response()->json(['redirectPath' => url('panel/user/' . $user->id . '/edit')]);\n }\n }\n }", "public function update(Request $request, Role $role)\n {\n //Gate::authorize('haveaccess', 'rol.update');\n $request->validate([\n \n 'name' => [ 'string', 'max:50','unique:roles,name,' .$role->id,],\n 'descripcion' => [ 'string', 'max:50','unique:roles,descripcion,' .$role->id,],\n 'full-access' => ['required' ,'in:yes,no'],\n 'estado' => ['required' ,'in:on,off'],\n\n\n ]);\n \n $role->update($request->all());\n \n //if ($request->get('permission')) {\n $role->permissions()->sync($request->get('permission')); //solo quite la validacion por caso de si tiene o no permiso\n //}\n\n return redirect ('sistema/iniciorole ')->with('success','Rol Actualizado con Exito'); // en el accion tenemos el index ya que de aqui nos redireccion al index \n }", "public function update(RoleUserRequest $request, $role, $id)\n {\n try {\n $attributes = $request->all();\n $role = $this->model->update($attributes, $id);\n\n return $this->success(trans('messages.success.updated', ['Module' => trans('user::role.name')]));\n } catch (Exception $e) {\n return $this->error($e->getMessage());\n }\n }", "public function update(Request $request, $id)\n {\n // User::find($id)->update($request->except('role'));\n $authors = User::find($id);\n $authors->name = $request->name;\n $authors->email = $request->email;\n $authors->save();\n\n if( $request->role == 1)\n {\n $memberRole = Role::where('name','member')->first();\n $adminRole = Role::where('name','admin')->first();\n $authors->detachRole($memberRole);\n $authors->attachRole($adminRole);\n }else {\n $memberRole = Role::where('name','member')->first();\n $adminRole = Role::where('name','admin')->first();\n $authors->attachRole($memberRole);\n $authors->detachRole($adminRole);\n }\n\n return redirect()->route('authors.index');\n }", "function update_role($roles_id,$params)\n {\n $this->db->where('roles_id',$roles_id);\n return $this->db->update('roles',$params);\n }", "public function update($id, Request $request)\n\t{\n\t\t//check permission\n\t\tif(!Auth::user()->hasPermission('editRole')){\n\t\t\treturn redirect()->route('admin.getHome')->with('flash_message_error', '403! Không thể Edit Role');\n\t\t}\n\t\t$role = Role::find($id);\n\t\tif(count($role) == 0){\n\t\t\treturn redirect()->back()->withInput()->withErrors('Role không tồn tại');\n\t\t}\n\t\t//\n\t\tif(in_array($role->role_name, $this->role_important)){\n\t\t\treturn redirect()->route('admin.role.index')->with(['flash_message_error' => 'Error! Role '.$role->role_name.' không thể Update']);\n\t\t}\n\t\t//\n\t\t$role->role_name = $request->role_name;\n\t\t$role->role_description = $request->role_description;\n\t\t$role->save();\n\t\t//save permission\n\t\t//remove all permission\n\t\tPermissionRole::where('role_id', $role->id)->delete();\n\t\tif(count($request->permission_id) > 0){\n\t\t\t//create\n\t\t\t$permission_id = [];\n\t\t\tforeach ($request->permission_id as $key) {\n\t\t\t\tarray_push($permission_id, ['permission_id' => $key, 'role_id' => $role->id]);\n\t\t\t}\n\t\t\tif(count($permission_id) >= 1){\n\t\t\t\tPermissionRole::insert($permission_id);\n\t\t\t}\n\t\t}\n\t\t//\n\t\t//update cache role update\n\t\tCache::forever('role_updated_at_'.$role->id, time());\n\t\t//\n\t\treturn redirect()->route('admin.role.index')->with(['flash_message' => 'Role '.$role->role_name.' đã được Update']);\n\t}", "public function userupdatesuccessAction()\n {\n }", "private function changeRole($role, $ajaxObj) {\n\t\t// Change the role\n\t\ttx_newspaper_workflow::changeRole(intval($role));\n\n\t\t// Render json (new menu and new label)\n\t\t$content = json_encode(array('roleLabel' => tx_newspaper_Workflow::getRoleTitle(tx_newspaper_Workflow::getRole()), 'menu' => $this->renderMenu()));\n\n\t\t// Set output\n\t\t$ajaxObj->setContentFormat('json');\n\t\t$ajaxObj->addContent('newspaperRoleMenu', $content);\n\n\t}", "public function update(Request $request, $id)\n {\n abort_unless(Gate::allows('roles_process'), 403);\n $this->roleRepository->findById($id);\n $this->roleRepository->process($request);\n return redirect()->route('admin.roles.index')->with(['toast'=>['message' => 'Role updated!']]);\n }", "public function update(CheckUserEdit $request, $id)\r\n {\r\n //return 'update';\r\n //dd('edit');\r\n $input = $request->all();\r\n if(!empty($input['password'])){ \r\n $input['password'] = Hash::make($input['password']);\r\n }else{\r\n $input = array_except($input,array('password')); \r\n }\r\n \r\n $user = User::find($id);\r\n $user->update($input);\r\n DB::table('role_user')->where('user_id',$id)->delete();\r\n \r\n \r\n foreach (array($request->input('roles')) as $key => $value) {\r\n $user->attachRole($value);\r\n }\r\n \r\n return redirect('adminuserlist')->with('success','编辑用户成功');\r\n }", "public function update(RoleRequest $request, $id)\n {\n $role = Role::find($id);\n $role->display_name = $request->input('display_name');\n $role->description = $request->input('description');\n $role->save();\n DB::table(\"permission_role\")->where(\"permission_role.role_id\",$id)\n ->delete();\n foreach ($request->input('permission') as $key => $value) {\n $role->attachPermission($value);\n }\n return redirect()->route('admin.roles')\n ->with('success','Permissão atualizada com sucesso');\n }", "public function update(Request $request,Role $role)\n {\n //\n $validator =Validator([$request->all(),\n 'permission_id' => 'required|integer|exists:permissions,id',\n ]);\n if (! $validator->fails()) {\n // $permission = Permission::findById($request->input('permission_id'), $role->guard_name);\n $permission = Permission::findOrFail($request->input('permission_id'));\n $message = '';\n if ($role->hasPermissionTo($permission)) {\n $role->revokePermissionTo($permission);\n $message = 'Permission revoked successfully';\n } else {\n $role->givePermissionTo($permission);\n $message = 'Permission assigned successfully';\n }\n return response()->json(['message'=>$message,Response::HTTP_OK]);\n } else {\n return response()->json([\n 'message'=> $validator->getMessageBag()->first()\n ], Response::HTTP_BAD_REQUEST);\n }\n\n }", "public function manageroleandresourceAction()\n {\n if ($this->_request->isPost()) {\n $rid = (int)$this->_request->getPost('rid');\n $aryChecked = $this->_request->getPost('chkRes');\n\n require_once 'Admin/Bll/Role.php';\n $bllRole = Admin_Bll_Role::getDefaultInstance();\n $result = $bllRole->updateRoleOfResource($rid, $aryChecked);\n\n echo $result ? 'true' : 'false';\n }\n }", "public function update(Request $request, Roles $roles)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required|string|unique:roles,name,' .$id\n ]);\n\n $role = Role::find($id);\n // revoke all\n $role->syncPermissions([]);\n // assign new permissions\n $role->syncPermissions($request->permissions);\n\n if(!$role) {\n return response()->json([\n 'success' => false,\n 'message' => __('messages.role_not_found_response')\n ], 400);\n }\n\n // # It should not allow to update role name if it is used by users.\n // $role_used_count = User::where('role_id', $role->id)->count();\n // if($role_used_count > 0) {\n // return response()->json([\n // 'success' => false,\n // 'message' => __('messages.role_has_been_used_response')\n // ], 400);\n // }\n\n # update role\n $role->name = $request->name;\n $role->save();\n\n return response()->json([\n 'success' => true,\n 'data' => $role,\n 'message' => __('messages.role_update_response')\n ]);\n }", "public function update(Request $request, $id)\n {\n // Create New User\n $user = User::find($id);\n\n // Validation Data\n $request->validate([\n 'name' => 'required|max:50',\n 'email' => 'required|max:100|email|unique:users,email,' . $id,\n 'password' => 'nullable|min:6|confirmed',\n ]);\n\n\n $user->name = $request->name;\n $user->email = $request->email;\n $user->status = $request->status;\n if ($request->password) {\n $user->password = Hash::make($request->password);\n }\n $user->save();\n\n $user->roles()->detach();\n if ($request->roles) {\n $user->assignRole($request->roles);\n }\n\n\n// return response()->json(['User has been updated !!']);\n return response()->json([trans('success')]);\n }" ]
[ "0.75765955", "0.7356477", "0.7356477", "0.72884315", "0.7019333", "0.700097", "0.6976736", "0.69685894", "0.6904019", "0.6892237", "0.68651235", "0.68599737", "0.68152994", "0.6809636", "0.67967093", "0.67960227", "0.6789575", "0.6750718", "0.66134864", "0.6611033", "0.6599953", "0.6574406", "0.657373", "0.65617675", "0.6558499", "0.6551206", "0.654785", "0.6520666", "0.65199995", "0.6513863", "0.65104485", "0.6486278", "0.64765024", "0.64670146", "0.64516133", "0.6443059", "0.64368373", "0.6435711", "0.6414263", "0.641167", "0.64111894", "0.6403364", "0.639849", "0.6392539", "0.6383592", "0.6380344", "0.6372866", "0.6372594", "0.63624203", "0.6360019", "0.6349809", "0.63465565", "0.6346409", "0.63429254", "0.63392955", "0.6329081", "0.6325955", "0.6317541", "0.630879", "0.62938815", "0.62929475", "0.6290682", "0.6290098", "0.6290025", "0.6288403", "0.62869704", "0.6281144", "0.6275813", "0.62645555", "0.6259923", "0.62577254", "0.6256956", "0.6249918", "0.62468874", "0.623426", "0.6231334", "0.62303364", "0.6216798", "0.6216537", "0.62144613", "0.62135345", "0.61915106", "0.6190806", "0.6188387", "0.6186746", "0.6186087", "0.61855334", "0.61836725", "0.6179876", "0.6177394", "0.6175572", "0.6174819", "0.6168678", "0.6165018", "0.6164747", "0.6159396", "0.61580986", "0.6157928", "0.61439925", "0.61367553" ]
0.6472073
33
/ This action is for AJAX request. It is updated user state
public function actionUserState () { $userClass = $this->module->modelUser; $post = Yii::$app->request->post(); $user = $userClass::findOne($post[ 'id' ]); if (!is_null($user)) { $user->active = $post[ 'state' ]; $user->save(); } echo $post[ 'state' ]; Yii::$app->end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajax()\n {\n /*if($name!=\"\"){\n switch($name){\n case 'change_active':\n $post['active'] = $status;\n $this->User_model->update($post, $id); \n break;\n } \n exit;\n }*/\n \n $this->app->get_table_data('users'); \n }", "public function ajax()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n $post = $this->request->request->all();\n\n if ($user_id) {\n $user = $this->user_logic->getUserById($user_id);\n if ($user !== false) {\n if (! empty($user) AND is_array($user)) {\n\n $user = array_pop($user);\n\n $ajax_data['code'] = 0;\n $ajax_data['data']['user'] = $user;\n $ajax_data['message'] = 'User Data Found;';\n\n switch($post['action']) {\n\n case 'update' : $result = $this->user_logic->ajaxUpdate($user,$post['unit_id'],$post['fields'],$post['values']);\n $ajax_data['message'] = $result;\n break;\n\n default : $ajax_data['message'] .= ' Processing unit_id: '. $post['unit_id'] . ';';\n $ajax_data['message'] .= ' Action: '. $post['action'] . ';';\n\n }\n\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'User does not exist'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Failed to get user info'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid user id';\n }\n \n $this->ajax_respond($ajax_data);\n }", "public function ajaxMemberStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Member is Active now.' : 'Member is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating member status to Active.' : 'Error while updating member status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function userupdatesuccessAction()\n {\n }", "public function onAjaxUser()\n\t{\n\t\t$id = $this->app->input->get('id');\n\t\t$domain = $this->params->get('url', 'http://localhost');\n\t\t$endpoint = '/api/index.php/v1/users';\n\t\t$this->serverUrl = $domain . $endpoint;\n\n\t\t// Get an instance of the generic tag model\n\t\tJModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/models/', 'UsersModel');\n\t\tJTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/tables/');\n\t\t$model = JModelLegacy::getInstance('User', 'UsersModel', array('ignore_request' => true));\n\n\t\t$item = $model->getItem($id);\nvar_dump($item);exit();\n\t\t$item->password2 = $item->password;\n\t\t$item->requireReset = 1;\n\n\t\t$content = json_encode($item);\n\n\t\ttry\n\t\t{\n\t\t\t$response = $this->sendData($item);\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t// There was an error sending data.\n\t\t\t$this->app->redirect(Route::_('index.php?option=com_users&view=user&layout=edit&id=' . $id, false), ' Connection ', 'error');\n\t\t}\n\n\t\tif ($response->code !== 200)\n\t\t{\n\t\t\t$data = json_decode($response->body);\n\n\t\t\t$this->app->redirect(Route::_('index.php?option=com_users&view=user&layout=edit&id=' . $id, false), $response->code . ' - ' . $data->errors[0]->title, 'error');\n\t\t}\n\n\t\t$this->app->redirect(Route::_('index.php?option=com_users&view=users&layout=edit&id=' . $id, false), 'Exported', 'success');\n\n\t}", "protected function ActionAjaxMode() {\n $userinfo = $this->control->GetUserInfo($_POST['usid'], true);\n $_POST['value'] = $this->CorrectSymplyString($_POST['value']); \n if (!$userinfo) {\n\tprint 'alert(\"User with specified identifier not found!\");';\t\n } else { \n \t$this->SetError(''); \t\n //switch action type\n $ident = '';\n switch ($_POST['type']) {\n\t //change email\n\t case '1': \n\t $ident = 'email';\n\t //check email\n\t if (!$this->validmail($_POST['value'])) { $this->SetError('E-mail is invalid!'); break; }\n\t //check alridy exists\n\t if ($this->control->db->GetLineArray($this->control->db->mPost(\n\t \"select iduser from {$this->ustable} where iduser<>'{$userinfo['iduser']}' and \".\n\t \"Lower(useremail)=Lower('{$_POST['value']}') limit 1\"\n\t ))) { $this->SetError($this->GetText('emailalridyisset')); break; }\n\t //ok, action\n\t if (!$this->control->db->UPDATEAction('users', array(\n\t 'useremail' => $_POST['value']\n\t ), \"iduser='{$userinfo['iduser']}'\", \"1\")) { $this->SetError('Error in modify email record!'); break; }\n\t //ok replace\n\t print '$(\"#email_source'.$_POST['usid'].'\").html(\"'.$_POST['value'].'\");';\t\n\t break;\n\t //change url\n\t case '2':\n\t $ident = 'url';\n\t if ($_POST['value'] == '('.$this->GetText('noresulttext').')') { $_POST['value'] = ''; }\n\t //action\n\t if (!$this->control->db->UPDATEAction('users', array(\n\t 'usersite' => $_POST['value']\n\t ), \"iduser='{$userinfo['iduser']}'\", \"1\")) { $this->SetError('Error in modify url record!'); break; }\n\t //ok replace\n\t print '$(\"#url_source'.$_POST['usid'].'\").html(\"'.\n\t ((!$_POST['value']) ? '('.$this->GetText('noresulttext').')' : $_POST['value']).\n\t '\");';\n\t break;\n\t //balance change\n\t case '3':\n\t $ident = 'balance';\n\t $this->SetError(($this->CheckPostValue('checkwithmessages') ? \n\t $this->control->MoneyProcess(\n\t $userinfo, $_POST['pricedescr'], $userinfo['iduser'] + 15, $_POST['value'], false, $_POST['balanceaction'], true, true\n\t ) : $this->ActionToBalanceDo($userinfo, $_POST['value'], $_POST['balanceaction'])\n\t ));\n\t if ($this->error) { break; }\n\t if ($this->CheckPostValue('checkwithmessages')) {\n\t if (!$userinfo = $this->control->GetUserInfo($userinfo['iduser'], true)) {\n\t\t$this->SetError('Error in get user info!'); break;\n\t }\t\n\t }\n\t $userinfo['purcedata']+=0.00;\n\t //action to replace\n\t print '$(\"#balance_source'.$_POST['usid'].'\").html(\"'.$userinfo['purcedata'].'\");';\n\t //print '$(\"#balance_source'.$_POST['usid'].'\").css(\"color\", \"'.(($userinfo['purcedata']) ? '#008000' : '#000000').'\");'; \n\t break;\n \n /* history tarnsactions */\n case '4': \n $this->control->smarty->assign('username', $_POST['value']);\n print $this->control->smarty->fetch('adm_account/items/users-money-history-list.tpl'); \n exit;\n break;\n \n /* seo panel links */\n case '5':\n $this->control->smarty->assign('username', $_POST['value']);\n $this->control->smarty->assign('userid', $_POST['usid']);\n print $this->control->smarty->fetch('adm_account/items/users-seo-panel-sites.tpl');\n exit; \n break;\n \n /* delete sites from seo panel */\n case '6':\n $s = $_POST['value'];\n $_POST['value'] = @explode(',', $_POST['value']);\n $_POST['usid'] = $this->CorrectSymplyString($_POST['usid']);\n \n foreach ($_POST['value'] as $item) { \n $item = $this->CorrectSymplyString($item);\n $this->control->db->Delete($this->control->tables_list['psitelist'], \n \"userid='{$_POST['usid']}' and iditem='$item'\", \"1\"); \n } \n \n print $s;\n exit;\n break;\n \n /* delete user from group */\n case '7':\n \n $_POST['groupiditem'] = $this->CorrectSymplyString($_POST['groupiditem']);\n $_POST['iduser'] = $this->CorrectSymplyString($_POST['iduser']);\n $_POST['iditem'] = $this->CorrectSymplyString($_POST['iditem']); \n \n $this->control->db->Delete($this->control->tables_list['groupusrs'], \"iditem='{$_POST['iditem']}'\", \"1\"); \n \n print \"{groupiditem:'{$_POST['groupiditem']}', iduser:'{$_POST['iduser']}', iditem:'{$_POST['iditem']}'}\";\n exit;\n break;\n \n /* */\n \n \n \t \n\t //unknow command\n\t default: print 'alert(\"Unknow command identifier!\");'; break;\n }\n }\n print 'alert(\"'.(($this->error) ? $this->error : $this->GetText('optionsissavedok')).'\");';\t \n //restore all process labels \n print '$(\"#'.$ident.'_link'.$_POST['usid'].'\").html(\"'.$this->GetText('modifylabeliditemstr').'\");';\n print '$(\"#'.$ident.'_'.$_POST['usid'].'\").html(\"\");'; \t\n exit;\n }", "public function userinfo()\n {\n if($user = $this->Session->read('user')){\n if(!empty($this->request->data)){\n //update thong tin\n }\n $this->set('user', $user);\n }else{\n $this->redirect(array('action' => 'login', ''));\n }\n }", "public function updraftplus_user_notice_ajax() {\n\n\t\tif (is_user_logged_in() && current_user_can('manage_options')) {\n\t\t\t$this->process_user_notice_ajax();\n\t\t}\n\t}", "protected function changeRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('CHANGE_REQUEST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//If no data has been submitted\n\t\t\tif($this->getModel()->getInputString(\"template\", null, \"P\")==null)\n\t\t\t{\n\t\t\t\t//Get the page content request\n\t\t\t\t$active = $this->getModel()->getCurrentTemplate();\n\t\t\t\t\n\t\t\t\t//Get all available templates\n\t\t\t\t$all = $this->getModel()->getAllTemplates();\n\t\t\t\t\n\t\t\t\t//Create an editor for data\n\t\t\t\t$this->getView()->createTable($active, $all);\n\t\t\t}\n\t\t\t//Data has been submitted to be processed\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Save data\n\t\t\t\t$this->getModel()->saveTemplateData();\n\t\t\t\t\n\t\t\t\t//Redirect\n\t\t\t\t$this->getView()->setTemplateRedirect();\n\t\t\t}\n\t\t}\n\t}", "public function ajaxStaffStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Staff is Active now.' : 'Staff is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating staff status to Active.' : 'Error while updating staff status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function actionReviewersAssigned() {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['ajaxData']['id'])) {\n $_GET['id'] = $_POST['ajaxData']['id'];\n $model = $this->loadModel();\n $model->status = '3';\n\n if (!$model->save()) {\n echo 'f';\n } else {\n Generic::newState($model->id, $model->status);\n echo $this->pQ();\n Yii::app()->end();\n }\n }\n }", "public function process_user_notice_ajax() {\n\t\t$return = array('code' => 'fail', 'data' => '');\n\t\t\n\t\tif (!isset($_POST['subaction'])) {\n\t\t\t$return['code'] = 'error';\n\t\t\t$return['data'] = 'Missing subaction';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t}\n\n\t\tif ('admin_only_login' == $_POST['subaction']) {\n\t\t\tcheck_ajax_referer('updraftplus_admin_only_login', 'nonce');\n\n\t\t\tif (!isset($_POST['admin_only_login'])) {\n\t\t\t\t$return['code'] = 'error';\n\t\t\t\t$return['data'] = 'Missing parameter';\n\t\t\t\techo json_encode($return);\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\t$admin_only = ('true' === $_POST['admin_only_login']);\n\t\t\t\n\t\t\tupdate_site_option('updraftplus_clone_admin_only_login', $admin_only);\n\n\t\t\t$return['code'] = 'success';\n\t\t\t$return['data'] = 'Option updated';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$return['code'] = 'error';\n\t\t\t$return['data'] = 'Unknown action';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t}\n\t}", "public function ajaxAction() {\n $result = $this->_auth->authenticate($this->_adapter);\n if ($result->isValid()) {\n $this->_auth->getStorage()->write(array(\"identity\" => $result->getIdentity(), \"user\" => new Josh_Auth_User($this->_type, $result->getMessages())));\n\n $ident = $this->_auth->getIdentity();\n\n $loggedIn = $this->view->partial('partials/userLoggedIn.phtml', array('userObj' => $ident['user']));\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => 'Successful Login', 'alertClass' => 'alert-success'));\n\n $html = array(\"#userButton\" => $loggedIn, \"alert\" => $alert);\n $this->jsonResponse('success', 200, $html);\n } else {\n $errorMessage = $result->getMessages();\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => $errorMessage['error'], 'alertClass' => 'alert-error'));\n\n $html = array(\"alert\" => $alert);\n $this->jsonResponse('error', 401, $html, $errorMessage['error']);\n }\n }", "public function pendingAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$user = $this->_user;\n if($user->{User::COLUMN_STATUS} == User::STATUS_MEMBER ){\n // Redirect to update if is a member already\n $this->_helper->redirectToRoute('userupdate');\n }\n\n $form = new User_Form_Update($user, true);\n\n // Populate form with data from DB in case user comes back to this page\n $form->populateFromDatabaseData($user->toArray());\n\n $data = $this->_request->getPost();\n if(!$data){\n // Display default data form\n $this->view->form = $form;\n return;\n }\n\n if (!$form->isValid($data)) {\n // Display form with errors\n $this->view->form = $form;\n return;\n }\n\n if(!$this->_updateUser($user, $form->getFormattedValuesForDatabase(), false)){\n // Update failed\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::UPDATE_FAILED));\n }\n\n // Update succeeded, redirect to next page\n $this->_helper->redirectToRoute('userwaitforconfirmation');\n }", "public function account_updated(){\n $this->log();\n http_response_code(200);\n ob_end_flush();\n }", "public function act_auth_ajax()\n\t{\n\t\t$user = User::identify();\n\t\tif ( $user->loggedin ) {\n\t\t\t/**\n\t\t\t * Triggers the ajax plugin action for the context if user is authenticated.\n\t\t\t *\n\t\t\t * @see act_auth_ajax()\n\t\t\t * @action ajax_auth_{$context}\n\t\t\t */\n\t\t\tPlugins::act( 'auth_ajax_' . $this->handler_vars['context'], $this );\n\t\t\texit;\n\t\t}\n\t}", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "public function successUpdate() {\n $this->loadFrontView('profile/after_update');\n }", "public function ChangeUserOnlineStatus()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $output['response'] = $this->database->ChangeUserOnlineStatus('online');\n exit(json_encode($output));\n }", "public function actionAjaxHtStatus()\n {\n \t $id=$_REQUEST['id'];\n\t \t $rec=HtuseHome::model()->findByPk($id);\n\n\t if($rec->status==0)\n\t {\n\t $rec->status=1;\n\t $rec->save();\n\t } \n\t else\n\t {\n\t \t$rec->status=0;\n\t $rec->save();\n\t }\t\n }", "public function handleAjaxRequest();", "public function setstatus()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Ephemerides::', '::', ACCESS_ADMIN));\n\n $eid = $this->request->request->get('eid', 0);\n $status = $this->request->request->get('status', 0);\n $alert = '';\n \n if ($eid == 0) {\n $alert .= $this->__('No ID passed.');\n } else {\n $item = array('eid' => $eid, 'status' => $status);\n $res = DBUtil::updateObject($item, 'ephem', '', 'eid');\n if (!$res) {\n $alert .= $item['eid'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($eid));\n if ($item['status']) {\n $item['status'] = 0;\n } else {\n $item['status'] = 1;\n }\n }\n }\n // get current status to return\n $item = ModUtil::apiFunc($this->name, 'user', 'get', array('eid' => $eid));\n if (!$item) {\n $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($eid));\n }\n\n return new Zikula_Response_Ajax(array('eid' => $eid, 'status' => $item['status'], 'alert' => $alert));\n }", "public function onChangeStatus(){\n \n if (($groupId = post('groupId')) != ''){\n \n $group = UserGroup::findOrFail($groupId);\n \n if (($status = post('status')) != ''){\n $user = $this->getuser();\n \n switch ($status){\n case UserGroup::MEMBERSHIP_ACCEPTED:\n $group->acceptMembership($user);\n break;\n \n case UserGroup::MEMBERSHIP_REJECTED:\n \t$group->rejectMembership($user);\n \tbreak;\n \t\n \tcase UserGroup::MEMBERSHIP_CANCELLED:\n \t\t$group->cancelMembership($user);\n \t\tbreak; \t \n \n } \n }\n }\n \n \n // Updated list of request and other vars\n $this->prepareVars();\n }", "protected function updateAction()\n {\n }", "public function actionChangeUserStatus()\n {\n if (Yii::$app->request->isAjax) {\n $data = Yii::$app->request->post();\n $login = $data['login'];\n $model = UserLikeStatus::find()->where(['login' => $login])->one();\n if ($model) {\n $model->status = $model->status ? 0 : 1;\n } else {\n $model = new UserLikeStatus();\n $model->login = $login;\n $model->status = true;\n }\n\n $model->save();\n\n $text = $model->status ? 'Unlike' : 'Like';\n $response = Yii::$app->response;\n $response->format = \\yii\\web\\Response::FORMAT_JSON;\n $response->data = ['label' => $text];\n $response->statusCode = 200;\n\n return $response;\n } else throw new \\yii\\web\\BadRequestHttpException;\n }", "public function updatePost(){\n\t\t\t//goi ham de update du lieu\n\t\t\t$this->modelUpdate();\n\t\t\t//di chuyen den trang read\n\t\t\techo \"<script>location.href='account/detail';</script>\";\n\t\t}", "public function ajax_response()\n {\n }", "public function voxy_update_user_info()\n {\n $data = $this->input->post();\n\n if(!(isset($data['external_user_id']) && $data['external_user_id'])){\n $this->ajax_data_return['msg'] = 'ID người dùng không hợp lệ !';\n return $this->ajax_response();\n }\n if(isset($data['expiration_date']) && $data['expiration_date'] != ''){\n $data['expiration_date'] = strtotime($data['expiration_date']);\n }\n if(isset($data['date_of_next_vpa']) && $data['date_of_next_vpa'] != ''){\n $data['date_of_next_vpa'] = strtotime($data['date_of_next_vpa']);\n }\n if(isset($data['can_reserve_group_sessions']) && $data['can_reserve_group_sessions'] != ''){\n $data['can_reserve_group_sessions'] = strtolower($data['can_reserve_group_sessions']);\n }\n\n if(isset($data['feature_group']) && $data['feature_group'] != ''){\n $api_data = $this->m_voxy_connect->add_user_to_feature_group($data['external_user_id'], $data['feature_group']);\n if($api_data && isset($api_data['error_message'])) {\n $this->ajax_data_return['msg'] = $api_data['error_message'];\n return $this->ajax_response();\n }\n }\n\n $api_data = $this->m_voxy_connect->update_profile_of_one_user($data['external_user_id'], $data);\n if($api_data && isset($api_data['error_message'])) {\n $this->ajax_data_return['msg'] = $api_data['error_message'];\n } else {\n $this->ajax_data_return['status'] = TRUE;\n $this->ajax_data_return['msg'] = 'Cập nhật thông tin người dùng thành công !';\n $this->ajax_data_return['data'] = $api_data;\n }\n\n return $this->ajax_response();\n }", "public function ajax_user_can()\n {\n }", "public function ajax_user_can()\n {\n }", "function status()\n {\n if(!$this->session->userdata['userData']['session_user_id']){\n redirect('users/login');\n }\n\n $this->session->unset_userdata('active_menu');\n $this->session->set_userdata('active_menu', 'roles');\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $role_id = $this->input->post('id');\n\n\n $role_data = $this->user_mod->get_role_by_id($role_id);\n $title = $role_data->name;\n\n if ($this->input->post('s') == 1) {\n $status = 0;\n $_POST['data']['status'] = $status;\n $status_result = 0;\n } else {\n $status = 1;\n $_POST['data']['status'] = $status;\n $status_result = 1;\n }\n\n $update = $this->user_mod->update_role($_POST['data'], $role_id);\n\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: ' . date('r', time() + (86400 * 365)));\n header('Content-type: application/json');\n\n echo json_encode(array(\n 'valid' => true,\n 'success_message' => $status_result,\n 'title' => $title\n ));\n exit();\n }\n }", "public function callAjaxUpdate () {\n return $this->callAjaxInit();\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "function wp_ajax_add_user($action)\n {\n }", "public function ajaxSetSessionUserId(Request $request)\n {\n if(request()->ajax()) {\n session()->put('sel_user', $request->cur_userid);\n return response()->json(['status' => 200]);\n }\n }", "public function ajax_update_keluarga()\n {\n $data['user_id'] = $this->user['id'];\n $update = $this->home->update_keluarga($data);\n\n if($update){\n echo json_encode(array(\"response\" => 'SUKSES', 'act' => \"upd\"));\n }else{\n echo json_encode(array(\"response\" => 'GAGAL', 'act' => \"upd\"));\n }\n }", "protected function processPutRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'put'\n ]));\n }", "public function ajax_backend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function updateMyAccountInfo()\n {\n $ajax_data = array();\n $post = $this->request->request->all();\n \n // validate POST parameters\n $result = $this->user_logic->validateAccountInfoPostData($post);\n if (($result['error'] == '') AND ! empty($result['params'])) {\n $user_id = $this->user_session->getUserId();\n $update = $this->user_logic->updateUserInfo($user_id, $result['params']);\n if ($update !== false) {\n $ajax_data['code'] = 0;\n $ajax_data['data'] = $post;\n $ajax_data['message'] = 'Updated Account Information'; \n } else {\n $errors = $this->user_logic->getErrorMessage();\n if (! empty($errors) AND is_array($errors)) {\n $errors = implode(',',$errors);\n } else {\n $errors = 'Failed to update account info due to database error';\n }\n \n $ajax_data['code'] = 1;\n $ajax_data['message'] = $ajax_data['validation_error'][] = $errors;\n }\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = $ajax_data['validation_error'][] = $result['error']; \n }\n \n $this->ajax_respond($ajax_data);\n }", "public function processUser(){\n \n $this->setCurrentUser();\n $this->setUsersAttributes();\n }", "public function actionPing(){\n $user = $this->get_current_user($_GET);\n if(!$user){\n $data = array('success'=>false,'error_id'=>1,'error_msg'=>'user doesnt exist');\n $this->renderJSON($data);\n return;\n }\n\n $user->last_activity = date(\"Y-m-d H:i:s\");\n\n if($user->save(false)){\n $data = array('success'=>true);\n $this->renderJSON($data);\n return;\n }else{\n $data = array('success'=>false,'error_id'=>2,'error_msg'=>'user saving user');\n $this->renderJSON($data);\n return;\n }\n }", "public function shared_ajax() {\n\t\tif (empty($_POST['subaction']) || empty($_POST['nonce']) || !is_user_logged_in() || !wp_verify_nonce($_POST['nonce'], 'tfa_shared_nonce')) die('Security check (3).');\n\n\t\tif ($_POST['subaction'] == 'refreshotp') {\n\n\t\t\tglobal $current_user;\n\n\t\t\t$tfa_priv_key_64 = get_user_meta($current_user->ID, 'tfa_priv_key_64', true);\n\n\t\t\tif (!$tfa_priv_key_64) {\n\t\t\t\techo json_encode(array('code' => ''));\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\techo json_encode(array('code' => $this->getTFA()->generateOTP($current_user->ID, $tfa_priv_key_64)));\n\t\t\texit;\n\t\t}\n\n\t}", "function updateUser()\r\n {\r\n return $this->UD->user_update($_GET['uid']);\r\n }", "public function requestAction()\n {\n return $this->returnAjaxResponse(self::REQUEST);\n }", "public function compAjaxUpdate() {\r\n $req = $this->input->post('req');\r\n updateComponentDetails($req);\r\n }", "public function updatePoinsUserAction()\n {\n \t$this->pointServices->updatePointUser($this->getUser());\n \t\n \treturn new Response(\"OK\");\n }", "function admin_add_members_status(){\t\n\t\t$progress = $this->Session->read('Import.progress');\n\t\t\n\t\t$this->layout = 'ajax';\n\t\t$data = array(\n\t\t\t'progress' => $this->Session->read('Import.progress'),\n\t\t\t'total' => $this->Session->read('Import.total')\n\t\t);\n\t\t$this->set('data', $data);\n\t\t$this->render('/ajaxreturn');\n\t}", "public function update_account()\n\t{\n\t\t$data = $this->input->post();\n\t\t\n\t\t$success = $this->user_model->safe_update($this->user->id, $data);\n\t\t\n\t\tif ( $success )\n\t\t{\n\t\t\t$this->json['message'] = 'Your account details have been successfully updated.';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->json['status'] = 'error';\n\t\t\t$this->json['message'] = 'There were errors when attempting update your account.';\n\t\t}\n\t\t\n\t\t$this->json['content'] = $this->update_account_content();\n\t\t\n\t\treturn $this->ajax_response();\n\t}", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "function update_student(){\n\t\t\t//Manage this with Ajax\n\t\t\tprint_r($this->input->post());\n\t\t}", "public function actionUpdate()\n {\n $bodyRaw = json_decode(Yii::$app->getRequest()->getRawBody(), true);\n //$body = json_decode(Yii::$app->getRequest()->getBodyParams(), true);\n\n if (is_array($bodyRaw)) {\n // check user is a guest\n if (array_key_exists('token', $bodyRaw)) {\n $userByToken = \\Yii::$app->user->loginByAccessToken($bodyRaw['token']);\n if (empty($userByToken)) {\n //return $this->goHome();\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n } else {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n\n // Get array with user Roles\n $userRole =[];\n $userAssigned = Yii::$app->authManager->getAssignments($userByToken->id);\n foreach($userAssigned as $userAssign){\n array_push($userRole, $userAssign->roleName);\n }\n //return Json::encode(array('method' => 'GET', 'status' => 1, 'type' => 'error', 'message' => $userRole));\n\n // Check rights\n // If user have create right that his allowed to other actions to the Spacialization table\n if (static::CHECK_RIGHTS_RBAC && !\\Yii::$app->user->can('createCustomer') && !\\Yii::$app->user->can('createMediator')) {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию обновления'));\n }\n /*\n $flagRights = false;\n foreach(array('admin', 'customer', 'contractor') as $value) {\n if (in_array($value, $userRole)) {\n $flagRights = true;\n }\n }\n if (!$flagRights) return Json::encode(array('method' => 'POST', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию добавления'));\n */\n\n // Because the field names may match within a single query, the parameter names may not match the table field names. To solve this problem let's create an associative arrays\n $arrayFeedbackAssoc = array ('id' => 'id', 'profile_id' => 'profile_id', 'status_feedback_id' => 'status_feedback_id', 'content' => 'content');\n\n if (array_key_exists($arrayFeedbackAssoc['id'], $bodyRaw)) {\n // check id parametr\n if (!preg_match(\"/^[0-9]*$/\",$bodyRaw[$arrayFeedbackAssoc['id']])) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: id'));\n }\n\n // Search record by id in the database \n if (in_array('admin', $userRole)) {\n $queryFeedback = Feedback::find()->where(['id' => $bodyRaw[$arrayFeedbackAssoc['id']]]); // get all records\n } else {\n $queryFeedback = Feedback::find()->where(['AND', ['id' => $bodyRaw[$arrayFeedbackAssoc['id']]], ['created_by'=> $userByToken->id]]); // get records created by this user\n }\n $modelFeedback = $queryFeedback->one();\n\n if (empty($modelFeedback)) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: В БД не найден Отзыв по id'));\n }\n\n foreach ($arrayFeedbackAssoc as $nameFeedbackAssoc => $valueFeedbackAssoc) {\n if (array_key_exists($valueFeedbackAssoc, $bodyRaw)) {\n if ($modelFeedback->hasAttribute($nameFeedbackAssoc)) {\n $modelFeedback->$nameFeedbackAssoc = $bodyRaw[$arrayFeedbackAssoc[$nameFeedbackAssoc]];\n if (!$modelFeedback->validate($nameFeedbackAssoc)) return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: параметр '.$valueRequestAssoc));\n\n $modelFeedback->created_by = $userByToken->id;\n $modelFeedback->updated_at = time();\n }\n }\n }\n\n // Save Feedback object\n if ($modelFeedback->validate()) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n $flagFeedback = $modelFeedback->save(false); // update Feedback table\n\n if ($flagFeedback) {\n $transaction->commit();\n } else {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } catch (Exception $ex) {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации'));\n }\n\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 0, 'type' => 'success', 'message' => 'Отзыв успешно сохранен'));\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Отсутствет id параметр в запросе'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Тело запроса не обработано'));\n }\n }", "public function updateSuccess();", "function ajaxList() {\r\n $this->rdAuth->noStudentsAllowed();\r\n // Set up the list\r\n $this->setUpAjaxList();\r\n // Process the request for data\r\n $this->AjaxList->asyncGet();\r\n }", "protected function ajax() {\n\t\t// Ignore invalid AJAX requests, AJAX requests should always contain a vote\n\t\tif ( ! $this->is_ajax or empty( $this->new_vote ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Load results and vote feedback\n\t\t$this->load_results();\n\t\t$this->load_vote();\n\n\t\t// Send the item back in JSON format\n\t\techo json_encode( $this->item );\n\t}", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function actionuserProfileAjax()\n\t{\n\t\tYii::app()->session['currentTab'] = 'Profile';\n\t\t\n\t\t$userObj = new Users();\n\t\t$profileData = $userObj->getProfileDataForEntrepreneur(Yii::app()->session['fmuserId']); \n\t\t\n\t\t$advisorsObj = new Advisors();\n\t\t$advisorData = $advisorsObj->getAdvisorByUserId(Yii::app()->session['fmuserId']);\n\t\t\n\t\t/*print \"<pre>\";\n\t\tprint_r($profileData);\n\t\tprint_r($advisorData);\n\t\texit;*/ \n\t\tif((isset($advisorData) && !empty($advisorData)) || (isset($profileData) && !empty($profileData)))\n\t\t\n\t\t{\n\t\t\n\t\t\t$data = array_merge($profileData,$advisorData);\n\t\t\t$this->render('userProfile_ajax',$data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render('userProfile_ajax');\n\t\t}\n\t\t\n\t}", "public function changeLoggedUserInfo() {\n try {\n /* Check if for the empty or null id, username and password parameters */\n if (isset($_POST[\"id\"]) && isset($_POST[\"username\"]) && isset($_POST[\"password\"]) && isset($_POST[\"email\"])) {\n // Get the id, username and password parameters from POST request\n $form_data = array(\n ':id' => $_POST[\"id\"],\n ':username' => $_POST[\"username\"],\n ':password' => $_POST[\"password\"],\n ':email' => $_POST[\"email\"]\n );\n // Check for existent data in Database\n $query = \"\n select access\n from tb_user \n where id = ?\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id\n $statement->execute([$form_data[':id']]);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Create a SQL query to update the existent user with a new username and password for this passed id\n $query = \"\n update tb_user\n set username = :username, \n password = :password, \n email = :email\n where id = :id\n \";\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id, username and password\n $statement->execute($form_data);\n // Check if any affected row\n if ($statement->rowCount()) {\n // Check for open session\n if (isset($_SESSION['views'])) {\n // Update new logged user info into session\n $_SESSION[$_SESSION['views'].'id'] = $form_data[':id'];\n $_SESSION[$_SESSION['views'].'username'] = $form_data[':username'];\n $_SESSION[$_SESSION['views'].'password'] = $form_data[':password'];\n $_SESSION[$_SESSION['views'].'email'] = $form_data[':email'];\n $_SESSION[$_SESSION['views'].'access'] = $row['access'];\n // data[] is a associative array that return json\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'There is no such session available!');\n }\n } else {\n $data[] = array('result' => 'No operations performed on the database!');\n }\n } else {\n $data[] = array('result' => 'Nvalid user id!');\n }\n } else {\n // Check for missing parameters\n if (!isset($_POST[\"id\"]) && !isset($_POST[\"username\"]) && !isset($_POST[\"password\"]) && !isset($_POST[\"email\"])) {\n $data[] = array('result' => 'All missing parameters for changing the authenticated user data!');\n } elseif (!isset($_POST[\"id\"])) {\n $data[] = array('result' => 'Missing id parameter !!');\n } elseif (!isset($_POST[\"username\"])) {\n $data[] = array('result' => 'Missing username parameter!!');\n } elseif (!isset($_POST[\"password\"])) {\n $data[] = array('result' => 'Missing password parameter!!');\n } else {\n $data[] = array('result' => 'Missing email parameter !!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "public function index(Request $request)\n {\n if($request->ajax()){\n try{\n $status = ($request->status==\"0\") ? 1 : 0;\n User::findOrFail((int)$request->id)->update(['status'=>$status]);\n return \"true\";\n }catch(\\Exception $e){\n\n }\n }else{\n $user = User::where('role',0)->get();\n return view($this->module.'.list',compact('user'));\n } \n }", "public function ajax_update()\n {\n if($this->input->post('status') === 'Gesloten')\n {\n $today = date(\"Y-m-d H:i:s\");\n $this->_validate();\n $data = array(\n 'TK_Status' => $this->input->post('status'),\n 'TK_Prioriteit' => $this->input->post('prioriteit'),\n 'TK_Categorie' => $this->input->post('Categorie'),\n 'TK_Sluitdatum' => $today,\n 'TK_WerkmanID' => $this->input->post('werknemers'),\n );\n }\n else{\n $this->_validate();\n $data = array(\n 'TK_Status' => $this->input->post('status'),\n 'TK_Prioriteit' => $this->input->post('prioriteit'),\n 'TK_Categorie' => $this->input->post('Categorie'),\n 'TK_WerkmanID' => $this->input->post('werknemers'),\n );\n }\n\n\n\t\t$this->Dispatcher_model->update(array('TK_ID' => $this->input->post('id')), $data);\n\n\t\techo json_encode(array('status' => TRUE));\n }", "private function updateUser(){\n\t\t$data['datosUsuario'] = $this->users->get($_REQUEST[\"idusuario\"]);\n\t\t$data['tipoUsuario'] = Seguridad::getTipo(); \n\t\tView::show(\"user/updateForm\", $data);\n\t}", "public function displayAjaxChangeBlockStatus()\n {\n $now = new DateTime();\n $psreassuranceId = (int) Tools::getValue('idpsr');\n $newStatus = ((int) Tools::getValue('status') == 1) ? 0 : 1;\n\n $dataToUpdate = [\n 'status' => $newStatus,\n 'date_upd' => $now->format('Y-m-d H:i:s'),\n ];\n $whereCondition = 'id_psreassurance = ' . $psreassuranceId;\n\n $updateResult = Db::getInstance()->update('psreassurance', $dataToUpdate, $whereCondition);\n\n // Response\n $this->ajaxRenderJson($updateResult ? 'success' : 'error');\n }", "public function actionAjaxAdditionalStatus()\n {\n \t $id=$_REQUEST['id'];\n\t\t \t $rec=AdditionalServices::model()->findByPk($id);\n\n\t\t if($rec->status==0)\n\t\t {\n\t\t $rec->status=1;\n\t\t $rec->save();\n\t\t } \n\t\t else\n\t\t {\n\t\t \t$rec->status=0;\n\t\t $rec->save();\n\t\t }\t\n }", "public function actionAjaxStatus()\n {\n $model=$this->loadPost();\n $options=Post::getStatusOptions();\n $model->status=(count($options)==($model->status+1))?0:($model->status+1);\n $model->save(false);\n echo $model->statusText;\n }", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "public function respon(){\n //update 'status'\n }", "function user_action_user_edit($env, $vars) {\n $response_json = UserFactory::requestAction($env, $vars['data']['action'], $vars['data']);\n exit($response_json);\n}", "public function actionMakeReviewable() {\n\n if (Yii::app()->request->isAjaxRequest && isset($_POST['ajaxData']['id'])) {\n $_GET['id'] = $_POST['ajaxData']['id'];\n $model = $this->loadModel();\n $model->status = '2';\n if (false === $model->validate()) {\n // if something goes wrong send back error messages\n echo CHtml::errorSummary($model);\n Yii::app()->end();\n } else {\n if ($model->save(false)) { // false because we've already validated\n Generic::newState($model->id, $model->status);\n echo $this->pQ();\n Yii::app()->end();\n }\n }\n }\n }", "function onProcess () {\n switch (parent::getAction()) {\n case \"save\":\n if (Context::hasRole(\"user.friendRequest.edit\")) {\n }\n parent::blur();\n parent::redirect();\n break;\n case \"edit\":\n if (Context::hasRole(\"user.friendRequest.edit\")) {\n parent::focus();\n }\n break;\n case \"accept\":\n if (Context::hasRole(\"user.friendRequest.view\")) {\n $friendRequest = UserFriendModel::getFriendRequest(parent::get(\"id\"));\n if (!empty($friendRequest) && $friendRequest->dstuserid == Context::getUserId()) {\n UserFriendModel::confirmUserFriendRequest($friendRequest->id);\n SocialController::notifyFriendAccepted($friendRequest->id);\n }\n }\n break;\n case \"decline\":\n if (Context::hasRole(\"user.friendRequest.view\")) {\n $friendRequest = UserFriendModel::getFriendRequest(parent::get(\"id\"));\n if (!empty($friendRequest) && $friendRequest->dstuserid == Context::getUserId()) {\n UserFriendModel::declineUserFriendRequest($friendRequest->id);\n }\n }\n break;\n default:\n if (parent::get(\"userId\")) {\n Context::setSelectedUser(parent::get(\"userId\"));\n } else if (parent::param(\"mode\") == self::modeCurrentUser) {\n Context::setSelectedUser(Context::getUserId());\n }\n }\n }", "protected function onUpdateAjax()\n\t\t{\n\t\t\tif($this->errMsg) {\n\t\t\t\t$this->getParentByType('\\System\\Web\\WebControls\\Page')->loadAjaxJScriptBuffer(\"Rum.id('{$this->getHTMLControlId()}').style.display='inline';\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->getParentByType('\\System\\Web\\WebControls\\Page')->loadAjaxJScriptBuffer(\"Rum.id('{$this->getHTMLControlId()}').style.display='none';\");\n\t\t\t}\n\n\t\t\t$this->getParentByType('\\System\\Web\\WebControls\\Page')->loadAjaxJScriptBuffer(\"Rum.id('{$this->getHTMLControlId()}').innerHTML='{$this->errMsg}';\");\n\t\t}", "function inactive_user_type() //load a form with data to be updated\n \t{\n\t $this->load->model('Sup_admin');\n\t $this->load->model('Crud_model');\n\t $csrf_token=$this->security->get_csrf_hash();\n\t $id=$this->uri->segment('3');\n\t $dat=array(\"user_type_id_pk\"=>$id);\n\t $query=$this->Sup_admin->user_type_id_pk($dat);\n\t $da['records']=$query->result();\n\t $data=array(\"active_status\"=>$this->input->post('state'));\n\t $id=$this->input->post('id');\n\t $this->load->model('Sup_admin');\n\t $this->load->model('Crud_model');\n\t $this->db->trans_off();\n $this->db->trans_strict(FALSE);\n $this->db->trans_start();\n\t\t$res = $this->Sup_admin->update_user_type($data,$id);\n\t if($res){\n\t\t$this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\tcurrent_url(),\n\t\t\t\t\t\t\t'User type table updated',\n\t\t\t\t\t\t\t'Custom message here');\n\t\t $result = array('message'=>\"done\",'csrf_token'=>$csrf_token);\n\t\t $this->del_cache();\n\t }else{\n\t\t $result = array('message'=>\"failed\",'csrf_token'=>$csrf_token);\n\t\t\t\n\t }\n\t $this->db->trans_complete();\n\t\techo json_encode($result);\n\t}", "public function changeUserStatusAction()\n {\n $id = $this->_getParam('id');\n $guid = $this->_getParam('guid');\n $usersNs = new Zend_Session_Namespace(\"members\");\n if($usersNs->userId==$id)\n {\n $this->_flashMessenger->addMessage(array('error'=>'You cannot change your status!' ));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n exit;\n } \n $this->view->user_id = $id;\n $model1 = new Security_Model_User();\n $model = $model1->fetchRow(\"id='{$id}' and row_guid='{$guid}'\");\n if(false===$model )\n {\n $this->_flashMessenger->addMessage(array('error'=>'Invalid request! Please try again.'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n }\n \n \n if($model->getStatus()==1)\n $model->setStatus (0);\n else\n $model->setStatus (1);\n \n if($model->save())\n {\n $this->_flashMessenger->addMessage(array('success'=>'Status changed for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n else\n {\n $this->_flashMessenger->addMessage(array('error'=>'Failed to change the status for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n \n }", "public function editprofile()\n {\n //make sure user is logged in\n Auth::checkAuthentication();\n $data = array('ajaxform'=>'load');\n \n //loads user data from session, gives save button(post)\n $this->View->render('user/editProfile',$data);\n }", "public function ajax_frontend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "function inactive_page_view() //load a form with data to be updated\n \t{\n\t $this->load->model('Sup_admin');\n\t $this->load->model('Crud_model');\n\t\t$csrf_token=$this->security->get_csrf_hash();\n\t $id=$this->uri->segment('3');\n\t $dat=array(\"privilege_id_pk\"=>$id);\n\t $query=$this->Sup_admin->privilege_id_pk($dat);\n\t $da['records']=$query->result();\n\t $data=array(\"active_status\"=>$this->input->post('state'));\n\t $id=$this->input->post('id');\n\t $this->load->model('Sup_admin');\n\t $this->db->trans_off();\n\t $this->db->trans_strict(FALSE);\n\t $this->db->trans_start();\n\t\t$res = $this->Sup_admin->update_page_view($data,$id);\n\t if($res){\n\t\t $result = array('message'=>\"done\",'csrf_token'=>$csrf_token);\n\t\t $this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\t current_url(),\n\t\t\t\t\t\t\t 'Pages privilege table updated',\n\t\t\t\t\t\t\t 'Custom message here');\n\t\t $this->del_cache();\n\t }else{\n\t\t $result = array('message'=>\"failed\",'csrf_token'=>$csrf_token);\n\t\t\t\n\t }\n\t\techo json_encode($result);\n\t\t$this->db->trans_complete();\n\t}", "public function accept()\n {\n\n $update['id'] = $this->session->userdata('user_id');\n $update['data']['agree'] = '1';\n $update['table'] = 'users';\n $this->Application_model->update($update);\n\n redirect('/dashboard','refresh');\n\n }", "public function action_user_selected()\n {\n $user = new Model_User();\n $user->find((int) $this->request->param('user_id'));\n $values = $user->values();\n $values['user_name'] = $user->name;\n $this->request->response = JSON_encode($values);\n }", "function doLoginAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $user = new User(\n $this->request->getPost('username')\n , $this->request->getPost('password')\n );\n\n if ($user->isRegisted()) {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_200]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_200\n , HttpStatus::SC_DESC[HttpStatus::SC_200]\n , HttpStatus::CT_TEXT_PLAIN\n );\n } else {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_401]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_401\n , HttpStatus::SC_DESC[HttpStatus::SC_401]\n , HttpStatus::CT_TEXT_PLAIN\n );\n }\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function run()\n {\n $resArr = $this->userPswdUpdateStepTwo();\n\n // Get new csrf token\n $resArr['csrf']['tokenName'] = $this->csrf->getTokenName();\n $resArr['csrf']['token'] = $this->csrf->getToken();\n\n // Set JSON header\n $response = new Response();\n $response->setContentType('json');\n\n // Print out response as JSON\n echo json_encode($resArr);\n }", "public function updateAction()\n {\n }", "public function changeStatusAjaxAction()\n\t{\n\t\t$data = $this->getRequest()->getPost();\n\t\tif($data){\n\t\t\tif($data['lb_item_status']!=\"\"){\n\t\t\t\t$order = Mage::getModel('sales/order')->load($data['order_id']);\n\t\t\t\t$orderStatus = $order->getStatus();\n\t\t\t\t$lbOrderItemInstance = Mage::getModel('dropship360/orderitems')->getCollection()->addFieldToFilter('item_id', $data['lb_item_id']);\n\t\t\t\ttry{\n\t\t\t\t\tif($lbOrderItemInstance->count() > 0){\t\t\t\n\t\t\t\t\t\tforeach($lbOrderItemInstance as $item){\n\t\t\t\t\t\t\t$itemStatusHistory = Mage::helper('dropship360')->getSerialisedData($item, $data['lb_item_status'], $orderStatus);\n\t\t\t\t\t\t\t$item->setLbItemStatus($data['lb_item_status']);\n\t\t\t\t\t\t\t$item->setItemStatusHistory($itemStatusHistory);\n\t\t\t\t\t\t\t$item->setUpdatedBy('User');\n\t\t\t\t\t\t\t$item->setUpdatedAt(Mage::getModel('core/date')->gmtDate());\n\t\t\t\t\t\t\t$item->save();\t\n\t\t\t\t\t\t\tif($data['lb_item_status']==$item->getLbItemStatus()){\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status successfully changed to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status unable to change to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\tif($data['lb_item_status'] == 'Transmitting'){\n\t\t\t\t\t\tMage::getModel('dropship360/logicbroker')->setupNotification();\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$result = Mage::helper('core')->jsonEncode($data);\n\t\t\t\t\tMage::app()->getResponse()->setBody($result);\n\t\t\t\t}catch(Exception $e){\t\t\t\n\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$data['msg'] = 'Unable to perform the required operation';\n\t\t}\t\n\t}", "public function updateUser(Request $request)\n { \n\n if($request->ajax()){\n\n $repositories = new UsersRepositories;\n $user = $repositories->getUser( $request->id );\n $auth = $repositories->getUser( Hashids::encode ( Auth::user()->id ) );\n $ranks = $repositories->AgentRanks();\n $agents = $repositories->Recruiters();\n $recruiter = null;\n\n if( !empty( $user->recruiter) ) { \n $recruiter = $repositories->getRecruiter( $user->recruiter );\n }\n\n $view = view('dashboard.users.forms.update')->with(compact('user','auth', 'ranks', 'agents', 'recruiter'))->render();\n\n return response()->json(['content'=> $view ]);\n\n }\n\n }", "public function update_user_status(){\n\tif($this->session->userdata('logged_in')){\n\t\t//cleanup old logins\n\t\t$this->um_users_model->cleanup_expired_logins();\n\t\t//report the current status\n\t\t$session_data= $this->session->userdata('logged_in');\n\t\t$dbdata=array(\n\t\t\t'loggedusername'=>$session_data['username'],\n\t\t\t'ip'=>$this->session->userdata('ip_address'),\n\t\t\t'lastactivity'=>time(),\n\t\t\t'useragent'=>$this->session->userdata('user_agent'),\n\t\t\t'online'=>$this->um_users_model->get_user_online_setting($session_data['username'])\n\t\t);\n\t\t\n\t\tif($this->um_users_model->is_user_logged_in($session_data['username'])){\n\t\t\t$this->um_users_model->update_user_logged_in($session_data['username'],$dbdata);\n\t\t}else{\n\t\t\t$this->um_users_model->register_user_as_logged_in($dbdata);\n\t\t}\n\t\n\t}\n\t}", "public function profileUpdate(UpdateUserRequest $request,$user_id)\n {\n\t\t$data=array();\n\t\t $result =array();\n\t\t $requestData = User::where('id',$user_id);\n\t\t $stored_data = User::where('id',$user_id)->first()->toArray();\n\t\t \n\t\tif($request->ajax()){\n\t\t\t$data =array();\n\t\t\t$data['first_name']= $request->first_name;\n\t\t\t$data['last_name']= $request->last_name;\n\t\t\n\t\t\t$requestData->update($data);\n\t\t\t\n\t\t\t//UPDATE PROFILE EVENT LOG END \n\t\t\t$result['success'] = true;\n\t\t\t$result['message'] = 'Your details has been successfully changed.';\n\t\t \n\t\t return Response::json($result, 200);\n\t\t}\n\t\t\n }", "function registerAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $userObj = new User(\n $this->request->getQuery('username')\n , $this->request->getQuery('password')\n );\n $userObj->save();\n\n return parent::httpResponse(json_encode($userObj));\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "function checkSessionAjax(){\r\n if (!$this->Session->check('User'))\r\n {\r\n \t// Force the user to login\r\n $this->redirect('/user/ajaxnologin');\r\n exit();\r\n }\r\n\t}", "public function refreshUserInfo ()\n\t{\n\n\t\t$this->userInfo = $_SESSION[ $this->userSessionParam ];\n\t\t$this->refreshModules();\n\t\t$this->refreshAllowance();\n\t}", "protected function getUserInputForUpdate() {}", "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 handleRequest(){\n\n check_ajax_referer( 'mvc-ajax' );\n \n $class = apply_filters( 'mvc_theme_ajax_handle_class', $this->getControllerObject( $_POST['controller'] ), $_POST );\n\n if( !$this->no_priv ){\n if( !isset( $class->ajax_allow ) || !in_array( $_POST['method'], $class->ajax_allow ) ){\n echo 'This method has not been added to the ajax_allow allowed list';\n exit();\n } \n }\n\n $data = $class->{$_POST['method']}($_POST['args']);\n \n if( !is_string( $data ) ){\n echo json_encode( $data );\n } else {\n echo $data;\n }\n exit(); \n }", "public function status_update()\n {\n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n }\n \n if ($this->input->server('REQUEST_METHOD') != 'POST') {\n show_ajax_error('403', lang('error_message_forbidden'));\n }\n \n $id = $this->input->post('id',TRUE);\n $status = $this->input->post('status',TRUE);\n if (empty($id) || empty($status)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $result = $this->cms_page_model->as_array()->get($id);\n if (empty($result)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $status = ($status == \"true\") ? 1 : 0;\n if ($this->cms_page_model->update($id, array('status' => $status))) {\n if ($status) {\n set_ajax_flashdata('success', lang('status_enabled'));\n } else {\n set_ajax_flashdata('success', lang('status_disabled'));\n }\n } else {\n set_ajax_flashdata('error', lang('error_message'));\n }\n }", "function culturefeed_pages_edit_membership_form_submit(&$form, &$form_state) {\n\n $form_state['#success'] = TRUE; // This boolean will be checked at in the ajax callback.\n drupal_set_message(t('Membership changed'));\n\n}", "public function ajax_update_alamat()\n {\n $data['user_id'] = $this->user['id'];\n $update = $this->home->update_alamat($data);\n\n if($update){\n echo json_encode(array(\"response\" => 'SUKSES', 'act' => \"upd\"));\n }else{\n echo json_encode(array(\"response\" => 'GAGAL', 'act' => \"upd\"));\n }\n }", "public function actionAct()\r\n {\r\n\r\n if(isset($_GET['_ukey']))\r\n {\r\n //$model = new Users();\r\n $uid = intval($_GET['uid']);\r\n $str = Users::model()->findByPk($uid);\r\n $key = $str->password;\r\n\r\n if($key === $_GET['_ukey'] && $str->access_user === '0')\r\n {\r\n $cookieID = new CHttpCookie('__utId',$uid);\r\n Yii::app()->request->cookies['__utId'] = $cookieID;\r\n\r\n $model_auto_login = new LoginForm();\r\n $_POST['LoginForm']['email'] = $str->email;\r\n $_POST['LoginForm']['password'] = $str->password;\r\n\r\n $model_auto_login->attributes = $_POST['LoginForm'];\r\n\r\n if($model_auto_login->login())\r\n {\r\n unset(Yii::app()->request->cookies['__utId']);\r\n\r\n if(Users::model()->updateByPk($uid,array('access_user'=>'1')))\r\n {\r\n //print 'success';\r\n $this->redirect('/users/');\r\n }\r\n else {\r\n //print 1;\r\n $this->redirect('/');\r\n }\r\n }\r\n else {\r\n //print 2;\r\n $this->redirect(\"/\");\r\n }\r\n }\r\n else {\r\n //print 3;\r\n $this->redirect(\"/\");\r\n }\r\n }\r\n\r\n }", "function update_template_statuss(){ \n\t\t$user_id = $this->input->post('user__id');\n\t\t$id = $this->input->post('temp_id');\n\t\t $status = $this->input->post('status');\n\t\t echo $this->InteractModal->add_user_meta( $user_id, 'status_template_id_'.$id , $status);\t\t\n\t}", "public function request() { if($this->allowed(USER_WORKER)) {\n switch($this->action) {\n case 'pendingAmount':\n $this->getPending();\n break;\n case 'pendingList':\n $this->getRequests();\n break;\n case 'rejectedList':\n $this->getRequests('rejected');\n break;\n case 'acceptedList':\n $this->getRequests('accepted');\n break;\n case 'reject':\n $this->reject();\n break;\n case 'accept':\n $this->accept();\n break;\n default:\n $this->updateValue();\n break;\n }\n // direct update\n // TODO\n } else if ( ! $this->action ) {\n if($this->institution && testInstitution($this->institution)) {\n $this->appendToQueue();\n } else {\n $this->denied();\n }\n }\n }", "public function post_edit() {\n //try to edit the user\n if (AuxUser::editUser()) {\n //if the edit process worked, redirect to the profile page\n echo '<script>alert(\"User data edited\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"No data was updated, Please confirm that you change at least one field\");</script>';\n Response::redirect('/user/edit', 'refresh');\n }\n }", "public function ajaxpingAction()\r\n\t{\r\n\t\t$sid = $this->request->getParam(\"session\");\r\n\t\t$arr['live'] = $this->engine->ping($sid);\r\n $this->request->setParam(\"format\", \"json\");\r\n $this->request->setParam(\"render\", \"false\");\r\n $response = $this->getResponse(); \r\n $response->setContent(json_encode($arr)); \r\n // returned to View\\Listener\r\n return $response;\r\n\t}", "public function getUserInLive_post() {\n /* check game live */\n $UserList = $this->SnakeDrafts_model->getUserInLive();\n if ($UserList['Status'] == 1) {\n $this->Return['Data'] = $UserList['Data'];\n $this->Return['Message'] = $UserList['Message'];\n } else {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = $UserList['Message'];\n }\n }" ]
[ "0.71458447", "0.6762442", "0.67342544", "0.6637328", "0.65887475", "0.6523613", "0.6452264", "0.6402767", "0.63874763", "0.63832074", "0.6275622", "0.62668157", "0.62442404", "0.61525166", "0.61373824", "0.61338836", "0.60916984", "0.6059978", "0.60338604", "0.60128397", "0.60109", "0.5996916", "0.5993834", "0.59763545", "0.5975733", "0.596752", "0.5940464", "0.5934954", "0.59296906", "0.5927147", "0.5927003", "0.5897814", "0.58925796", "0.58754325", "0.58578753", "0.58478343", "0.5843135", "0.58381885", "0.5834528", "0.5833163", "0.5832076", "0.58295476", "0.58100736", "0.58063745", "0.5805273", "0.5799929", "0.5799503", "0.5790101", "0.57868755", "0.5784856", "0.5781927", "0.57787865", "0.5777059", "0.5756658", "0.57547957", "0.57539034", "0.57539034", "0.5741012", "0.5740322", "0.57286656", "0.5722856", "0.57177085", "0.5716286", "0.5716075", "0.5712356", "0.5700877", "0.56899834", "0.56847966", "0.567506", "0.5661416", "0.56587464", "0.5658591", "0.56373066", "0.5635628", "0.5634927", "0.56297004", "0.5625756", "0.5624314", "0.56221515", "0.5614327", "0.5614227", "0.56121695", "0.56072986", "0.5607141", "0.5606512", "0.55987316", "0.5598417", "0.55871505", "0.55857724", "0.5576401", "0.55716103", "0.55711025", "0.5571078", "0.5568456", "0.5567183", "0.55650264", "0.55622315", "0.555298", "0.5552705", "0.5549083" ]
0.6703804
3
/ This action is for AJAX request. It is updated user state
public function actionDeleteRole () { $auth = Yii::$app->getAuthManager(); $role = $auth->getRole(Yii::$app->request->get('id')); $auth->remove($role); $url = Yii::$app->request->referrer . '#roles'; Yii::$app->response->redirect($url); Yii::$app->end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajax()\n {\n /*if($name!=\"\"){\n switch($name){\n case 'change_active':\n $post['active'] = $status;\n $this->User_model->update($post, $id); \n break;\n } \n exit;\n }*/\n \n $this->app->get_table_data('users'); \n }", "public function ajax()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n $post = $this->request->request->all();\n\n if ($user_id) {\n $user = $this->user_logic->getUserById($user_id);\n if ($user !== false) {\n if (! empty($user) AND is_array($user)) {\n\n $user = array_pop($user);\n\n $ajax_data['code'] = 0;\n $ajax_data['data']['user'] = $user;\n $ajax_data['message'] = 'User Data Found;';\n\n switch($post['action']) {\n\n case 'update' : $result = $this->user_logic->ajaxUpdate($user,$post['unit_id'],$post['fields'],$post['values']);\n $ajax_data['message'] = $result;\n break;\n\n default : $ajax_data['message'] .= ' Processing unit_id: '. $post['unit_id'] . ';';\n $ajax_data['message'] .= ' Action: '. $post['action'] . ';';\n\n }\n\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'User does not exist'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Failed to get user info'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid user id';\n }\n \n $this->ajax_respond($ajax_data);\n }", "public function ajaxMemberStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Member is Active now.' : 'Member is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating member status to Active.' : 'Error while updating member status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function actionUserState ()\n\t\t{\n\t\t\t$userClass = $this->module->modelUser;\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$user = $userClass::findOne($post[ 'id' ]);\n\t\t\tif (!is_null($user))\n\t\t\t{\n\t\t\t\t$user->active = $post[ 'state' ];\n\t\t\t\t$user->save();\n\t\t\t}\n\t\t\techo $post[ 'state' ];\n\n\t\t\tYii::$app->end();\n\t\t}", "public function userupdatesuccessAction()\n {\n }", "public function onAjaxUser()\n\t{\n\t\t$id = $this->app->input->get('id');\n\t\t$domain = $this->params->get('url', 'http://localhost');\n\t\t$endpoint = '/api/index.php/v1/users';\n\t\t$this->serverUrl = $domain . $endpoint;\n\n\t\t// Get an instance of the generic tag model\n\t\tJModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/models/', 'UsersModel');\n\t\tJTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/tables/');\n\t\t$model = JModelLegacy::getInstance('User', 'UsersModel', array('ignore_request' => true));\n\n\t\t$item = $model->getItem($id);\nvar_dump($item);exit();\n\t\t$item->password2 = $item->password;\n\t\t$item->requireReset = 1;\n\n\t\t$content = json_encode($item);\n\n\t\ttry\n\t\t{\n\t\t\t$response = $this->sendData($item);\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t// There was an error sending data.\n\t\t\t$this->app->redirect(Route::_('index.php?option=com_users&view=user&layout=edit&id=' . $id, false), ' Connection ', 'error');\n\t\t}\n\n\t\tif ($response->code !== 200)\n\t\t{\n\t\t\t$data = json_decode($response->body);\n\n\t\t\t$this->app->redirect(Route::_('index.php?option=com_users&view=user&layout=edit&id=' . $id, false), $response->code . ' - ' . $data->errors[0]->title, 'error');\n\t\t}\n\n\t\t$this->app->redirect(Route::_('index.php?option=com_users&view=users&layout=edit&id=' . $id, false), 'Exported', 'success');\n\n\t}", "protected function ActionAjaxMode() {\n $userinfo = $this->control->GetUserInfo($_POST['usid'], true);\n $_POST['value'] = $this->CorrectSymplyString($_POST['value']); \n if (!$userinfo) {\n\tprint 'alert(\"User with specified identifier not found!\");';\t\n } else { \n \t$this->SetError(''); \t\n //switch action type\n $ident = '';\n switch ($_POST['type']) {\n\t //change email\n\t case '1': \n\t $ident = 'email';\n\t //check email\n\t if (!$this->validmail($_POST['value'])) { $this->SetError('E-mail is invalid!'); break; }\n\t //check alridy exists\n\t if ($this->control->db->GetLineArray($this->control->db->mPost(\n\t \"select iduser from {$this->ustable} where iduser<>'{$userinfo['iduser']}' and \".\n\t \"Lower(useremail)=Lower('{$_POST['value']}') limit 1\"\n\t ))) { $this->SetError($this->GetText('emailalridyisset')); break; }\n\t //ok, action\n\t if (!$this->control->db->UPDATEAction('users', array(\n\t 'useremail' => $_POST['value']\n\t ), \"iduser='{$userinfo['iduser']}'\", \"1\")) { $this->SetError('Error in modify email record!'); break; }\n\t //ok replace\n\t print '$(\"#email_source'.$_POST['usid'].'\").html(\"'.$_POST['value'].'\");';\t\n\t break;\n\t //change url\n\t case '2':\n\t $ident = 'url';\n\t if ($_POST['value'] == '('.$this->GetText('noresulttext').')') { $_POST['value'] = ''; }\n\t //action\n\t if (!$this->control->db->UPDATEAction('users', array(\n\t 'usersite' => $_POST['value']\n\t ), \"iduser='{$userinfo['iduser']}'\", \"1\")) { $this->SetError('Error in modify url record!'); break; }\n\t //ok replace\n\t print '$(\"#url_source'.$_POST['usid'].'\").html(\"'.\n\t ((!$_POST['value']) ? '('.$this->GetText('noresulttext').')' : $_POST['value']).\n\t '\");';\n\t break;\n\t //balance change\n\t case '3':\n\t $ident = 'balance';\n\t $this->SetError(($this->CheckPostValue('checkwithmessages') ? \n\t $this->control->MoneyProcess(\n\t $userinfo, $_POST['pricedescr'], $userinfo['iduser'] + 15, $_POST['value'], false, $_POST['balanceaction'], true, true\n\t ) : $this->ActionToBalanceDo($userinfo, $_POST['value'], $_POST['balanceaction'])\n\t ));\n\t if ($this->error) { break; }\n\t if ($this->CheckPostValue('checkwithmessages')) {\n\t if (!$userinfo = $this->control->GetUserInfo($userinfo['iduser'], true)) {\n\t\t$this->SetError('Error in get user info!'); break;\n\t }\t\n\t }\n\t $userinfo['purcedata']+=0.00;\n\t //action to replace\n\t print '$(\"#balance_source'.$_POST['usid'].'\").html(\"'.$userinfo['purcedata'].'\");';\n\t //print '$(\"#balance_source'.$_POST['usid'].'\").css(\"color\", \"'.(($userinfo['purcedata']) ? '#008000' : '#000000').'\");'; \n\t break;\n \n /* history tarnsactions */\n case '4': \n $this->control->smarty->assign('username', $_POST['value']);\n print $this->control->smarty->fetch('adm_account/items/users-money-history-list.tpl'); \n exit;\n break;\n \n /* seo panel links */\n case '5':\n $this->control->smarty->assign('username', $_POST['value']);\n $this->control->smarty->assign('userid', $_POST['usid']);\n print $this->control->smarty->fetch('adm_account/items/users-seo-panel-sites.tpl');\n exit; \n break;\n \n /* delete sites from seo panel */\n case '6':\n $s = $_POST['value'];\n $_POST['value'] = @explode(',', $_POST['value']);\n $_POST['usid'] = $this->CorrectSymplyString($_POST['usid']);\n \n foreach ($_POST['value'] as $item) { \n $item = $this->CorrectSymplyString($item);\n $this->control->db->Delete($this->control->tables_list['psitelist'], \n \"userid='{$_POST['usid']}' and iditem='$item'\", \"1\"); \n } \n \n print $s;\n exit;\n break;\n \n /* delete user from group */\n case '7':\n \n $_POST['groupiditem'] = $this->CorrectSymplyString($_POST['groupiditem']);\n $_POST['iduser'] = $this->CorrectSymplyString($_POST['iduser']);\n $_POST['iditem'] = $this->CorrectSymplyString($_POST['iditem']); \n \n $this->control->db->Delete($this->control->tables_list['groupusrs'], \"iditem='{$_POST['iditem']}'\", \"1\"); \n \n print \"{groupiditem:'{$_POST['groupiditem']}', iduser:'{$_POST['iduser']}', iditem:'{$_POST['iditem']}'}\";\n exit;\n break;\n \n /* */\n \n \n \t \n\t //unknow command\n\t default: print 'alert(\"Unknow command identifier!\");'; break;\n }\n }\n print 'alert(\"'.(($this->error) ? $this->error : $this->GetText('optionsissavedok')).'\");';\t \n //restore all process labels \n print '$(\"#'.$ident.'_link'.$_POST['usid'].'\").html(\"'.$this->GetText('modifylabeliditemstr').'\");';\n print '$(\"#'.$ident.'_'.$_POST['usid'].'\").html(\"\");'; \t\n exit;\n }", "public function userinfo()\n {\n if($user = $this->Session->read('user')){\n if(!empty($this->request->data)){\n //update thong tin\n }\n $this->set('user', $user);\n }else{\n $this->redirect(array('action' => 'login', ''));\n }\n }", "public function updraftplus_user_notice_ajax() {\n\n\t\tif (is_user_logged_in() && current_user_can('manage_options')) {\n\t\t\t$this->process_user_notice_ajax();\n\t\t}\n\t}", "protected function changeRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('CHANGE_REQUEST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//If no data has been submitted\n\t\t\tif($this->getModel()->getInputString(\"template\", null, \"P\")==null)\n\t\t\t{\n\t\t\t\t//Get the page content request\n\t\t\t\t$active = $this->getModel()->getCurrentTemplate();\n\t\t\t\t\n\t\t\t\t//Get all available templates\n\t\t\t\t$all = $this->getModel()->getAllTemplates();\n\t\t\t\t\n\t\t\t\t//Create an editor for data\n\t\t\t\t$this->getView()->createTable($active, $all);\n\t\t\t}\n\t\t\t//Data has been submitted to be processed\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Save data\n\t\t\t\t$this->getModel()->saveTemplateData();\n\t\t\t\t\n\t\t\t\t//Redirect\n\t\t\t\t$this->getView()->setTemplateRedirect();\n\t\t\t}\n\t\t}\n\t}", "public function ajaxStaffStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Staff is Active now.' : 'Staff is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating staff status to Active.' : 'Error while updating staff status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function actionReviewersAssigned() {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['ajaxData']['id'])) {\n $_GET['id'] = $_POST['ajaxData']['id'];\n $model = $this->loadModel();\n $model->status = '3';\n\n if (!$model->save()) {\n echo 'f';\n } else {\n Generic::newState($model->id, $model->status);\n echo $this->pQ();\n Yii::app()->end();\n }\n }\n }", "public function process_user_notice_ajax() {\n\t\t$return = array('code' => 'fail', 'data' => '');\n\t\t\n\t\tif (!isset($_POST['subaction'])) {\n\t\t\t$return['code'] = 'error';\n\t\t\t$return['data'] = 'Missing subaction';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t}\n\n\t\tif ('admin_only_login' == $_POST['subaction']) {\n\t\t\tcheck_ajax_referer('updraftplus_admin_only_login', 'nonce');\n\n\t\t\tif (!isset($_POST['admin_only_login'])) {\n\t\t\t\t$return['code'] = 'error';\n\t\t\t\t$return['data'] = 'Missing parameter';\n\t\t\t\techo json_encode($return);\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\t$admin_only = ('true' === $_POST['admin_only_login']);\n\t\t\t\n\t\t\tupdate_site_option('updraftplus_clone_admin_only_login', $admin_only);\n\n\t\t\t$return['code'] = 'success';\n\t\t\t$return['data'] = 'Option updated';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$return['code'] = 'error';\n\t\t\t$return['data'] = 'Unknown action';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t}\n\t}", "public function ajaxAction() {\n $result = $this->_auth->authenticate($this->_adapter);\n if ($result->isValid()) {\n $this->_auth->getStorage()->write(array(\"identity\" => $result->getIdentity(), \"user\" => new Josh_Auth_User($this->_type, $result->getMessages())));\n\n $ident = $this->_auth->getIdentity();\n\n $loggedIn = $this->view->partial('partials/userLoggedIn.phtml', array('userObj' => $ident['user']));\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => 'Successful Login', 'alertClass' => 'alert-success'));\n\n $html = array(\"#userButton\" => $loggedIn, \"alert\" => $alert);\n $this->jsonResponse('success', 200, $html);\n } else {\n $errorMessage = $result->getMessages();\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => $errorMessage['error'], 'alertClass' => 'alert-error'));\n\n $html = array(\"alert\" => $alert);\n $this->jsonResponse('error', 401, $html, $errorMessage['error']);\n }\n }", "public function pendingAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$user = $this->_user;\n if($user->{User::COLUMN_STATUS} == User::STATUS_MEMBER ){\n // Redirect to update if is a member already\n $this->_helper->redirectToRoute('userupdate');\n }\n\n $form = new User_Form_Update($user, true);\n\n // Populate form with data from DB in case user comes back to this page\n $form->populateFromDatabaseData($user->toArray());\n\n $data = $this->_request->getPost();\n if(!$data){\n // Display default data form\n $this->view->form = $form;\n return;\n }\n\n if (!$form->isValid($data)) {\n // Display form with errors\n $this->view->form = $form;\n return;\n }\n\n if(!$this->_updateUser($user, $form->getFormattedValuesForDatabase(), false)){\n // Update failed\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::UPDATE_FAILED));\n }\n\n // Update succeeded, redirect to next page\n $this->_helper->redirectToRoute('userwaitforconfirmation');\n }", "public function account_updated(){\n $this->log();\n http_response_code(200);\n ob_end_flush();\n }", "public function act_auth_ajax()\n\t{\n\t\t$user = User::identify();\n\t\tif ( $user->loggedin ) {\n\t\t\t/**\n\t\t\t * Triggers the ajax plugin action for the context if user is authenticated.\n\t\t\t *\n\t\t\t * @see act_auth_ajax()\n\t\t\t * @action ajax_auth_{$context}\n\t\t\t */\n\t\t\tPlugins::act( 'auth_ajax_' . $this->handler_vars['context'], $this );\n\t\t\texit;\n\t\t}\n\t}", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "public function successUpdate() {\n $this->loadFrontView('profile/after_update');\n }", "public function ChangeUserOnlineStatus()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $output['response'] = $this->database->ChangeUserOnlineStatus('online');\n exit(json_encode($output));\n }", "public function actionAjaxHtStatus()\n {\n \t $id=$_REQUEST['id'];\n\t \t $rec=HtuseHome::model()->findByPk($id);\n\n\t if($rec->status==0)\n\t {\n\t $rec->status=1;\n\t $rec->save();\n\t } \n\t else\n\t {\n\t \t$rec->status=0;\n\t $rec->save();\n\t }\t\n }", "public function handleAjaxRequest();", "public function setstatus()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Ephemerides::', '::', ACCESS_ADMIN));\n\n $eid = $this->request->request->get('eid', 0);\n $status = $this->request->request->get('status', 0);\n $alert = '';\n \n if ($eid == 0) {\n $alert .= $this->__('No ID passed.');\n } else {\n $item = array('eid' => $eid, 'status' => $status);\n $res = DBUtil::updateObject($item, 'ephem', '', 'eid');\n if (!$res) {\n $alert .= $item['eid'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($eid));\n if ($item['status']) {\n $item['status'] = 0;\n } else {\n $item['status'] = 1;\n }\n }\n }\n // get current status to return\n $item = ModUtil::apiFunc($this->name, 'user', 'get', array('eid' => $eid));\n if (!$item) {\n $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($eid));\n }\n\n return new Zikula_Response_Ajax(array('eid' => $eid, 'status' => $item['status'], 'alert' => $alert));\n }", "public function onChangeStatus(){\n \n if (($groupId = post('groupId')) != ''){\n \n $group = UserGroup::findOrFail($groupId);\n \n if (($status = post('status')) != ''){\n $user = $this->getuser();\n \n switch ($status){\n case UserGroup::MEMBERSHIP_ACCEPTED:\n $group->acceptMembership($user);\n break;\n \n case UserGroup::MEMBERSHIP_REJECTED:\n \t$group->rejectMembership($user);\n \tbreak;\n \t\n \tcase UserGroup::MEMBERSHIP_CANCELLED:\n \t\t$group->cancelMembership($user);\n \t\tbreak; \t \n \n } \n }\n }\n \n \n // Updated list of request and other vars\n $this->prepareVars();\n }", "protected function updateAction()\n {\n }", "public function actionChangeUserStatus()\n {\n if (Yii::$app->request->isAjax) {\n $data = Yii::$app->request->post();\n $login = $data['login'];\n $model = UserLikeStatus::find()->where(['login' => $login])->one();\n if ($model) {\n $model->status = $model->status ? 0 : 1;\n } else {\n $model = new UserLikeStatus();\n $model->login = $login;\n $model->status = true;\n }\n\n $model->save();\n\n $text = $model->status ? 'Unlike' : 'Like';\n $response = Yii::$app->response;\n $response->format = \\yii\\web\\Response::FORMAT_JSON;\n $response->data = ['label' => $text];\n $response->statusCode = 200;\n\n return $response;\n } else throw new \\yii\\web\\BadRequestHttpException;\n }", "public function updatePost(){\n\t\t\t//goi ham de update du lieu\n\t\t\t$this->modelUpdate();\n\t\t\t//di chuyen den trang read\n\t\t\techo \"<script>location.href='account/detail';</script>\";\n\t\t}", "public function ajax_response()\n {\n }", "public function voxy_update_user_info()\n {\n $data = $this->input->post();\n\n if(!(isset($data['external_user_id']) && $data['external_user_id'])){\n $this->ajax_data_return['msg'] = 'ID người dùng không hợp lệ !';\n return $this->ajax_response();\n }\n if(isset($data['expiration_date']) && $data['expiration_date'] != ''){\n $data['expiration_date'] = strtotime($data['expiration_date']);\n }\n if(isset($data['date_of_next_vpa']) && $data['date_of_next_vpa'] != ''){\n $data['date_of_next_vpa'] = strtotime($data['date_of_next_vpa']);\n }\n if(isset($data['can_reserve_group_sessions']) && $data['can_reserve_group_sessions'] != ''){\n $data['can_reserve_group_sessions'] = strtolower($data['can_reserve_group_sessions']);\n }\n\n if(isset($data['feature_group']) && $data['feature_group'] != ''){\n $api_data = $this->m_voxy_connect->add_user_to_feature_group($data['external_user_id'], $data['feature_group']);\n if($api_data && isset($api_data['error_message'])) {\n $this->ajax_data_return['msg'] = $api_data['error_message'];\n return $this->ajax_response();\n }\n }\n\n $api_data = $this->m_voxy_connect->update_profile_of_one_user($data['external_user_id'], $data);\n if($api_data && isset($api_data['error_message'])) {\n $this->ajax_data_return['msg'] = $api_data['error_message'];\n } else {\n $this->ajax_data_return['status'] = TRUE;\n $this->ajax_data_return['msg'] = 'Cập nhật thông tin người dùng thành công !';\n $this->ajax_data_return['data'] = $api_data;\n }\n\n return $this->ajax_response();\n }", "public function ajax_user_can()\n {\n }", "public function ajax_user_can()\n {\n }", "function status()\n {\n if(!$this->session->userdata['userData']['session_user_id']){\n redirect('users/login');\n }\n\n $this->session->unset_userdata('active_menu');\n $this->session->set_userdata('active_menu', 'roles');\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $role_id = $this->input->post('id');\n\n\n $role_data = $this->user_mod->get_role_by_id($role_id);\n $title = $role_data->name;\n\n if ($this->input->post('s') == 1) {\n $status = 0;\n $_POST['data']['status'] = $status;\n $status_result = 0;\n } else {\n $status = 1;\n $_POST['data']['status'] = $status;\n $status_result = 1;\n }\n\n $update = $this->user_mod->update_role($_POST['data'], $role_id);\n\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: ' . date('r', time() + (86400 * 365)));\n header('Content-type: application/json');\n\n echo json_encode(array(\n 'valid' => true,\n 'success_message' => $status_result,\n 'title' => $title\n ));\n exit();\n }\n }", "public function callAjaxUpdate () {\n return $this->callAjaxInit();\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "function wp_ajax_add_user($action)\n {\n }", "public function ajaxSetSessionUserId(Request $request)\n {\n if(request()->ajax()) {\n session()->put('sel_user', $request->cur_userid);\n return response()->json(['status' => 200]);\n }\n }", "public function ajax_update_keluarga()\n {\n $data['user_id'] = $this->user['id'];\n $update = $this->home->update_keluarga($data);\n\n if($update){\n echo json_encode(array(\"response\" => 'SUKSES', 'act' => \"upd\"));\n }else{\n echo json_encode(array(\"response\" => 'GAGAL', 'act' => \"upd\"));\n }\n }", "protected function processPutRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'put'\n ]));\n }", "public function ajax_backend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function updateMyAccountInfo()\n {\n $ajax_data = array();\n $post = $this->request->request->all();\n \n // validate POST parameters\n $result = $this->user_logic->validateAccountInfoPostData($post);\n if (($result['error'] == '') AND ! empty($result['params'])) {\n $user_id = $this->user_session->getUserId();\n $update = $this->user_logic->updateUserInfo($user_id, $result['params']);\n if ($update !== false) {\n $ajax_data['code'] = 0;\n $ajax_data['data'] = $post;\n $ajax_data['message'] = 'Updated Account Information'; \n } else {\n $errors = $this->user_logic->getErrorMessage();\n if (! empty($errors) AND is_array($errors)) {\n $errors = implode(',',$errors);\n } else {\n $errors = 'Failed to update account info due to database error';\n }\n \n $ajax_data['code'] = 1;\n $ajax_data['message'] = $ajax_data['validation_error'][] = $errors;\n }\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = $ajax_data['validation_error'][] = $result['error']; \n }\n \n $this->ajax_respond($ajax_data);\n }", "public function processUser(){\n \n $this->setCurrentUser();\n $this->setUsersAttributes();\n }", "public function actionPing(){\n $user = $this->get_current_user($_GET);\n if(!$user){\n $data = array('success'=>false,'error_id'=>1,'error_msg'=>'user doesnt exist');\n $this->renderJSON($data);\n return;\n }\n\n $user->last_activity = date(\"Y-m-d H:i:s\");\n\n if($user->save(false)){\n $data = array('success'=>true);\n $this->renderJSON($data);\n return;\n }else{\n $data = array('success'=>false,'error_id'=>2,'error_msg'=>'user saving user');\n $this->renderJSON($data);\n return;\n }\n }", "public function shared_ajax() {\n\t\tif (empty($_POST['subaction']) || empty($_POST['nonce']) || !is_user_logged_in() || !wp_verify_nonce($_POST['nonce'], 'tfa_shared_nonce')) die('Security check (3).');\n\n\t\tif ($_POST['subaction'] == 'refreshotp') {\n\n\t\t\tglobal $current_user;\n\n\t\t\t$tfa_priv_key_64 = get_user_meta($current_user->ID, 'tfa_priv_key_64', true);\n\n\t\t\tif (!$tfa_priv_key_64) {\n\t\t\t\techo json_encode(array('code' => ''));\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\techo json_encode(array('code' => $this->getTFA()->generateOTP($current_user->ID, $tfa_priv_key_64)));\n\t\t\texit;\n\t\t}\n\n\t}", "public function requestAction()\n {\n return $this->returnAjaxResponse(self::REQUEST);\n }", "function updateUser()\r\n {\r\n return $this->UD->user_update($_GET['uid']);\r\n }", "public function compAjaxUpdate() {\r\n $req = $this->input->post('req');\r\n updateComponentDetails($req);\r\n }", "public function updatePoinsUserAction()\n {\n \t$this->pointServices->updatePointUser($this->getUser());\n \t\n \treturn new Response(\"OK\");\n }", "function admin_add_members_status(){\t\n\t\t$progress = $this->Session->read('Import.progress');\n\t\t\n\t\t$this->layout = 'ajax';\n\t\t$data = array(\n\t\t\t'progress' => $this->Session->read('Import.progress'),\n\t\t\t'total' => $this->Session->read('Import.total')\n\t\t);\n\t\t$this->set('data', $data);\n\t\t$this->render('/ajaxreturn');\n\t}", "public function update_account()\n\t{\n\t\t$data = $this->input->post();\n\t\t\n\t\t$success = $this->user_model->safe_update($this->user->id, $data);\n\t\t\n\t\tif ( $success )\n\t\t{\n\t\t\t$this->json['message'] = 'Your account details have been successfully updated.';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->json['status'] = 'error';\n\t\t\t$this->json['message'] = 'There were errors when attempting update your account.';\n\t\t}\n\t\t\n\t\t$this->json['content'] = $this->update_account_content();\n\t\t\n\t\treturn $this->ajax_response();\n\t}", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "function update_student(){\n\t\t\t//Manage this with Ajax\n\t\t\tprint_r($this->input->post());\n\t\t}", "public function actionUpdate()\n {\n $bodyRaw = json_decode(Yii::$app->getRequest()->getRawBody(), true);\n //$body = json_decode(Yii::$app->getRequest()->getBodyParams(), true);\n\n if (is_array($bodyRaw)) {\n // check user is a guest\n if (array_key_exists('token', $bodyRaw)) {\n $userByToken = \\Yii::$app->user->loginByAccessToken($bodyRaw['token']);\n if (empty($userByToken)) {\n //return $this->goHome();\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n } else {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Аутентификация не выполнена'));\n }\n\n // Get array with user Roles\n $userRole =[];\n $userAssigned = Yii::$app->authManager->getAssignments($userByToken->id);\n foreach($userAssigned as $userAssign){\n array_push($userRole, $userAssign->roleName);\n }\n //return Json::encode(array('method' => 'GET', 'status' => 1, 'type' => 'error', 'message' => $userRole));\n\n // Check rights\n // If user have create right that his allowed to other actions to the Spacialization table\n if (static::CHECK_RIGHTS_RBAC && !\\Yii::$app->user->can('createCustomer') && !\\Yii::$app->user->can('createMediator')) {\n return Json::encode(array('method' => 'PUT', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию обновления'));\n }\n /*\n $flagRights = false;\n foreach(array('admin', 'customer', 'contractor') as $value) {\n if (in_array($value, $userRole)) {\n $flagRights = true;\n }\n }\n if (!$flagRights) return Json::encode(array('method' => 'POST', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Не хватает прав на операцию добавления'));\n */\n\n // Because the field names may match within a single query, the parameter names may not match the table field names. To solve this problem let's create an associative arrays\n $arrayFeedbackAssoc = array ('id' => 'id', 'profile_id' => 'profile_id', 'status_feedback_id' => 'status_feedback_id', 'content' => 'content');\n\n if (array_key_exists($arrayFeedbackAssoc['id'], $bodyRaw)) {\n // check id parametr\n if (!preg_match(\"/^[0-9]*$/\",$bodyRaw[$arrayFeedbackAssoc['id']])) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: id'));\n }\n\n // Search record by id in the database \n if (in_array('admin', $userRole)) {\n $queryFeedback = Feedback::find()->where(['id' => $bodyRaw[$arrayFeedbackAssoc['id']]]); // get all records\n } else {\n $queryFeedback = Feedback::find()->where(['AND', ['id' => $bodyRaw[$arrayFeedbackAssoc['id']]], ['created_by'=> $userByToken->id]]); // get records created by this user\n }\n $modelFeedback = $queryFeedback->one();\n\n if (empty($modelFeedback)) {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: В БД не найден Отзыв по id'));\n }\n\n foreach ($arrayFeedbackAssoc as $nameFeedbackAssoc => $valueFeedbackAssoc) {\n if (array_key_exists($valueFeedbackAssoc, $bodyRaw)) {\n if ($modelFeedback->hasAttribute($nameFeedbackAssoc)) {\n $modelFeedback->$nameFeedbackAssoc = $bodyRaw[$arrayFeedbackAssoc[$nameFeedbackAssoc]];\n if (!$modelFeedback->validate($nameFeedbackAssoc)) return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации: параметр '.$valueRequestAssoc));\n\n $modelFeedback->created_by = $userByToken->id;\n $modelFeedback->updated_at = time();\n }\n }\n }\n\n // Save Feedback object\n if ($modelFeedback->validate()) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n $flagFeedback = $modelFeedback->save(false); // update Feedback table\n\n if ($flagFeedback) {\n $transaction->commit();\n } else {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } catch (Exception $ex) {\n $transaction->rollBack();\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Отзыв не может быть обновлен'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка валидации'));\n }\n\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 0, 'type' => 'success', 'message' => 'Отзыв успешно сохранен'));\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Отсутствет id параметр в запросе'));\n }\n } else {\n return Json::encode(array('method' => 'PUT, PATCH', 'status' => 1, 'type' => 'error', 'message' => 'Ошибка: Тело запроса не обработано'));\n }\n }", "public function updateSuccess();", "function ajaxList() {\r\n $this->rdAuth->noStudentsAllowed();\r\n // Set up the list\r\n $this->setUpAjaxList();\r\n // Process the request for data\r\n $this->AjaxList->asyncGet();\r\n }", "protected function ajax() {\n\t\t// Ignore invalid AJAX requests, AJAX requests should always contain a vote\n\t\tif ( ! $this->is_ajax or empty( $this->new_vote ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Load results and vote feedback\n\t\t$this->load_results();\n\t\t$this->load_vote();\n\n\t\t// Send the item back in JSON format\n\t\techo json_encode( $this->item );\n\t}", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function actionuserProfileAjax()\n\t{\n\t\tYii::app()->session['currentTab'] = 'Profile';\n\t\t\n\t\t$userObj = new Users();\n\t\t$profileData = $userObj->getProfileDataForEntrepreneur(Yii::app()->session['fmuserId']); \n\t\t\n\t\t$advisorsObj = new Advisors();\n\t\t$advisorData = $advisorsObj->getAdvisorByUserId(Yii::app()->session['fmuserId']);\n\t\t\n\t\t/*print \"<pre>\";\n\t\tprint_r($profileData);\n\t\tprint_r($advisorData);\n\t\texit;*/ \n\t\tif((isset($advisorData) && !empty($advisorData)) || (isset($profileData) && !empty($profileData)))\n\t\t\n\t\t{\n\t\t\n\t\t\t$data = array_merge($profileData,$advisorData);\n\t\t\t$this->render('userProfile_ajax',$data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render('userProfile_ajax');\n\t\t}\n\t\t\n\t}", "public function changeLoggedUserInfo() {\n try {\n /* Check if for the empty or null id, username and password parameters */\n if (isset($_POST[\"id\"]) && isset($_POST[\"username\"]) && isset($_POST[\"password\"]) && isset($_POST[\"email\"])) {\n // Get the id, username and password parameters from POST request\n $form_data = array(\n ':id' => $_POST[\"id\"],\n ':username' => $_POST[\"username\"],\n ':password' => $_POST[\"password\"],\n ':email' => $_POST[\"email\"]\n );\n // Check for existent data in Database\n $query = \"\n select access\n from tb_user \n where id = ?\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id\n $statement->execute([$form_data[':id']]);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Create a SQL query to update the existent user with a new username and password for this passed id\n $query = \"\n update tb_user\n set username = :username, \n password = :password, \n email = :email\n where id = :id\n \";\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id, username and password\n $statement->execute($form_data);\n // Check if any affected row\n if ($statement->rowCount()) {\n // Check for open session\n if (isset($_SESSION['views'])) {\n // Update new logged user info into session\n $_SESSION[$_SESSION['views'].'id'] = $form_data[':id'];\n $_SESSION[$_SESSION['views'].'username'] = $form_data[':username'];\n $_SESSION[$_SESSION['views'].'password'] = $form_data[':password'];\n $_SESSION[$_SESSION['views'].'email'] = $form_data[':email'];\n $_SESSION[$_SESSION['views'].'access'] = $row['access'];\n // data[] is a associative array that return json\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'There is no such session available!');\n }\n } else {\n $data[] = array('result' => 'No operations performed on the database!');\n }\n } else {\n $data[] = array('result' => 'Nvalid user id!');\n }\n } else {\n // Check for missing parameters\n if (!isset($_POST[\"id\"]) && !isset($_POST[\"username\"]) && !isset($_POST[\"password\"]) && !isset($_POST[\"email\"])) {\n $data[] = array('result' => 'All missing parameters for changing the authenticated user data!');\n } elseif (!isset($_POST[\"id\"])) {\n $data[] = array('result' => 'Missing id parameter !!');\n } elseif (!isset($_POST[\"username\"])) {\n $data[] = array('result' => 'Missing username parameter!!');\n } elseif (!isset($_POST[\"password\"])) {\n $data[] = array('result' => 'Missing password parameter!!');\n } else {\n $data[] = array('result' => 'Missing email parameter !!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "public function index(Request $request)\n {\n if($request->ajax()){\n try{\n $status = ($request->status==\"0\") ? 1 : 0;\n User::findOrFail((int)$request->id)->update(['status'=>$status]);\n return \"true\";\n }catch(\\Exception $e){\n\n }\n }else{\n $user = User::where('role',0)->get();\n return view($this->module.'.list',compact('user'));\n } \n }", "public function ajax_update()\n {\n if($this->input->post('status') === 'Gesloten')\n {\n $today = date(\"Y-m-d H:i:s\");\n $this->_validate();\n $data = array(\n 'TK_Status' => $this->input->post('status'),\n 'TK_Prioriteit' => $this->input->post('prioriteit'),\n 'TK_Categorie' => $this->input->post('Categorie'),\n 'TK_Sluitdatum' => $today,\n 'TK_WerkmanID' => $this->input->post('werknemers'),\n );\n }\n else{\n $this->_validate();\n $data = array(\n 'TK_Status' => $this->input->post('status'),\n 'TK_Prioriteit' => $this->input->post('prioriteit'),\n 'TK_Categorie' => $this->input->post('Categorie'),\n 'TK_WerkmanID' => $this->input->post('werknemers'),\n );\n }\n\n\n\t\t$this->Dispatcher_model->update(array('TK_ID' => $this->input->post('id')), $data);\n\n\t\techo json_encode(array('status' => TRUE));\n }", "public function displayAjaxChangeBlockStatus()\n {\n $now = new DateTime();\n $psreassuranceId = (int) Tools::getValue('idpsr');\n $newStatus = ((int) Tools::getValue('status') == 1) ? 0 : 1;\n\n $dataToUpdate = [\n 'status' => $newStatus,\n 'date_upd' => $now->format('Y-m-d H:i:s'),\n ];\n $whereCondition = 'id_psreassurance = ' . $psreassuranceId;\n\n $updateResult = Db::getInstance()->update('psreassurance', $dataToUpdate, $whereCondition);\n\n // Response\n $this->ajaxRenderJson($updateResult ? 'success' : 'error');\n }", "public function actionAjaxAdditionalStatus()\n {\n \t $id=$_REQUEST['id'];\n\t\t \t $rec=AdditionalServices::model()->findByPk($id);\n\n\t\t if($rec->status==0)\n\t\t {\n\t\t $rec->status=1;\n\t\t $rec->save();\n\t\t } \n\t\t else\n\t\t {\n\t\t \t$rec->status=0;\n\t\t $rec->save();\n\t\t }\t\n }", "private function updateUser(){\n\t\t$data['datosUsuario'] = $this->users->get($_REQUEST[\"idusuario\"]);\n\t\t$data['tipoUsuario'] = Seguridad::getTipo(); \n\t\tView::show(\"user/updateForm\", $data);\n\t}", "public function actionAjaxStatus()\n {\n $model=$this->loadPost();\n $options=Post::getStatusOptions();\n $model->status=(count($options)==($model->status+1))?0:($model->status+1);\n $model->save(false);\n echo $model->statusText;\n }", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "public function respon(){\n //update 'status'\n }", "function user_action_user_edit($env, $vars) {\n $response_json = UserFactory::requestAction($env, $vars['data']['action'], $vars['data']);\n exit($response_json);\n}", "public function actionMakeReviewable() {\n\n if (Yii::app()->request->isAjaxRequest && isset($_POST['ajaxData']['id'])) {\n $_GET['id'] = $_POST['ajaxData']['id'];\n $model = $this->loadModel();\n $model->status = '2';\n if (false === $model->validate()) {\n // if something goes wrong send back error messages\n echo CHtml::errorSummary($model);\n Yii::app()->end();\n } else {\n if ($model->save(false)) { // false because we've already validated\n Generic::newState($model->id, $model->status);\n echo $this->pQ();\n Yii::app()->end();\n }\n }\n }\n }", "function onProcess () {\n switch (parent::getAction()) {\n case \"save\":\n if (Context::hasRole(\"user.friendRequest.edit\")) {\n }\n parent::blur();\n parent::redirect();\n break;\n case \"edit\":\n if (Context::hasRole(\"user.friendRequest.edit\")) {\n parent::focus();\n }\n break;\n case \"accept\":\n if (Context::hasRole(\"user.friendRequest.view\")) {\n $friendRequest = UserFriendModel::getFriendRequest(parent::get(\"id\"));\n if (!empty($friendRequest) && $friendRequest->dstuserid == Context::getUserId()) {\n UserFriendModel::confirmUserFriendRequest($friendRequest->id);\n SocialController::notifyFriendAccepted($friendRequest->id);\n }\n }\n break;\n case \"decline\":\n if (Context::hasRole(\"user.friendRequest.view\")) {\n $friendRequest = UserFriendModel::getFriendRequest(parent::get(\"id\"));\n if (!empty($friendRequest) && $friendRequest->dstuserid == Context::getUserId()) {\n UserFriendModel::declineUserFriendRequest($friendRequest->id);\n }\n }\n break;\n default:\n if (parent::get(\"userId\")) {\n Context::setSelectedUser(parent::get(\"userId\"));\n } else if (parent::param(\"mode\") == self::modeCurrentUser) {\n Context::setSelectedUser(Context::getUserId());\n }\n }\n }", "protected function onUpdateAjax()\n\t\t{\n\t\t\tif($this->errMsg) {\n\t\t\t\t$this->getParentByType('\\System\\Web\\WebControls\\Page')->loadAjaxJScriptBuffer(\"Rum.id('{$this->getHTMLControlId()}').style.display='inline';\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->getParentByType('\\System\\Web\\WebControls\\Page')->loadAjaxJScriptBuffer(\"Rum.id('{$this->getHTMLControlId()}').style.display='none';\");\n\t\t\t}\n\n\t\t\t$this->getParentByType('\\System\\Web\\WebControls\\Page')->loadAjaxJScriptBuffer(\"Rum.id('{$this->getHTMLControlId()}').innerHTML='{$this->errMsg}';\");\n\t\t}", "function inactive_user_type() //load a form with data to be updated\n \t{\n\t $this->load->model('Sup_admin');\n\t $this->load->model('Crud_model');\n\t $csrf_token=$this->security->get_csrf_hash();\n\t $id=$this->uri->segment('3');\n\t $dat=array(\"user_type_id_pk\"=>$id);\n\t $query=$this->Sup_admin->user_type_id_pk($dat);\n\t $da['records']=$query->result();\n\t $data=array(\"active_status\"=>$this->input->post('state'));\n\t $id=$this->input->post('id');\n\t $this->load->model('Sup_admin');\n\t $this->load->model('Crud_model');\n\t $this->db->trans_off();\n $this->db->trans_strict(FALSE);\n $this->db->trans_start();\n\t\t$res = $this->Sup_admin->update_user_type($data,$id);\n\t if($res){\n\t\t$this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\tcurrent_url(),\n\t\t\t\t\t\t\t'User type table updated',\n\t\t\t\t\t\t\t'Custom message here');\n\t\t $result = array('message'=>\"done\",'csrf_token'=>$csrf_token);\n\t\t $this->del_cache();\n\t }else{\n\t\t $result = array('message'=>\"failed\",'csrf_token'=>$csrf_token);\n\t\t\t\n\t }\n\t $this->db->trans_complete();\n\t\techo json_encode($result);\n\t}", "public function ajax_frontend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "public function changeUserStatusAction()\n {\n $id = $this->_getParam('id');\n $guid = $this->_getParam('guid');\n $usersNs = new Zend_Session_Namespace(\"members\");\n if($usersNs->userId==$id)\n {\n $this->_flashMessenger->addMessage(array('error'=>'You cannot change your status!' ));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n exit;\n } \n $this->view->user_id = $id;\n $model1 = new Security_Model_User();\n $model = $model1->fetchRow(\"id='{$id}' and row_guid='{$guid}'\");\n if(false===$model )\n {\n $this->_flashMessenger->addMessage(array('error'=>'Invalid request! Please try again.'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n }\n \n \n if($model->getStatus()==1)\n $model->setStatus (0);\n else\n $model->setStatus (1);\n \n if($model->save())\n {\n $this->_flashMessenger->addMessage(array('success'=>'Status changed for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n else\n {\n $this->_flashMessenger->addMessage(array('error'=>'Failed to change the status for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n \n }", "public function editprofile()\n {\n //make sure user is logged in\n Auth::checkAuthentication();\n $data = array('ajaxform'=>'load');\n \n //loads user data from session, gives save button(post)\n $this->View->render('user/editProfile',$data);\n }", "function inactive_page_view() //load a form with data to be updated\n \t{\n\t $this->load->model('Sup_admin');\n\t $this->load->model('Crud_model');\n\t\t$csrf_token=$this->security->get_csrf_hash();\n\t $id=$this->uri->segment('3');\n\t $dat=array(\"privilege_id_pk\"=>$id);\n\t $query=$this->Sup_admin->privilege_id_pk($dat);\n\t $da['records']=$query->result();\n\t $data=array(\"active_status\"=>$this->input->post('state'));\n\t $id=$this->input->post('id');\n\t $this->load->model('Sup_admin');\n\t $this->db->trans_off();\n\t $this->db->trans_strict(FALSE);\n\t $this->db->trans_start();\n\t\t$res = $this->Sup_admin->update_page_view($data,$id);\n\t if($res){\n\t\t $result = array('message'=>\"done\",'csrf_token'=>$csrf_token);\n\t\t $this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\t current_url(),\n\t\t\t\t\t\t\t 'Pages privilege table updated',\n\t\t\t\t\t\t\t 'Custom message here');\n\t\t $this->del_cache();\n\t }else{\n\t\t $result = array('message'=>\"failed\",'csrf_token'=>$csrf_token);\n\t\t\t\n\t }\n\t\techo json_encode($result);\n\t\t$this->db->trans_complete();\n\t}", "public function accept()\n {\n\n $update['id'] = $this->session->userdata('user_id');\n $update['data']['agree'] = '1';\n $update['table'] = 'users';\n $this->Application_model->update($update);\n\n redirect('/dashboard','refresh');\n\n }", "public function action_user_selected()\n {\n $user = new Model_User();\n $user->find((int) $this->request->param('user_id'));\n $values = $user->values();\n $values['user_name'] = $user->name;\n $this->request->response = JSON_encode($values);\n }", "function doLoginAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $user = new User(\n $this->request->getPost('username')\n , $this->request->getPost('password')\n );\n\n if ($user->isRegisted()) {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_200]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_200\n , HttpStatus::SC_DESC[HttpStatus::SC_200]\n , HttpStatus::CT_TEXT_PLAIN\n );\n } else {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_401]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_401\n , HttpStatus::SC_DESC[HttpStatus::SC_401]\n , HttpStatus::CT_TEXT_PLAIN\n );\n }\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function updateAction()\n {\n }", "public function run()\n {\n $resArr = $this->userPswdUpdateStepTwo();\n\n // Get new csrf token\n $resArr['csrf']['tokenName'] = $this->csrf->getTokenName();\n $resArr['csrf']['token'] = $this->csrf->getToken();\n\n // Set JSON header\n $response = new Response();\n $response->setContentType('json');\n\n // Print out response as JSON\n echo json_encode($resArr);\n }", "public function changeStatusAjaxAction()\n\t{\n\t\t$data = $this->getRequest()->getPost();\n\t\tif($data){\n\t\t\tif($data['lb_item_status']!=\"\"){\n\t\t\t\t$order = Mage::getModel('sales/order')->load($data['order_id']);\n\t\t\t\t$orderStatus = $order->getStatus();\n\t\t\t\t$lbOrderItemInstance = Mage::getModel('dropship360/orderitems')->getCollection()->addFieldToFilter('item_id', $data['lb_item_id']);\n\t\t\t\ttry{\n\t\t\t\t\tif($lbOrderItemInstance->count() > 0){\t\t\t\n\t\t\t\t\t\tforeach($lbOrderItemInstance as $item){\n\t\t\t\t\t\t\t$itemStatusHistory = Mage::helper('dropship360')->getSerialisedData($item, $data['lb_item_status'], $orderStatus);\n\t\t\t\t\t\t\t$item->setLbItemStatus($data['lb_item_status']);\n\t\t\t\t\t\t\t$item->setItemStatusHistory($itemStatusHistory);\n\t\t\t\t\t\t\t$item->setUpdatedBy('User');\n\t\t\t\t\t\t\t$item->setUpdatedAt(Mage::getModel('core/date')->gmtDate());\n\t\t\t\t\t\t\t$item->save();\t\n\t\t\t\t\t\t\tif($data['lb_item_status']==$item->getLbItemStatus()){\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status successfully changed to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status unable to change to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\tif($data['lb_item_status'] == 'Transmitting'){\n\t\t\t\t\t\tMage::getModel('dropship360/logicbroker')->setupNotification();\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$result = Mage::helper('core')->jsonEncode($data);\n\t\t\t\t\tMage::app()->getResponse()->setBody($result);\n\t\t\t\t}catch(Exception $e){\t\t\t\n\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$data['msg'] = 'Unable to perform the required operation';\n\t\t}\t\n\t}", "public function updateUser(Request $request)\n { \n\n if($request->ajax()){\n\n $repositories = new UsersRepositories;\n $user = $repositories->getUser( $request->id );\n $auth = $repositories->getUser( Hashids::encode ( Auth::user()->id ) );\n $ranks = $repositories->AgentRanks();\n $agents = $repositories->Recruiters();\n $recruiter = null;\n\n if( !empty( $user->recruiter) ) { \n $recruiter = $repositories->getRecruiter( $user->recruiter );\n }\n\n $view = view('dashboard.users.forms.update')->with(compact('user','auth', 'ranks', 'agents', 'recruiter'))->render();\n\n return response()->json(['content'=> $view ]);\n\n }\n\n }", "public function update_user_status(){\n\tif($this->session->userdata('logged_in')){\n\t\t//cleanup old logins\n\t\t$this->um_users_model->cleanup_expired_logins();\n\t\t//report the current status\n\t\t$session_data= $this->session->userdata('logged_in');\n\t\t$dbdata=array(\n\t\t\t'loggedusername'=>$session_data['username'],\n\t\t\t'ip'=>$this->session->userdata('ip_address'),\n\t\t\t'lastactivity'=>time(),\n\t\t\t'useragent'=>$this->session->userdata('user_agent'),\n\t\t\t'online'=>$this->um_users_model->get_user_online_setting($session_data['username'])\n\t\t);\n\t\t\n\t\tif($this->um_users_model->is_user_logged_in($session_data['username'])){\n\t\t\t$this->um_users_model->update_user_logged_in($session_data['username'],$dbdata);\n\t\t}else{\n\t\t\t$this->um_users_model->register_user_as_logged_in($dbdata);\n\t\t}\n\t\n\t}\n\t}", "public function profileUpdate(UpdateUserRequest $request,$user_id)\n {\n\t\t$data=array();\n\t\t $result =array();\n\t\t $requestData = User::where('id',$user_id);\n\t\t $stored_data = User::where('id',$user_id)->first()->toArray();\n\t\t \n\t\tif($request->ajax()){\n\t\t\t$data =array();\n\t\t\t$data['first_name']= $request->first_name;\n\t\t\t$data['last_name']= $request->last_name;\n\t\t\n\t\t\t$requestData->update($data);\n\t\t\t\n\t\t\t//UPDATE PROFILE EVENT LOG END \n\t\t\t$result['success'] = true;\n\t\t\t$result['message'] = 'Your details has been successfully changed.';\n\t\t \n\t\t return Response::json($result, 200);\n\t\t}\n\t\t\n }", "function checkSessionAjax(){\r\n if (!$this->Session->check('User'))\r\n {\r\n \t// Force the user to login\r\n $this->redirect('/user/ajaxnologin');\r\n exit();\r\n }\r\n\t}", "function registerAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $userObj = new User(\n $this->request->getQuery('username')\n , $this->request->getQuery('password')\n );\n $userObj->save();\n\n return parent::httpResponse(json_encode($userObj));\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "protected function getUserInputForUpdate() {}", "public function refreshUserInfo ()\n\t{\n\n\t\t$this->userInfo = $_SESSION[ $this->userSessionParam ];\n\t\t$this->refreshModules();\n\t\t$this->refreshAllowance();\n\t}", "function handleRequest(){\n\n check_ajax_referer( 'mvc-ajax' );\n \n $class = apply_filters( 'mvc_theme_ajax_handle_class', $this->getControllerObject( $_POST['controller'] ), $_POST );\n\n if( !$this->no_priv ){\n if( !isset( $class->ajax_allow ) || !in_array( $_POST['method'], $class->ajax_allow ) ){\n echo 'This method has not been added to the ajax_allow allowed list';\n exit();\n } \n }\n\n $data = $class->{$_POST['method']}($_POST['args']);\n \n if( !is_string( $data ) ){\n echo json_encode( $data );\n } else {\n echo $data;\n }\n exit(); \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 }", "public function status_update()\n {\n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n }\n \n if ($this->input->server('REQUEST_METHOD') != 'POST') {\n show_ajax_error('403', lang('error_message_forbidden'));\n }\n \n $id = $this->input->post('id',TRUE);\n $status = $this->input->post('status',TRUE);\n if (empty($id) || empty($status)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $result = $this->cms_page_model->as_array()->get($id);\n if (empty($result)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $status = ($status == \"true\") ? 1 : 0;\n if ($this->cms_page_model->update($id, array('status' => $status))) {\n if ($status) {\n set_ajax_flashdata('success', lang('status_enabled'));\n } else {\n set_ajax_flashdata('success', lang('status_disabled'));\n }\n } else {\n set_ajax_flashdata('error', lang('error_message'));\n }\n }", "function culturefeed_pages_edit_membership_form_submit(&$form, &$form_state) {\n\n $form_state['#success'] = TRUE; // This boolean will be checked at in the ajax callback.\n drupal_set_message(t('Membership changed'));\n\n}", "public function ajax_update_alamat()\n {\n $data['user_id'] = $this->user['id'];\n $update = $this->home->update_alamat($data);\n\n if($update){\n echo json_encode(array(\"response\" => 'SUKSES', 'act' => \"upd\"));\n }else{\n echo json_encode(array(\"response\" => 'GAGAL', 'act' => \"upd\"));\n }\n }", "public function actionAct()\r\n {\r\n\r\n if(isset($_GET['_ukey']))\r\n {\r\n //$model = new Users();\r\n $uid = intval($_GET['uid']);\r\n $str = Users::model()->findByPk($uid);\r\n $key = $str->password;\r\n\r\n if($key === $_GET['_ukey'] && $str->access_user === '0')\r\n {\r\n $cookieID = new CHttpCookie('__utId',$uid);\r\n Yii::app()->request->cookies['__utId'] = $cookieID;\r\n\r\n $model_auto_login = new LoginForm();\r\n $_POST['LoginForm']['email'] = $str->email;\r\n $_POST['LoginForm']['password'] = $str->password;\r\n\r\n $model_auto_login->attributes = $_POST['LoginForm'];\r\n\r\n if($model_auto_login->login())\r\n {\r\n unset(Yii::app()->request->cookies['__utId']);\r\n\r\n if(Users::model()->updateByPk($uid,array('access_user'=>'1')))\r\n {\r\n //print 'success';\r\n $this->redirect('/users/');\r\n }\r\n else {\r\n //print 1;\r\n $this->redirect('/');\r\n }\r\n }\r\n else {\r\n //print 2;\r\n $this->redirect(\"/\");\r\n }\r\n }\r\n else {\r\n //print 3;\r\n $this->redirect(\"/\");\r\n }\r\n }\r\n\r\n }", "public function request() { if($this->allowed(USER_WORKER)) {\n switch($this->action) {\n case 'pendingAmount':\n $this->getPending();\n break;\n case 'pendingList':\n $this->getRequests();\n break;\n case 'rejectedList':\n $this->getRequests('rejected');\n break;\n case 'acceptedList':\n $this->getRequests('accepted');\n break;\n case 'reject':\n $this->reject();\n break;\n case 'accept':\n $this->accept();\n break;\n default:\n $this->updateValue();\n break;\n }\n // direct update\n // TODO\n } else if ( ! $this->action ) {\n if($this->institution && testInstitution($this->institution)) {\n $this->appendToQueue();\n } else {\n $this->denied();\n }\n }\n }", "function update_template_statuss(){ \n\t\t$user_id = $this->input->post('user__id');\n\t\t$id = $this->input->post('temp_id');\n\t\t $status = $this->input->post('status');\n\t\t echo $this->InteractModal->add_user_meta( $user_id, 'status_template_id_'.$id , $status);\t\t\n\t}", "public function ajaxpingAction()\r\n\t{\r\n\t\t$sid = $this->request->getParam(\"session\");\r\n\t\t$arr['live'] = $this->engine->ping($sid);\r\n $this->request->setParam(\"format\", \"json\");\r\n $this->request->setParam(\"render\", \"false\");\r\n $response = $this->getResponse(); \r\n $response->setContent(json_encode($arr)); \r\n // returned to View\\Listener\r\n return $response;\r\n\t}", "public function post_edit() {\n //try to edit the user\n if (AuxUser::editUser()) {\n //if the edit process worked, redirect to the profile page\n echo '<script>alert(\"User data edited\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"No data was updated, Please confirm that you change at least one field\");</script>';\n Response::redirect('/user/edit', 'refresh');\n }\n }", "public function getUserInLive_post() {\n /* check game live */\n $UserList = $this->SnakeDrafts_model->getUserInLive();\n if ($UserList['Status'] == 1) {\n $this->Return['Data'] = $UserList['Data'];\n $this->Return['Message'] = $UserList['Message'];\n } else {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = $UserList['Message'];\n }\n }" ]
[ "0.7146494", "0.67626685", "0.67346317", "0.67025316", "0.66367507", "0.65867823", "0.65237945", "0.6450205", "0.6402459", "0.6388498", "0.6383541", "0.62761426", "0.6265329", "0.6244161", "0.6151987", "0.61368227", "0.6134925", "0.6089534", "0.6059676", "0.603263", "0.6014213", "0.60139376", "0.5996036", "0.59925026", "0.5977792", "0.597472", "0.5967497", "0.5942702", "0.59321827", "0.5930596", "0.592805", "0.5926454", "0.59005594", "0.58919835", "0.58755946", "0.58560455", "0.584655", "0.584293", "0.583934", "0.5837947", "0.58311254", "0.58300793", "0.58281416", "0.58094656", "0.58087486", "0.5803612", "0.58017474", "0.57968354", "0.5791547", "0.5784372", "0.5783442", "0.57813233", "0.57779217", "0.5776541", "0.5758298", "0.57577884", "0.57549155", "0.57549155", "0.5740774", "0.5736929", "0.5729851", "0.57231754", "0.57176095", "0.5716949", "0.57147765", "0.5714645", "0.5702234", "0.5690401", "0.5684374", "0.56769145", "0.5661168", "0.56598616", "0.56577164", "0.56360584", "0.5635326", "0.5634522", "0.5629678", "0.5624348", "0.5623299", "0.56220275", "0.5615718", "0.56148934", "0.56134295", "0.56058115", "0.5604821", "0.5604499", "0.55984604", "0.5597423", "0.5585508", "0.5585291", "0.55740327", "0.5573736", "0.55714154", "0.5569944", "0.5567528", "0.5566564", "0.55636716", "0.5563545", "0.5554784", "0.5552022", "0.5548486" ]
0.0
-1
define: get all users
public function index(EmailContract $emailContract,UserRequest $userRequest,CakesInterface $cakes) { return [ 'cakes' => $cakes->get(), 'request' => $userRequest->all(), 'users' => $this->userBuilder()->get(), 'email' => $emailContract->getRepository(), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsers();", "public function getUsers();", "public function getUsers();", "function getUsers(){\n }", "function getUsers(){\n }", "public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }", "public function allUsers()\n {\n // $sql = 'SELECT * FROM '.$db_name;\n return $this->queryAll();\n }", "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }", "public function all()\n {\n return $this->newQuery('getUsers', ['type' => 'AllUsers']);\n }", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function getAllUsers()\n {\n return \"users from mongo\";\n }", "public function getAll(){\n $users = UserResource::collection($this->userRepo->getAll());\n return $users;\n }", "public function getAllUser(){\n $users = $this->bdd->query('SELECT * FROM users');\n $users->execute();\n\t\treturn $users->fetchALL(\\PDO::FETCH_ASSOC);\n }", "public function getUsersList()\n {\n }", "public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }", "public function getAllUser(){\n return $this->users;\n }", "function get_users()\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$query = $db->query(\"SELECT * FROM users\");\n\t\t\n\t\treturn $db->results($query);\n\t}", "public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }", "public function getUsers()\n {\n $sql = \"SELECT * FROM users\";\n return $this->get($sql, array());\n }", "public function allUser(){\n\n\t\t\t$data=$this->all('oops');\n\t\t\treturn $data;\n\t\t}", "public function getAllUsers(){\n\t\treturn $this->user;\n\t}", "public function findUsers();", "public function findUsers();", "public function getAllUsers()\n {\n $result = self::$dbInterface -> query(\"SELECT userID, userName, email FROM user\");\n return $result;\n }", "function get_users()\n {\n //Unimplemented\n }", "protected function GetAllUsers()\r\n {\r\n $sql = \"SELECT * FROM `users`\";\r\n $result = $this->connect()->query($sql);\r\n $rows = $result->num_rows;\r\n\r\n if ($rows > 0) {\r\n while ($row = $result->fetch_assoc()) {\r\n $data[] = $row;\r\n }\r\n\r\n return $data;\r\n } else {\r\n echo \"No results found!\";\r\n }\r\n }", "public function GetAllUsers()\n {\n $data = $this->db()->run(\"SELECT * FROM users\")->fetchall(PDO::FETCH_ASSOC);\n return $data;\n }", "protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}", "public function get_all()\n\t{\n\n\t\t/**\n\t\t * Select all the user query results of the table\n\t\t *\n\t\t * @var array $query Select all the users\n\t\t */\n\t\t$query = $this->db->get(\"users\");\n\t\t\n\t\t/**\n\t\t * Return the query result\n\t\t */\n\t\treturn $query;\n\n\t}", "public function getAllUsers() {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }", "public static function allUser()\n {\n $self = new self();\n\n $sql = \"SELECT * FROM user\";\n\n $result = $self->db->query($sql);\n\n $result = $result->fetchAll();\n\n return $result;\n }", "public function getAllUsers()\n {\n $sql = \"SELECT `user_id`, `user_fname`, `user_lname`, `user_password_hash`, `user_email`, `user_role` FROM users\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function getAllUsers()\n\t{\n\t\t$users = $this->fetchAll();\n\t\t\n\t\treturn $users;\n\t}", "public function getAllUsers()\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get users from db\n $users = $user->findAll();\n return $users;\n }", "public function selectAllUsers(){\r\n $userList = new UsersList();\r\n return $userList->selectAllUsers();\r\n }", "public function getAllUserById($id);", "public static function getUsers(){\n return self::find()->all();\n }", "public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }", "public function getAllUsers() {\n $sql = \"SELECT `pk_users`, `name_users`, `password_users`, `mail_users`, `symbol_users`, `first_name_users`, `last_name_users` FROM `users`\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public static function getAllUser()\n\t{\n\t\treturn array(self::_getDao()->count(), self::_getDao()->getAll());\n\t}", "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "function users() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $query = \"select * from users;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n\n if ($r->num_rows > 0) {\n $result = array(); \n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200);\n } else {\n $this->response('',204);\n }\n }", "public function getAllUsers()\n {\n $users = User::all();\n return $users;\n }", "Public Function getAllUsers()\n\t{\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll('SELECT * FROM bevomedia_user');\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}", "function getAllUsers(){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t$query = $db->query('SELECT * FROM user');\n\t\t\t$json = '{';\n\t\t\t\n\n\t\t\tif ($query->rowCount() > 0) {\n\t\t\t\t$json = $json . ' \"Users\" : [';\n\n\t\t\t\tforeach($query as $row) {\n\t\t\t\t\t$user = new user($row['Id'], null, null, 0, 0, null);\n\t\t\t\t\t\n\t\t\t\t\t$json = $json . $user->getUser() . \",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$json = rtrim($json, ',');\n\t\t\t\t$json = $json . \" ] }\";\n\t\t\t\t\n\n\t\t\t\treturn $json;\n\t\t\t} else {\n\t\t\t return $json . ' \"Message\" : \"No users found\" }';\n\t\t\t}\n\t\t}", "public function all_user()\n {\n $this->res->SetObject(RCD::SC, RCD::SC, FALSE, $this->db->get('user')->result());\n }", "public function getAllUsers(){\n\t\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$rs = $conn->query(\"select * from login\");\n\t\t$num_of_row = $rs->num_rows;\n\t\tif($num_of_row >0){\n\t\t\twhile($row = $rs->fetch_assoc()){\n\t\t\t\t$users[]=array('username'=>$row['username'],'password'=>sha1($row['password']),'email'=>$row['email'],'user_type'=>$row['user_type']);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $users;\n\t}", "public function all(){\n\t\t$sql = \"select * from users\";\n\t\t$stmt= $this->connect->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(PDO::FETCH_CLASS, 'User');\n\t\treturn $result;\n\t}", "public function getUsers(){\n $query = \"SELECT * FROM usuario \";\n return self::getInstance()->consulta($query);\n }", "public function getAllUsers($parameters = array());", "public function getAllUsers() {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->getAllUsers();\n }", "public function getAll()\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * FROM users\";\n\n try\n {\n $this->query = $this->handler->query($this->sql);\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }", "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "public function retrieveAllUsers () {\n return $this->usersDB;\n }", "public function getAll()\n {\n $query = User::query();\n return $query->orderBy('id')->paginate(7);\n }", "public function all_users() {\n\t\tif($this->input->is_ajax_request()) {\n\t\t\techo json_encode($this->users->get_all());\n\t\t} else {\n\t\t\tredirect('cms/users', 'refresh');\n\t\t}\n\t}", "public function users();", "public function users();", "public function users();", "public function users();", "public function getUsers()\n {\n return Security::getUserList();\n }", "public function index()\n {\n return $this->user->all();\n }", "function fetchAllUsers() {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users order by id desc\");\n\t$results = $query->results();\n\treturn ($results);\n}", "public function getUsers(){\n $sql=\"SELECT * FROM users\";\n $select=parent::connect_db()->prepare($sql);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "public function getAll()\n {\n\n return $this->users;\n }", "public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}", "public function get_all_users() {\n $query = $this->db->get('users');\n if($users->num_rows() == 0) {\n return false;\n }\n $results = $query->result_array();\n $users = array();\n foreach($results as $row){\n $users[] = User::from_row_array($row);\n }\n return $users;\n }", "public function getAllUser()\n {\n $this->stmt = $this->db->prepare('SELECT * FROM user');\n $this->stmt->execute();\n $data = $this->stmt->get_result();\n $rows = $data->fetch_all(MYSQLI_ASSOC);\n return $rows;\n }", "public function getAll()\n\t{\n\t\t$query = \"\n\t\tSELECT * FROM `user`\n\t\t\";\n\n\t\t$handle = $this->db->query($query);\n\t\t$result = $handle->fetchAll(Database::FETCH_ASSOC);\n\n\t\t$users = array();\n\n\t\tfor ($i = 0; $i < count($result); $i++) {\n\t\t\t$res = $result[$i];\n\t\t\t$user = new User($res['id'], $res['name']);\n\t\t\t$users[] = $user;\n\t\t}\n\n\t\treturn $users;\n\t}", "public function users()\n {\n $sql = \"SELECT *\n FROM user\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }", "public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }", "public function index()\n {\n // return collection of all users\n return UserIndexResource::collection(User::info()->get());\n }", "public function findUsers(): iterable;", "public function index()\n {\n return response()->responseUtil(User::all(['id', 'name', 'realName', 'openId', 'nickName', 'avatarUrl', 'cellphone', 'officephone','regTime', 'email']));\n }", "public function index()\n {\n return $this->userRepo->getUsers();\n }", "public function getAll() {\r\n $query = $this->db->get(USERS);\r\n return $query->result_array();\r\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "public function getAllUsers() {\n\t\t$stmt = $this->conn->prepare(\"SELECT * FROM `tbl_users` WHERE `usr_type` = 0 ORDER BY `usr_id` ASC\");\n\t\t$stmt->execute();\n\t\t$result = getResult($stmt);\n\t\t$stmt->close();\n\t\treturn $result;\n\t}", "public function getAllUsers() {\n try{\n $conn = (new DB)->connect();\n\n $stmt = $conn->query(\"SELECT * FROM user\");\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $connection = null;\n return $result;\n\n }\n catch (PDOException $e) {\n echo json_encode([\n 'error' => $e->getMessage(),\n ]);\n \n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n }\n exit;\n }", "public function getAllUser()\n\t{\n\t\t$data = $this->db->get('admin');\n\t\treturn $data->result_array();\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM users WHERE role_id = 2;\";\n $stm = App::$db->prepare($sql);\n $stm->setFetchMode(\\PDO::FETCH_OBJ);\n $stm->execute();\n return $stm->fetchAll();\n }", "public function getAllUsers(){\n $response = User::getAllUserData();\n return json_encode($response);\n }", "public function getAll()\n {\n $usuario = new Usuario();\n return $usuario->getAll();\n }", "public function index()\n {\n $users = User::all();\n }", "public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}", "function listUsers() {\n return $this->users;\n }", "private function get_all() {\n $result = $this->dbh->query($this->query_array['get_all'], array())->fetchAll();\n $users = [];\n foreach ($result as $row) {\n $user = new User($row['id'], $row['username']);\n $users[] = $user->to_array();\n }\n return $users;\n }", "public function getAllUsers() {\n\n $users = $this->repoProvider->Users()->findAll();\n return MapperHelper::getMapper()->getDTOs($users); // tomorrow first priority. \n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function getAllUsersFull() {\n return $this->mapper->getAllUsersFull();\n }", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "public function getUsers()\n {\n if (empty($this->users)) {\n $this->setUsers();\n }\n }", "public function users(){\n\t\t$user = $this->ion_auth->user()->row();\n\n\t\t$query = $this->db->select()\n\t\t\t\t\t\t\t\t\t\t\t ->from('users')\n\t\t\t\t\t\t\t\t\t\t\t ->where('admin_id',$user->id)\n\t\t\t\t\t\t\t\t\t\t\t ->order_by('id', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t ->get();\n\t\t\treturn $query;\n\t}", "function get_all_users($conn)\n\t{\n\t\t$query = \"SELECT * FROM user\";\n\t\treturn get_values(mysqli_query($conn,$query));\n\t}", "public function showAllUsers()\n {\n return response()->json(Users::all());\n }", "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "function getUsers() {\n\t$connection = dbConnect();\n\t$sql = \"SELECT * FROM `users`\";\n\t$statement = $connection->query( $sql );\n\n\treturn $statement->fetchAll();\n}", "public function getAllUsers(): array\n {\n return $this->users;\n }", "public function find_all_users()\n {\n $result = array(\n \"status\" => \"\",\n \"body\" => array(\n \"user\" => array(),\n \"count\" => 0\n ),\n \"error\" => array()\n );\n $stmt = $this->db->prepare(\"SELECT * FROM users\");\n if (!($stmt))\n {\n trigger_error(\"Prepare failed: (\" . $this->db->errno . \") \" . $this->db->error,\n E_USER_ERROR);\n }\n if (!$stmt->execute()) {\n trigger_error(\"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error,\n E_CORE_ERROR);\n $result[\"error\"] = $stmt->error;\n }\n $res = $stmt->get_result();\n if ($res->num_rows > 0){\n $result[\"status\"] = $res->num_rows.\" users found\";\n $result['body']['count'] = $res->num_rows;\n while($row = $res->fetch_assoc()){\n $user = array(\n \"id\" => $row[\"id\"],\n \"url\" => $row[\"url\"],\n \"username\" => $row[\"username\"],\n \"email\" => $row[\"email\"],\n \"first_name\" => $row[\"firstName\"],\n \"last_name\" => $row[\"lastName\"],\n \"full_name\" => $row[\"fullName\"],\n \"bio\" => $row[\"bio\"],\n \"is_admin\" => $row[\"isAdmin\"],\n \"password\" => $row[\"password\"],\n \"created\" => $row[\"created\"],\n \"last_updated\" => $row[\"lastUpdated\"],\n );\n array_push($result[\"body\"][\"user\"], $user);\n }\n } else {\n $result['body'] = null;\n $result['status'] = \"No users signed up. \";\n }\n return $result;\n }" ]
[ "0.8517538", "0.8517538", "0.8517538", "0.8317765", "0.8317765", "0.8223965", "0.8196913", "0.8192783", "0.81922215", "0.81817895", "0.81480294", "0.81066304", "0.8080534", "0.80724823", "0.8071948", "0.8061015", "0.80377525", "0.80038714", "0.7962495", "0.79341245", "0.7925173", "0.7921248", "0.7920346", "0.7920346", "0.79117244", "0.7876406", "0.78753644", "0.78751457", "0.78580797", "0.7850368", "0.78301233", "0.7821725", "0.78132683", "0.78073555", "0.78020096", "0.77969617", "0.7791507", "0.77830607", "0.7783017", "0.77803904", "0.7773604", "0.77727133", "0.77577573", "0.77330494", "0.7732575", "0.77135485", "0.77084976", "0.76982355", "0.769614", "0.7694078", "0.7692766", "0.7686642", "0.76797706", "0.7660863", "0.76456964", "0.76421666", "0.7636769", "0.7632044", "0.7632044", "0.7632044", "0.7632044", "0.76316094", "0.7628423", "0.76266664", "0.7626332", "0.76140624", "0.76121294", "0.7608421", "0.75985867", "0.75974333", "0.7596061", "0.7594333", "0.75844777", "0.7580672", "0.7574818", "0.7564302", "0.7562224", "0.7560494", "0.7560059", "0.7552939", "0.75485593", "0.754769", "0.7529948", "0.7528183", "0.75259364", "0.75246847", "0.7523834", "0.7510794", "0.75084585", "0.7508446", "0.75077325", "0.7505143", "0.7502738", "0.750247", "0.75002253", "0.7497659", "0.74964005", "0.7496255", "0.74914104", "0.74900544", "0.74874586" ]
0.0
-1
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id,true); $criteria->compare('role_id',$this->role_id); $criteria->compare('function_id',$this->function_id); $criteria->compare('baserole_id',$this->baserole_id); $criteria->compare('created_date',$this->created_date,true); $criteria->compare('last_updated_date',$this->last_updated_date,true); $criteria->compare('last_updated_person',$this->last_updated_person,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getSearchFields();", "public function getModels()\n {\n return $this->_models;\n }", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function findBy(array $filters);", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public function getSearch();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function findBy($model, Criteria $criteria = null, array $orderBy = null, $limit = null, $offset = null);" ]
[ "0.674474", "0.674474", "0.6608898", "0.6481127", "0.6379887", "0.63463205", "0.6310358", "0.63012093", "0.6253843", "0.62498426", "0.62498426", "0.6113065", "0.60784054", "0.6073788", "0.6047258", "0.60358477", "0.60340405", "0.6014864", "0.5982939", "0.598029", "0.59800965", "0.59693164", "0.59320474", "0.5927035", "0.5921763", "0.5892171", "0.5890299", "0.58507764", "0.58477783", "0.5827075", "0.5816161", "0.5812597", "0.5808757", "0.5791945", "0.5777391", "0.5770255", "0.57648605", "0.57630897", "0.5751502", "0.5740183", "0.5737852", "0.5728676", "0.57242346", "0.5724067", "0.57229716", "0.5720442", "0.571768", "0.57143664", "0.5713739", "0.5707095", "0.56940025", "0.5682193", "0.56716865", "0.5669861", "0.56696016", "0.56694824", "0.56694824", "0.56694824", "0.56680745", "0.56653553", "0.56573427", "0.5651677", "0.5650381", "0.5641178", "0.5635955", "0.56338453", "0.56320715", "0.56233394", "0.5617804", "0.5612171", "0.5610081", "0.55959284", "0.5579066", "0.5572859", "0.55577356", "0.5551721", "0.5549419", "0.5549175", "0.55477685", "0.55367595", "0.55334765", "0.5532778", "0.55324847", "0.55260164", "0.5520987", "0.5518995", "0.55140793", "0.5508976", "0.5506656", "0.55003047", "0.5499999", "0.5497245", "0.5497245", "0.5497245", "0.5495533", "0.54945207", "0.5493379", "0.5493126", "0.54911244", "0.54897344", "0.54849136" ]
0.0
-1
Display a listing of the resource.
public function __construct() { $this->kitchenRecipeRepository = app(KitchenRecipeRepository::class); $this->kitchenIngredientRepository = app(KitchenIngredientRepository::class); $this->kitchenIngredientKitchenRecipeRepository = app(KitchenIngredientKitchenRecipeRepository::class); }
{ "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() { $recipe = new KitchenRecipe(); $ingredientList = $this->kitchenIngredientRepository->getForComboBox(); return view('kitchen.admin.recipes.edit', compact('recipe', 'ingredientList')); }
{ "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(KitchenRecipeCreateRequest $request) { $data = $request->input(); $data['user_id'] = Auth::user()->id; $recipe = (new KitchenRecipe())->create($data); if($recipe){ return redirect()->route('kitchen.admin.recipes.edit', [$recipe->id]) ->with(['success' => 'Saved successfully']); }else{ return back()->withErrors(['msg' => 'Save error']) ->withInput(); } }
{ "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) { $recipe = $this->kitchenRecipeRepository->getRecipe($id); $quantity = $this->kitchenIngredientKitchenRecipeRepository->getQuantitiesForIngredients($id); return view('kitchen.admin.recipes.show', compact('recipe', 'quantity')); }
{ "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) { $recipe = $this->kitchenRecipeRepository->getRecipe($id); $quantity = $this->kitchenIngredientKitchenRecipeRepository->getQuantitiesForIngredients($id); $ingredientList = $this->kitchenIngredientRepository->getForComboBox(); if (empty($recipe)) { abort(404);//если не нашли модель то 404 } return view('kitchen.admin.recipes.edit', compact('recipe', 'quantity', 'ingredientList')); }
{ "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 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 edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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() {\n return view('routes::edit');\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($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 $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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 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($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 \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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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() \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 }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(KitchenRecipeUpdateRequest $request, $id) { $recipe = $this->kitchenRecipeRepository->getEdit($id); if (empty($recipe)) { return back() ->withErrors(['msg' => "Record id = [ {$id} ] not found"]) ->withInput(); } $data = $request->all(); $result = $recipe->update($data); if($result){ return redirect() ->route('kitchen.admin.recipes.edit', $recipe) ->with(['success' => 'Saved successfully']); } else { return back() ->withErrors(['msg' => 'Save error']) ->withInput(); } }
{ "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) { $result = KitchenRecipe::destroy($id); if ($result) { return redirect() ->route('kitchen.admin.recipes.index') ->with(['success' => "ID [ $id ] entry deleted"]); } else { return back()->withErrors(['msg' => 'Delete Error']); } }
{ "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
Renders HTML code for custom tab.
public function getTab() { return '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABh0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzT7MfTgAAAY9JREFUOI2lkj1rVUEQhp93d49XjYiCUUFtgiBpFLyWFhKxEAsbGy0ErQQrG/EHCII/QMTGSrQ3hY1FijS5lQp2guBHCiFRSaLnnN0di3Pu9Rpy0IsDCwsz8+w776zMjP+J0JV48nrufMwrc2AUbt/CleMv5ycClHH1UZWWD4MRva4CByYDpHqjSgKEETcmHiHmItW5STuF/FfAg8HZvghHDDMpkKzYXScPgFcx9XBw4WImApITn26cejEAkJlxf7F/MOYfy8K3OJGtJlscKsCpAJqNGRknd+jO6TefA8B6WU1lMrBZ6fiE1R8Zs7hzVJHSjvJnNMb/hMSmht93IYIP5Qhw99zSx1vP+5eSxZmhzpzttmHTbcOKk+413Sav4v3J6ZsfRh5sFdefnnhr2Gz75rvHl18d3aquc43f1/BjaN9V1wn4tq6eta4LtnUCQuPWHmAv0AOKDNXstZln2/f3zgCUX8oFJx1zDagGSmA1mn2VmREk36pxw5NgzVqDhOTFLhjtOgMxmqVOE/81fgFilqPyaom5BAAAAABJRU5ErkJggg==">callback'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_tab($key,$tab){\n global $post;\n echo '<h2>'.apply_filters('GWP_custom_tab_title',$tab['title'],$tab,$key).'</h2>';\n echo apply_filters('GWP_custom_tab_content',$tab['content'],$tab,$key);\n }", "private function renderTabs()\n {\n ?>\n <h2 class=\"nav-tab-wrapper wp-clearfix\">\n <?php\n array_walk(\n $this->tabs,\n [$this, 'renderTab'],\n $this->currentlyActiveTab()\n );\n ?>\n </h2>\n <?php\n }", "public function run()\n {\n return $this->render('v-tabs-switch', []);\n }", "function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }", "public function render()\n {\n return view('laravolt::components.tab');\n }", "public function bp_customersubnav_tab_action() {\n\t\techo \\do_shortcode( '[elementor-template id=\"36015\"]' );\n\t}", "function add_from_tab() {\n ?>\n <a href=\"#wpuf-metabox-qr-code\" class=\"nav-tab\" id=\"wpuf-qr-code-tab\"><?php _e( 'QR Code', 'wpuf-pro' ); ?></a>\n <?php\n }", "public function render()\n {\n return view('components.components.tab');\n }", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "public function tabsShortcode($atts) {\n ob_start();\n ?>\n <div class=\"row\">\n <div class=\"col s12\">\n <ul class=\"tabs\">\n <li class=\"tab col s3\"><a href=\"#test1\">Test 1</a></li>\n <li class=\"tab col s3\"><a class=\"active\" href=\"#test2\">Test 2</a></li>\n <li class=\"tab col s3 disabled\"><a href=\"#test3\">Disabled Tab</a></li>\n <li class=\"tab col s3\"><a href=\"#test4\">Test 4</a></li>\n </ul>\n </div>\n <div id=\"test1\" class=\"col s12\">Test 1</div>\n <div id=\"test2\" class=\"col s12\">Test 2</div>\n <div id=\"test3\" class=\"col s12\">Test 3</div>\n <div id=\"test4\" class=\"col s12\">Test 4</div>\n </div>\n <?php\n return ob_get_clean();\n\n }", "private function renderContent()\n {\n $this->tabs[$this->currentlyActiveTab()]->view()->render();\n }", "function render_tabs( $attributes ) {\n\t\t\t\tglobal $post;\n\t\t\t\t// If a page, then do split\n\t\t\t\t// Get ids of children\n\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $post->ID\n\t\t\t\t\t\t, 'parent' => $post->ID\n\t\t\t\t\t\t, 'sort_column' => 'menu_order'\n\t\t\t\t) );\n\n\t\t\t\t$child_titles = array();\n\t\t\t\t$child_contents = \"\n\";\n// TODO: start jquery 'loading' action here.\n\n\t\t\t\t$child_tablinks = \"\n<div id='subpage-tabs' class='ui-tabs'>\n\t<ul>\n\";\n\t\t\t\tforeach ( $children as $child ) {\n\t\t\t\t\t$child_tablinks .= \"\t\t<li><a href='#ctab-$child->ID'>$child->post_title</a></li>\n\";\n\t\t\t\t\t// Render any shortcodes\n\t\t\t\t\t$new_content = do_shortcode( $child->post_content );\n\t\t\t\t\t$child_contents .= \"<div id='ctab-$child->ID' class='ui-tabs-hide'>\n$new_content\n</div>\n\";\n\t\t\t\t}\n\t\t\t\t$child_tablinks .= \"\t</ul>\n\";\n\t\t\t\t$child_contents .= \"</div>\n<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(\n\tfunction(){\n\t\tjQuery('#subpage-tabs').tabs();\n }\n);\n/*]]>*/\n</script>\n\";\n// TODO: destroy jquery 'loading' action here.\n\n\t\t\t\t$content = $child_tablinks . $child_contents;\n\t\t\t\treturn $content;\n\t\t}", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public function tab_contents() {\n\t\techo 'test';\n\t}", "public function display_tablenav( $which ) \n{\n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n\n <div class=\"alignleft actions\">\n <?php $this->bulk_actions(); ?>\n </div>\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n ?>\n <br class=\"clear\" />\n </div>\n <?php\n}", "function deposit_tab_options_tab() \n {\n ?> <li class=\"deposit_tab\"><a href=\"#deposit_tab_data\"><?php _e('Deposit Options', 'woothemes'); ?></a></li> <?php\n }", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "function dpbootstrap_render_nav_tabs() \n{\n $output = '';\n\n if ($primary = menu_primary_local_tasks()) {\n $output .= '<ul class=\"nav nav-tabs\">' . drupal_render($primary) . '</ul>';\n }\n\n if ($secondary = menu_secondary_local_tasks()) {\n $output .= '<ul class=\"nav nav-tabs\">' . drupal_render($secondary) .'</ul>';\n }\n\n return $output;\n}", "function render($cTabs,$title,$base_path) {\n\t\tglobal $modx;\n\t\t$content = \"\";\n\t\tforeach ($cTabs as $name=>$tab_content) {\n\t\t\t$content .= $this->makeTab($name,$tab_content);\n\t\t}\n\t\t$placeholders = array(\n\t\t\t\"[+ditto_base_url+]\" => $base_path,\n\t\t\t\"[+base_url+]\" => $modx->config[\"site_url\"].\"manager\",\n\t\t\t\"[+theme+]\" => $modx->config[\"manager_theme\"],\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+content+]\" => $content,\n\t\t\t\"[+charset+]\" => $modx->config[\"modx_charset\"],\n\t\t);\n\t\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"main\"]);\n\t}", "function init_tab_contracthtml() {\n\tif(has_permission('teampassword','','view') || is_admin() || is_client_logged_in()){\n\t\techo '<li role=\"presentation\" class=\"\">\n\t <a href=\"#items_relate\" aria-controls=\"items_relate\" role=\"tab\" data-toggle=\"tab\">\n\t <i class=\"fa fa-key\" aria-hidden=\"true\"></i> ' . _l('items_relate') . '\n\t </a>\n\t </li>';\n }\n}", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "function shortcodes_tab_child($atts, $content = null) {\n\t\textract(shortcode_atts(array(\n\t\t\t'title' => ''\n\t\t), $atts));\n\n\t\t$output = '<li class=\"flavour-tabs-tab\" role=\"tabpanel\">';\n\t\t$output .= '<h3 class=\"flavour-tabs-tab-title\">'.$title.'</h3>';\n\t\t$output .= do_shortcode($content);\n\t\t$output .= '</li>';\n\t\treturn $output;\n\t}", "function RenderTabItem($Label, $URL, array $Classes) {\n\t$Result = sprintf(\"<li class=\\\"%s\\\">\\n\" .\n\t\t\t\t\t\t\t\t\t\t\"\t<span>%s</span>\\n\" .\n\t\t\t\t\t\t\t\t\t\t\"</li>\\n\",\n\t\t\t\t\t\t\t\t\t\tGetValue($URL, $Classes, ''),\n\t\t\t\t\t\t\t\t\t\tAnchor($Label, $URL));\n\treturn $Result;\n}", "private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\t}", "protected function createTabs() {}", "public function getTabLabel()\n {\n return Mage::helper('cms')->__('CSS & JS');\n }", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "public function actionRenderTab() {\n\n if (isset($_GET['name']) && isset($_GET['type'])) {\n $model = $this->loadModel();\n $this->renderPartial('/project/' . $_GET['type'] . 'Wrapper',\n array('model' => $model,\n 'render' => $_GET['name'],\n 'tab_fk' => $_GET['tab_fk']));\n } elseif (isset($_GET['ajaxPanel']) && $_GET['ajaxPanel']) {\n if (!isset($_GET['ajax'])) {\n echo CJSON::encode(array('status' => 't',\n 'response' => $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true)));\n } elseif (isset($_GET['ajax'])) {\n echo $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true);\n }\n Yii::app()->end();\n } else {\n echo CJSON::encode(array('status' => 'f',\n 'response' => 'There was a problem rendering this panel.'));\n Yii::app()->end();\n }\n }", "function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}", "function training_tabs_callback() {\n ctools_include('menu');\n $tab_1 = array(\n 'title' => 'First tab',\n 'href' => 'training/ctools/tabs/tab1',\n );\n $tab_2 = array(\n 'title' => 'Second tab',\n 'href' => 'training/ctools/tabs/tab2',\n );\n ctools_menu_add_tab($tab_1);\n ctools_menu_add_tab($tab_2);\n if (arg(3) == 'tab2') {\n return t('Tab 2 content');\n }\n\n return t('Tab 1 content');\n}", "function token($options)\n {\n extract($options);\n $id = current($this->stack);\n\n switch ($type) {\n case 'tabs_start':\n array_push($this->stack, $this->id++);\n $csss = array();\n if(isset($this->conf['css_div'])) {\n $csss[] = $this->conf['css_div'];\n }\n if(isset($attributes['class'])){\n $csss[] = $attributes['class'];\n unset($attributes['class']);\n }\n $css = '';\n if(count($csss)) {\n $css = sprintf(' class=\"%s\"', implode(\" \", $csss));\n }\n $attrs = '';\n if(is_array($attributes))foreach($attributes as $key=>$val){\n $attrs.= \"$key=\\\"$val\\\" \";\n }\n return \"<div$css $attrs>\";\n case 'tabs_end':\n array_pop($this->stack);\n return \"</div>\";\n case 'tabs_title_start':\n $css = $this->formatConf(' class=\"%s\"', 'css_ul');\n return \"<ul$css>\";\n case 'tabs_title_end':\n return \"</ul>\";\n case 'tabs_title_item_start':\n $css = $this->formatConf(' class=\"%s\"', $active ? 'css_li_active':'css_li');\n $html = \"<li$css>\";\n $css = $this->formatConf(' class=\"%s\"', $active ? 'css_a_active':'css_a');\n switch($type2) {\n case 'link':\n $html .= \"<a$css href=\\\"$url\\\" title=\\\"$text\\\" target=\\\"_blank\\\">\";\n break;\n case 'javascript':\n $html .= \"<a$css href=\\\"javascript:window.open ('$url','newwindow','height=640,width=480,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')\\\" title=\\\"$text\\\">\";\n break;\n default:\n $html .= \"<a$css href=\\\"#tabs_\".$id.\"_\".$depth.\"_\".$index.\"\\\" title=\\\"$text\\\">\";\n break;\n }\n return $html;\n case 'tabs_title_item_end':\n return \"</a></li>\";\n case 'tabs_content_start':\n $css = $this->formatConf(' class=\"%s\"', $active ? 'css_content_active':'css_content');\n return \"<div$css id=\\\"tabs_\".$id.\"_\".$depth.\"_\".$index.\"\\\">\";\n case 'tabs_content_end':\n return '</div>';\n default:\n return '';\n }\n }", "public function tab1() {\n $output = '<p>' . $this->t('This is the content of Tab 1') . '</p>';\n\n if ($this->currentUser->hasPermission('administer nodes')){\n $output .= '<p>' . $this->t('This extra text is only displayed if the current user can administer nodes.') . '</p>';\n }\n\n return ['#markup' => $output];\n }", "public function handle_tab() {\n\t\t$screen = get_current_screen();\n\t\t// Run only when post_id is present\n\t\tif (( ! isset( $_GET['post'] ) || ! is_numeric( $_GET['post'])) && $screen->id != 'toplevel_page_acf-options' ) {\n\t\t\treturn;\n\t\t}\n\t\tif ($screen->id != 'toplevel_page_acf-options') {\n\t\t\t$post_id = sanitize_key( $_GET['post'] );\n\t\t} else {\n\t\t\t$post_id = $screen->id;\n\t\t}\n\t\t// Check for existing transient\n\t\t$current_tab = get_transient( $this->_transient_name );\n\t\t// Use value only once, delete transient right away\n\t\tdelete_transient( $this->_transient_name );\n\t\t// The first tab is selected by default\n\t\t$tab_index = 0;\n\t\t// Get tab index for current post\n\t\tif ( $current_tab['post_id'] === $post_id ) {\n\t\t\t$tab_index = $current_tab['tab_index'];\n\t\t}\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\t(function($) {\n\t\t\t\t/**\n\t\t\t\t * Global to save the current index of selected tab\n\t\t\t\t * @type int\n\t\t\t\t */\n\t\t\t\twindow.acf_current_tab_index = null;\n\t\t\t\tacf.add_action('ready', function( $el ){\n\t\t\t\t\tvar tabIndex = <?php echo $tab_index; ?>\n\t\t\t\t\t// Get tab element by index\n\t\t\t\t\tvar $li = $('.acf-tab-group').find('li:eq(<?php echo $tab_index; ?>)');\n\t\t\t\t\t// Select tab only when it’s not the first tab, which is selected by default\n\t\t\t\t\tif (0 !== tabIndex) {\n\t\t\t\t\t\t$li.find('a').click();\n\t\t\t\t\t}\n\t\t\t\t\twindow.acf_current_tab_index = tabIndex;\n\t\t\t\t});\n\t\t\t\tacf.add_action('refresh', function($tabGroup) {\n\t\t\t\t\tvar $currentTab;\n\t\t\t\t\tvar currentTabIndex = window.acf_current_tab_index;\n\t\t\t\t\tvar newTabIndex;\n\t\t\t\t\t// Bail out if we have no jQuery object\n\t\t\t\t\tif (false === $tabGroup instanceof jQuery) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$currentTab = $tabGroup.find('li.active');\n\t\t\t\t\t// Bail out if no active tab was found\n\t\t\t\t\tif ($currentTab.length === 0) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// Get index of active tab\n\t\t\t\t\tnewTabIndex = $currentTab.index();\n\n\t\t\t\t\t// Bail out if index is initial or previously selected tab is the same\n\t\t\t\t\tif (null === currentTabIndex || newTabIndex === currentTabIndex) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\twindow.acf_current_tab_index = newTabIndex;\n\t\t\t\t\t// Send tabIndex to backend to save transient\n\t\t\t\t\t$.ajax(ajaxurl, {\n\t\t\t\t method: 'post',\n\t\t\t\t data: {\n\t\t\t\t\t\t\taction: 'acf_save_current_tab',\n\t\t\t\t\t\t\ttab_index: newTabIndex,\n\t\t\t\t\t\t\tpost_id: '<?php echo $post_id; ?>'\n\t\t\t\t }\n\t\t\t });\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t</script>\n\t\t<?php\n\t}", "abstract protected function tabs();", "function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\n\t}", "protected function render()\n {\n $aSettings = $this->get_settings_for_display();\n \n $aTabIDs = [];\n ?>\n <!--==================================================================== \n Start hero section\n =====================================================================-->\n <section class=\"<?php echo esc_attr($aSettings['extra_classes']).' developer-design mb-200 rmb-100'; ?>\">\n <div class=\"container\">\n <?php if (!empty($aSettings['title']) || !empty($aSettings['description'])) : ?>\n <div class=\"cloud-section-title mb-75 text-center\">\n <?php if (!empty($aSettings['title'])) : ?>\n <h2><?php echo esc_html($aSettings['title']); ?></h2>\n <?php endif; ?>\n <?php if (!empty($aSettings['description'])) : ?>\n <p><?php echo esc_html($aSettings['description']); ?></p>\n <?php endif; ?>\n </div>\n <?php endif; ?>\n \n <div class=\"developer-design-tab\">\n <div class=\"nav nav-pills\" role=\"tablist\" aria-orientation=\"vertical\">\n <?php\n foreach ($aSettings['tabs'] as $aTab) :\n $tabID = uniqid('dd-pills-');\n $aTabIDs[] = $tabID;\n ?>\n <a class=\"nav-link\"\n id=\"<?php echo $tabID.'-tab'; ?>\"\n data-toggle=\"pill\" href=\"#<?php echo $tabID; ?>\"\n role=\"tab\"\n aria-controls=\"<?php echo $tabID; ?>\" aria-selected=\"false\">\n <?php if (!empty($aTab['tab_name'])) : ?>\n <h5><?php echo esc_html($aTab['tab_name']); ?></h5>\n <?php endif; ?>\n <?php if (!empty($aTab['tab_description'])) : ?>\n <p><?php echo esc_html($aTab['tab_description']); ?></p>\n <?php endif; ?>\n </a>\n <?php endforeach; ?>\n </div>\n <div class=\"tab-content\">\n <?php\n foreach ($aSettings['tabs'] as $order => $aTab) :\n ?>\n <div class=\"tab-pane fade\" id=\"<?php echo $aTabIDs[$order]; ?>\" role=\"tabpanel\"\n aria-labelledby=\"dd-pills-one-tab\">\n <?php if (!empty($aTab['right_image']['url'])) : ?>\n <img src=\"<?php echo esc_url($aTab['right_image']['url']); ?>\" alt=\"<?php echo\n esc_attr($aTab['tab_name']); ?>\">\n <?php endif; ?>\n <?php if (!empty($aTab['right_content'])) : ?>\n <div class=\"tab-right-content\"><?php echo $aTab['right_content']; ?></div>\n <?php endif; ?>\n </div>\n <?php endforeach; ?>\n </div>\n </div>\n \n </div>\n </section>\n \n <?php\n }", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "function makeTab($title,$content) {\n\t\t$placeholders = array(\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+tab_content+]\" => $content,\n\t\t);\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"tab\"]);\n\t}", "function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}", "public function onRsformBackendAfterShowFormEditTabsTab(): void\n\t{\n\t\t?>\n\t\t<li>\n\t\t\t<?php\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'link',\n\t\t\t\t'javascript: void(0);',\n\t\t\t\t'<span class=\"rsficon jdicon-jdideal\"></span><span class=\"inner-text\">'\n\t\t\t\t. Text::_(\n\t\t\t\t\t'PLG_RSFP_JDIDEAL_LABEL'\n\t\t\t\t) . '</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</li>\n\t\t<?php\n\t}", "public function getName()\n {\n return 'tabbed';\n }", "public function renderTabs($input, array $args, Parser $parser, PPFrame $frame) {\n\t\t$doc = new DOMDocument('1.0', \"UTF-8\");\n\t\t$doc->loadHTML(utf8_decode($parser->recursiveTagParse($input, $frame)));\n\t\t$doc = JQueryLihuen::renderTabsDoFormat($doc, \"extJQueryLihuenTabs-\" . JQueryLihuen::$tabcount);\n\t\tJQueryLihuen::$tabcount++;\n\t\n\t\treturn utf8_encode($doc->saveHTML());\n\t}", "function scb_tabx($atts, $content){\n\t$tabid='';\n\t$tabclass = $atts['class'];\n\t$tabmode = ' nav-tabs';\n\t$tablia = ''; $tabCont = '';\n\t\n\tif($atts['id'] !=''){\n\t\t$tabid = ' id=\"'.$atts['id'].'\"'; \n\t}\n\t\n\tif($atts['mode'] !=''){\n\t\t$tabmode = ' nav-'.$atts['mode']; \n\t}\n\t\n\t$menu = explode('[/tab_content]', $content);\n\t$tabTitle='';\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\tadd_shortcode('content:'.str_replace(' ','',$tabTitle), 'tabMenuCont_sc');\n\t}\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\t$tabSCName = explode(']',$menu[$i])[0];\n\t\t$renscName = '[tab_content:'.str_replace(' ','',$tabTitle);\n\t\t$scName = str_replace($tabSCName, $renscName ,$menu[$i]);\n\t\t$tablia .= '<li role=\"presentation\" '.($i==0?'class=\"active\"':'').'><a href=\"#dv'.$attrs['id'].'_'.$i.'\" data-toggle=\"tab\" role=\"tab\" aria-expanded=\"true\">'.$tabTitle.'</a></li>';\n\t\t\n\t\t$tabCont .= '<div id=\"dv'.$attrs['id'].'_'.$i.'\" class=\"tab-pane '.($i==0?'active':'').'\" >'.do_shortcode(trim($scName)).'</div>';\n\t}\n\t\n\t$retVal = '<div'.$tabid.'><ul class=\"nav'.$tabmode.'\">'.$tablia.'</ul><div class=\"tab-content\">'.$tabCont.'</div></div>';\n\treturn $retVal;\n}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "protected function renderItems()\n {\n $html = '';\n foreach ($this->items as $n => $item) {\n if ($item['active']) {\n $this->options['selected'] = $n;\n unset($item['active']);\n }\n $html .= Tab::widget($item);\n }\n return $html;\n }", "public function getTabTitle()\n {\n return Mage::helper('cms')->__('CSS & JS');\n }", "function display_tablenav( $which ) {\n $mode = isset($_REQUEST['mode']) ? wpla_clean($_REQUEST['mode']) : 'list';\n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n <div class=\"alignleft actions\">\n <?php $this->bulk_actions(); ?>\n </div>\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n $this->view_switcher( $mode );\n ?>\n <br class=\"clear\" />\n </div>\n <?php\n }", "public function render_content()\n {\n CustomizerAddon::view( 'controls.switch', ['control' => &$this] );\n }", "function webplayer_admin_tabs($current = 'webplayer') {\r\n\t$tabs = array('webplayer' => 'HD Webplayer', 'videos' => 'Videos', 'playlist' => 'Playlist', 'license' => 'License', 'documentation' => 'Documentation');\r\n\t$links = array();\r\n\t\r\n\tforeach( $tabs as $tab => $name ) {\r\n\t\tif( $tab == $current) {\r\n\t\t\t$links[] = \"<a class='nav-tab nav-tab-active' href='?page=$tab'>$name</a>\";\r\n\t\t} else {\r\n\t\t\t$links[] = \"<a class='nav-tab' href='?page=$tab'>$name</a>\";\r\n\t\t}\r\n\t}\r\n\t\r\n\techo '<div id=\"icon-upload\" class=\"icon32\"></div>';\r\n\techo \"<h2 class='nav-tab-wrapper'>\";\r\n\tforeach( $links as $link ) {\r\n\t\techo $link;\r\n\t}\r\n\techo \"</h2>\";\r\n\t\r\n}", "public function __toString() {\n $html = '<' . $this->_confs['container_tag'] . ' class=\"' . $this->_confs['container_class'] . '\">';\n if (count($this->_tabs))\n $html .= '<ul class=\"' . $this->_confs['container_menu_class'] . '\">';\n $isFirst = true;\n foreach ($this->_tabs as $id => $tab) {\n $className = ($isFirst) ? 'active' : '';\n if (!$tab->isEnabled()) {\n $className .= ' disabled';\n $id = 'disable';\n }\n $html .= '<li class=\"' . $className . '\"><a href=\"#' . $id . '\">' . $tab->getTitle() . '</a></li>';\n $isFirst = false;\n }\n if (count($this->_tabs))\n $html .= '</ul>';\n $isFirst = true;\n foreach ($this->_tabs as $id => $tab) {\n $display = 'none';\n $html .= '<div id=\"' . $id . '\" class=\"' . $this->_confs['cotainer_tab_class'] . '\" style=\"display:' . $display . ';\">';\n $html .= $tab->getContent();\n $html .= '</div>';\n $isFirst = false;\n }\n $html .= '</' . $this->_confs['container_tag'] . '>';\n return $html;\n }", "function shortcodes_tab_parent($atts, $content = null) {\n\t\textract(shortcode_atts(array(), $atts));\n\t\t$output = '';\n\t\tpreg_match_all('/flavour_tab *?title=\"([^\\\"]+)\"/i', $content, $matches);\n\t\tif(sizeof($matches[1])) {\n\t\t\t$output .= '<div class=\"flavour-tabgroup\">';\n\t\t\t$output .= '<ul class=\"flavour-tabgroup-tabs\" role=\"tablist\">';\n\t\t\tforeach ($matches[1] as $tab) {\n\t\t\t\t$output .= '<li role=\"presentation\" class=\"flavour-tabgroup-tab\"><span role=\"tab\" aria-selected=\"false\">'.$tab.'</span></li>';\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '<ul class=\"flavour-tabs\">';\n\t\t\t$output .= do_shortcode($content);\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '</div>';\n\t\t}\n\t\treturn $output;\n\t}", "function prk_ac_single( $atts, $content = null ) {\n\t\t$defaults = array( 'title' => 'Tab' );\n\t\textract( shortcode_atts( $defaults, $atts ) );\n\t\t//MAKE TAB ID MATCH THE CONTENT TAB ID\n\t\treturn '<div class=\"prk_ac_single\">'. do_shortcode( $content ) .'</div>';\n\t}", "public function display_tablenav( $which ) {\n\t\t?>\n <div class=\"tablenav <?php echo esc_attr( $which );\n\t\t?>\">\n <div class=\"alignleft actions bulkactions\">\n\t\t\t\t<?php $this->bulk_actions( $which );\n\t\t\t\t?>\n </div>\n\t\t\t<?php\n\t\t\t$this->extra_tablenav( $which );\n\t\t\t$this->pagination( $which );\n\t\t\t?>\n <br class=\"clear\"/>\n </div>\n\t\t<?php\n\n\t}", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "public function get_name()\n {\n return 'hslanding-vertical-tabs';\n }", "public function create_tab_content( $key, $tab ) {\n $this->print_download_link_html();\n }", "public function render() {\n echo $this->getHtml();\n }", "private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }", "public function describeTabs();", "private function renderTab(\n SettingsPageTab $tab,\n string $slug,\n string $active\n ) {\n\n $url = add_query_arg(self::QUERY_ARG_TAB, $slug);\n $class = 'nav-tab';\n if ($active === $slug) {\n $class .= ' nav-tab-active';\n }\n ?>\n <a\n href=\"<?= esc_url($url); ?>\"\n id=\"<?= esc_attr($tab->id()) ?>\"\n class=\"<?= esc_attr($class) ?>\">\n <?= esc_html($tab->title()) ?>\n </a>\n <?php\n }", "function template_tabs($tabs = array(), $active = 0){\n $content = '';\n $top = '';\n $i =0;\n foreach($tabs as $id=>$tab){\n if ($i == $active){$class = 'active';}\n $top .= \"\\t\" . '<li><a class=\"'.$class.'\" href=\"#'.$id.'\">' . $tab['title'] . '</a></li>' . \"\\n\";\n $content .= \"\\t\" . '<li id=\"'.$id.'\" class=\"'.$class.'\">' . $tab['content'] . '</li>' . \"\\n\"; \n $i++;\n $class = '';\n }\n $return = '<ul class=\"tabs\">' . \"\\n\" . $top . '</ul>' . \"\\n\";\n $return .= '<ul class=\"tabs-content\">' . \"\\n\" . $content . '</ul>';\n return $return;\n \n}", "public function render() {\n\n echo $this->html;\n\n }", "public function display_tablenav( $which )\n\t{\n\t\t?>\n\t\t<div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n\n\t\t\t<div class=\"alignleft actions bulkactions\">\n\t\t\t\t<?php $this->bulk_actions( $which ); ?>\n\t\t\t</div>\n\t\t\n\t\t\t<?php\n\t\t\t$this->extra_tablenav( $which );\n\t\t\t$this->pagination( $which );\n\t\t\t?>\n\n\t\t\t<br class=\"clear\" />\n\t\t\n\t\t</div>\n\t\t<?php\n\t}", "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 render_instantquiz_tabs($tabs) {\n return print_tabs($tabs->tabrows, $tabs->selected, $tabs->inactive, $tabs->activated, true);\n }", "public static function render_tab( $field_args, $field ) {\n\t\tprintf(\n\t\t\ttrue === $field->prop( 'open' ) ? '<div id=\"%1$s\" class=\"rank-math-tab rank-math-options-panel-content ' . $field->prop( 'classes' ) . '\">' : '</div><!-- /#%1$s -->',\n\t\t\t$field->prop( 'id' )\n\t\t);\n\n\t\treturn $field;\n\t}", "protected function _renderSectionTabs($form)\n {\n if (!$GLOBALS['browser']->hasFeature('javascript')) {\n return;\n }\n\n $open_section = $form->getOpenSection();\n\n /* Add the javascript for the toggling the sections. */\n Horde::addScriptFile('form_sections.js', 'horde');\n echo '<script type=\"text/javascript\">' . \"\\n\" .\n sprintf('var sections_%1$s = new Horde_Form_Sections(\\'%1$s\\', \\'%2$s\\');',\n $form->getName(),\n $open_section) .\n '</script>';\n\n /* Loop through the sections and print out a tab for each. */\n echo \"<div class=\\\"tabset\\\">\\n\";\n $js = array();\n foreach ($form->_sections as $section => $val) {\n $class = ($section == $open_section) ? ' class=\"activeTab\"' : '';\n $tabid = htmlspecialchars($form->getName() . '_tab_' . $section);\n $js[$linkid] = sprintf('sections_%s.toggle(\\'%s\\'); return false;\"',\n $form->getName(),\n $section);\n printf('<div%s id=\"%s\"><a href=\"#\" id=\"%s\">%s%s</a></div>' . \"\\n\",\n $class,\n $tabid,\n '_tablink_' . $section,\n $form->getSectionImage($section),\n $form->getSectionDesc($section));\n }\n echo \"</div>\\n\";\n\n // This doesn't help a whole lot now, but if there is a way to\n // buffer output of JS, then we can keep JS separated from\n // markup, whereas before the onclicks were assigned as an\n // HTML attribute.\n echo '<script type=\"text/javascript\">' . \"\\n\";\n echo 'if (document.getElementById) {' . \"\\n\";\n echo ' addEvent(window, \\'load\\', function() {' . \"\\n\";\n foreach ($js as $id => $onclick) {\n $line = '\nif (document.getElementById(%1$s)){\n document.getElementById(%1$s).onclick = function() {\n %2$s\n };\n}';\n printf($line, $id, $onclick);\n }\n echo ' });}</script>' . \"\\n\";\n }", "public function voucherCodeTabAction()\n {\n $onlineShopVoucherSeries = \\Pimcore\\Model\\Object\\AbstractObject::getById($this->getParam('id'));\n if ($onlineShopVoucherSeries instanceof \\Pimcore\\Model\\Object\\OnlineShopVoucherSeries) {\n if ($tokenManager = $onlineShopVoucherSeries->getTokenManager()) {\n $this->view->series = $onlineShopVoucherSeries;\n $renderScript = $tokenManager->prepareConfigurationView($this->view, $this->getAllParams());\n $this->renderScript($renderScript);\n } else {\n $this->view->errors = array($this->view->ts('plugin_onlineshop_voucherservice_msg-error-config-missing'));\n $this->renderScript('voucher/voucher-code-tab-error.php');\n }\n }\n }", "protected function getTab() {\n return \" \";\n }", "function mepr_add_some_tabs($user)\n{\n $support_active = (isset($_GET['action']) && $_GET['action'] == 'membership-cards')?'mepr-active-nav-tab':''; ?>\n<span\n class=\"mepr-nav-item membership-cards <?php echo $support_active; ?>\">\n <a\n href=\"<?php echo MeprOptions::fetch()->account_page_url(); ?>?action=membership-cards\">Membership\n cards</a>\n</span>\n<?php\n}", "public function getTabLabel()\n {\n return Mage::helper('magna_news')->__('Content');\n }", "public function bp_settingssubnav_tab_action() {\n\t\techo \\do_shortcode( '[wcfm endpoint=\"wcfm-settings\"]' );\n\t}", "public function Render()\n {\n return \"<span class='\".$this->Icone.\"' title='\".$this->Title.\"' onclick=\".$this->OnClick.\" >&nbsp;&nbsp;</span>\";\n }", "function sliderRenderSlidesTabBar($slider_id, $params = array())\n\t{\n\n\t\textract($params);\n\n\t\t$slide = new dbo_slider_slide(\"WHERE slider = '\".dboescape($slider_id).\"' ORDER BY order_by\");\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"dbo-tab-bar margin-bottom\" id=\"tabs-slides\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<span class=\"tabs inline-block\" style=\"max-width: calc(100% - 120px)\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif($slide->size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<span class=\"dbo-tab <?= $active_slide == $slide->id ? 'active' : '' ?>\" data-slide_id=\"<?= $slide->id ?>\" peixe-reload=\".wrapper-slide-content\" data-url=\"<?= keepUrl('active_slide='.$slide->id) ?>\"><br /><?= strlen(trim($slide->titulo)) ? htmlSpecialChars($slide->titulo) : 'Slide sem título' ?><br />&nbsp;</span>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}while($slide->fetch());\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?>\n\t\t\t\t\t\t\t<span class=\"dbo-tab\" style=\"cursor: default;\"><br /><br />&nbsp;</span>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"right relative top-20\" style=\"right: 15px;\">\n\t\t\t\t\t<a href=\"<?= secureUrl('dbo/core/dbo-slider-ajax.php?action=adicionar-slide&slider_id='.$slider_id.'&current_url='.dboEncode(fullUrl()).'&'.CSRFVar()) ?>\" class=\"no-margin peixe-json font-13\" peixe-log><i class=\"fa fa-plus-circle font-14\"></i> <span class=\"underline\">Adicionar slide</span></a>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "private function build_factory_meta_tab_widget($_meta, $_ptype = \"wccpf\") {\r\n \t/* Accordian wrapper starts here */\r\n \t$html = '<div class=\"wcff-factory-tab-container\">';\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-left-panel\">';\r\n \t$html .= '<ul>';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t$html .= '<li data-box=\"' . $tab[\"header\"][\"target\"] . '\" class=\"' . $tab[\"header\"][\"css_class\"] . '\">' . $tab[\"header\"][\"title\"] . '</li>';\r\n \t}\r\n \t$html .= '</ul>';\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-right-panel\">';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t/* Tab content section starts here */\r\n \t\t$html .= '<div id=\"' . $tab[\"content\"][\"container\"] . '\" class=\"wcff-factory-tab-content\">';\r\n \t\t\r\n \t\tforeach ($tab[\"content\"][\"fields\"] as $field) {\r\n \t\t\t/* Meta field's wrapper starts here */\r\n \t\t\t$html .= '<div class=\"wcff-field-types-meta\" data-type=\"' . $field[\"type\"] . '\" data-param=\"' . $field[\"param\"] . '\">';\r\n \t\t\t$html .= $this->build_factory_meta_field($field, $_ptype);\r\n \t\t\t$html .= '</div>';\r\n \t\t\t/* Meta field's wrapper ends here */\r\n \t\t}\r\n \t\t\r\n \t\t$html .= '</div>';\r\n \t\t/* Tab content section ends here */\r\n \t}\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t$html .= '</div>';\r\n \t/* Accordian wrapper ends here */\r\n \treturn $html;\r\n }", "function tabber_tabs_temp_hide(){\n\techo '<script type=\"text/javascript\">document.write(\\'<style type=\"text/css\">.tabber{display:none;}<\\/style>\\');</script>';\n}", "function bpfit_weight_subtab_function_to_show_content() {\n\t\t\tinclude 'profile-menu/weight/bpfit-my-weight.php';\n\t\t}", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function tab()\n\t{\n\t\treturn 'cash';\n\t}", "public function run()\n\t{\n\t\tlist($name,$id)=$this->resolveNameID();\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id']=$id;\n\t\tif(isset($this->htmlOptions['name']))\n\t\t\t$name=$this->htmlOptions['name'];\n\n\t\t#$this->registerClientScript($id);\n\t\t#$this->htmlOptions[\"class\"]=\"form-control\";\n\t\t$this->htmlOptions=array_merge($this->htmlOptions,array(\n\t\t\t// 'htmlOptions'=>array('container'=>null),\n\t\t\t'labelOptions'=>array('style'=>'width: 100%;height: 100%;cursor:pointer','class'=>'ptm pbm mbn'),\n\t\t\t'template'=>'<div class=\"col-lg-1\"><a href=\"#\" class=\"thumbnail text-center\" style=\"margin-left: -10px;margin-right: -10px;\">{beginLabel}{labelTitle}<div class=\"text-center\">{input}</div>{endLabel}</a></div>',\n\t\t\t'separator'=>'',\n\t\t));\n\t\t\n\t\t#echo \"<small class=\\\"text-muted\\\"><em>Here a message for user</em></small>\";\n\t\t#echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);\n\t\techo '<div class=\"row\">'.Chtml::activeRadioButtonList($this->model,$this->attribute,\n\t\t $this->listData,$this->htmlOptions).'</div>';\n\t}", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2 style=\"float:right\"><?php echo esc_html( $this->title ); ?></h2>\n\t\t\t<h2 class=\"nav-tab-wrapper\">\n\t\t\t\t<a href=\"#\" class=\"page nav-tab nav-tab-active\" data-tab=\"home-tab\">Home</a>\n\t\t\t\t<a href=\"#\" class=\"page nav-tab\" data-tab=\"about-tab\">About Us</a>\n\t\t\t\t<a href=\"#\" class=\"page nav-tab\" data-tab=\"service-tab\">Asesorias</a>\n\t\t\t\t<a href=\"#\" class=\"page nav-tab\" data-tab=\"libro-tab\">Libro de Vida</a>\n\t\t\t\t<a href=\"#\" class=\"page nav-tab\" data-tab=\"product-tab\">Productos</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"menu-tab\">Menu</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"slider-tab\">Slider</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"comment-tab\">Comment</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"contact-tab\">Contact</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"social-tab\">Social</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"aside-tab\">Aside</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"general-tab header-tab\">Header</a>\n\t\t\t\t<a href=\"#\" class=\"component nav-tab\" data-tab=\"footer-tab\">Footer</a>\n\t\t\t\t<!--\n\t\t\t\t\t<a href=\"#\" class=\"nav-tab\" data-tab=\"chatra-tab\">Chatra</a>\n\t\t\t\t\t<a href=\"#\" class=\"nav-tab\" data-tab=\"instagram-tab\">Instagram</a>\n\t\t\t\t-->\n\t\t\t</h2>\n\t\t\t<h3 style=\"float:right\" class=\"tabs-title\">General</h3>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t</div>\n\t\t<?php\n\t\techo $this->create_tabs_script();\n\t}", "function bpfit_walk_subtab_function_to_show_content() {\n\t\t\tinclude 'profile-menu/walk/bpfit-my-walk.php';\n\t\t}", "function jquery_create_tabs( $tab_id, $tabs, $callback, $prefix = '' )\n {\n global $page_info;\n\n $page_info['head'][] = _jquery_tabs( $tab_id );\n\n echo ( $prefix . '<div id=\"' . htmlentities( $tab_id ) . '\">' . \"\\n\" );\n\n echo ( $prefix . \"\\t\" . '<ul>' . \"\\n\" );\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\\t\" . '<li><a href=\"#' . htmlentities( $tk ) . '\">' . htmlentities( $tv ) . '</a></li>' . \"\\n\" );\n }\n echo ( $prefix . \"\\t\" . '</ul>' . \"\\n\" );\n\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\" . '<div id=\"' . htmlentities( $tk ) . '\">' . \"\\n\" );\n\n call_user_func_array( $callback, array( $tk, ( $prefix . \"\\t\\t\" ) ) );\n\n echo ( $prefix . \"\\t\" . '</div>' . \"\\n\" );\n }\n\n echo ( $prefix . '</div>' . \"\\n\" );\n }", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "public function onPreTabsContentAction($event)\n {\n $translate = OntoWiki::getInstance()->translate;\n $uri = $event->uri;\n\n $html = '<div style=\"display: none; padding: 10px 20px 10px 30px\" id=\"location_bar_container\" class=\"cmDiv\">\n <input id=\"location_bar_input\" class=\"text width75\" type=\"text\" value=\"' . $uri . '\" name=\"l\" />\n <a id=\"location_open\" class=\"minibutton\" style=\"float: none\">' .\n $translate->_('View Resource') .\n '</a>\n </div>';\n\n return $html;\n }", "protected 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}", "public function settingssubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_settingssubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t// echo do_shortcode ( '[youzer_groups per_page=\"10\"]' );\n\t}", "protected function _addTab(\n TDProject_Core_Interfaces_Block_Widget_Tab $tab) {\n \t$this->addBlock($tab);\n \treturn $tab;\n }", "private function screenNavigationTabs($tab)\n {\n $url = 'options-general.php?page=plugin_wordpress.php';\n echo '<p>';\n if (empty($tab)) $tab = 'general';\n echo '<a href=\"' . admin_url($url . '&tab=general') . '\"' . ($tab == 'general' ? ' style=\"font-weight: bold; text-decoration:none;\"' : '') . '>' . 'General Settings' . '</a> | ';\n echo '<a href=\"' . admin_url($url . '&tab=set_schedule') . '\"' . ($tab == 'set_schedule' ? ' style=\"font-weight: bold; text-decoration:none;\"' : '') . '>' . 'Set Schedule' . '</a> | ';\n echo '<a href=\"' . admin_url($url . '&tab=save_database') . '\"' . ($tab == 'save_database' ? ' style=\"font-weight: bold; text-decoration:none;\"' : '') . '>' . 'Save Database' . '</a> | ';\n echo '</p><hr/>';\n }", "public function customersubtab_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_customersubnav_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&amp;\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&amp;rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }", "public function get_title()\n {\n return __('Vertical Tabs', 'hslanding-elementor');\n }", "public function bp_account_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->account_control_centre_alternate_dashboard();\n\t}", "public static function add_custom(string $tab_name, $data)\n\t{\n\t\tself::$_custom_tabs[$tab_name] = $data;\n\t}", "function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}", "public 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}", "public function tab() {\n $args = func_get_args();\n\n if (count($args) == 0) {\n return $this->info['tab'];\n } else {\n $tab = array();\n\n if (!is_array($args[0])) {\n $tab['name'] = $args[0];\n } else {\n $tab = $args[0];\n }\n\n if (isset($args[1])) {\n $tab['plugin'] = $args[0];\n }\n\n if (isset($args[2])) {\n $tab['label'] = $args[2];\n }\n\n $tab = array_merge(array(\n 'plugin' => $this->id(),\n 'flag' => null,\n ), $tab);\n\n $this->hook('nav-tab', 'createNavTab', array(\n $tab['name'],\n $tab['plugin'],\n $tab['label'],\n $tab['flag'])\n );\n }\n }", "protected function start_section_list() {\n\n $html = html_writer::start_tag('div', array('id' => 'turforlag_wrapper'));\n $html .= html_writer::start_tag('div', array('id' => 'tabs', 'class' => 'turforlag'));\n return $html;\n }", "function widgetopts_tab_devices( $args ){ ?>\n <li class=\"extended-widget-opts-tab-devices\">\n <a href=\"#extended-widget-opts-tab-<?php echo $args['id'];?>-devices\" title=\"<?php _e( 'Devices', 'widget-options' );?>\" ><span class=\"dashicons dashicons-smartphone\"></span> <span class=\"tabtitle\"><?php _e( 'Devices', 'widget-options' );?></span></a>\n </li>\n <?php\n }" ]
[ "0.7119224", "0.70590043", "0.68497926", "0.68094987", "0.6714029", "0.6694266", "0.66703576", "0.6587499", "0.65872157", "0.63828075", "0.63728905", "0.62962013", "0.62494946", "0.6232096", "0.62179786", "0.61988485", "0.6189633", "0.61366624", "0.6133953", "0.6120614", "0.610176", "0.6094377", "0.608037", "0.60796684", "0.6074509", "0.6058113", "0.6051687", "0.6021385", "0.59846056", "0.5971434", "0.5964577", "0.5961169", "0.5925186", "0.5923129", "0.5890199", "0.58557624", "0.5846938", "0.5823551", "0.58208543", "0.5814681", "0.58088183", "0.5805271", "0.5792358", "0.5773987", "0.5756487", "0.5755272", "0.5731468", "0.57303876", "0.5724978", "0.57204026", "0.5713472", "0.5705439", "0.5695291", "0.5688672", "0.5685496", "0.56652045", "0.5660416", "0.56603825", "0.5644554", "0.5616022", "0.5615559", "0.56094664", "0.56049967", "0.5583495", "0.5579841", "0.5576317", "0.55657524", "0.5564575", "0.55566293", "0.55559915", "0.55552816", "0.5543583", "0.5541468", "0.5535092", "0.55327106", "0.551584", "0.55097175", "0.55006534", "0.5499437", "0.54981947", "0.54971784", "0.54960227", "0.5481175", "0.54737407", "0.54636276", "0.5461754", "0.5449857", "0.5445391", "0.5441907", "0.54414266", "0.5439758", "0.5436634", "0.5428496", "0.5419567", "0.5417673", "0.541248", "0.54110134", "0.5410449", "0.5409472", "0.54088515" ]
0.5905769
34
Renders HTML code for custom panel.
public function getPanel() { $items = $this->items; ob_start(); require_once __DIR__ . "/Callback.phtml"; return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n\n $this->setUp();\n \n $html = '';\n \n // $html .= $this->panelTitle();\n $html .= $this->panelMenu();\n // $html .= $this->panelButtons();\n \n if ($this->subPannel) {\n foreach ($this->subPannel as $subPanel) {\n if (is_string($subPanel))\n $html .= $subPanel;\n else\n $html .= $subPanel->render();\n }\n }\n \n return $html;\n \n }", "public function drawPanelTinyMCE() {\n\t\t\t// This needs cutting down to edit a panel -- basic formatting etc\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_panel.js\"></script>';\n\t\t\treturn $html;\n\t\t}", "public function render_panel_templates()\n {\n }", "public 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}", "public function actionControlPanel()\n {\n $this->render('controlPanel');\n }", "public function drawStartOptionsPanel()\r\n {\r\n echo '\r\n <div class=\"panel-body\">\r\n <ul class=\"list-group\">';\r\n }", "public function render_content()\n\t\t{ ?>\n\t\t\t<label><p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?>\n </span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() );?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span></p></label> <?php // WPCS: XSS ok. ?>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function render_content() { ?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">&percnt;</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function panelButtons()\n {\n\n $i18n = $this->getI18n();\n $html = '';\n \n if ($this->buttons || $this->filterButtons) {\n $html .= '<div class=\"wgt-panel\" >';\n \n if ($this->buttons) {\n $html .= '<div class=\"left\" >';\n $html .= $this->buildButtons();\n $html .= '</div>';\n }\n \n if ($this->filterButtons) {\n $html .= '<div class=\"right\" ><div class=\"left\" ><strong>'.$i18n->l('Filters', 'wbf.label').'&nbsp;|&nbsp;</strong></div>';\n $html .= $this->buildButtons($this->filterButtons);\n $html .= '</div>';\n }\n \n if ($this->filterPanel) {\n $html .= $this->filterPanel->render();\n }\n \n $html .= '</div>';\n }\n \n return $html;\n \n }", "public 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}", "public function render_content() {\n?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function render() {\n\t\techo '<div id=\"neve-dashboard\"></div>';\n\t}", "public function render_content()\n\t\t{ ?>\n\t\t\t<label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->description ); ?></span>\n <p class=\"description\">\n <span class=\"typography-size-label\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\"><input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public 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}", "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 getPanel()\n {\n if (class_exists('\\SqlFormatter')) {\n \\SqlFormatter::$pre_attributes = 'style=\"color: black;\"';\n }\n $queries = $this->pdo->getLog();\n $html = '<h1 '.$this->title_attributes.'>'.$this->title.'</h1>';\n $html .= '<div class=\"tracy-inner tracy-InfoPanel\">';\n if (count($queries) > 0) {\n $html .= '<table class=\"tracy-sortable\">';\n $html .= '<tr>';\n $html .= '<th>Time(ms)</td>';\n $html .= '<th>Statement</td>';\n $html .= '</tr>';\n foreach ($queries as $query) {\n $html .= '<tr>';\n $html .= '<td><span '.$this->time_attributes.'>'.round($query['time'], 4).'</span></td>';\n if (class_exists('\\SqlFormatter')) {\n $html .= '<td>'.\\SqlFormatter::highlight($query['statement']).'</td>';\n } else {\n $html .= '<td '.$this->query_attributes.'>'.$query['statement'].'</td>';\n }\n $html .= '</tr>';\n }\n $html .= '</table>';\n } else {\n $html .= '<p style=\"font-size:1.2em;font-weigt:bold;padding:10px\">No queries were executed!</p>';\n }\n $html .= '</div>';\n\n return $html;\n }", "public 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}", "public function drawWorkPanelTinyMCE() {\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/behaviour/tiny_mce/tiny_mce_workpanel.js\"></script>';\n\t\t\treturn $html;\n\t\t}", "public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }", "public function getPanel() {\n $isAdditionalBar = \\TracyDebugger::isAdditionalBar();\n $out = \"<h1>{$this->icon} {$this->label}\" . ($isAdditionalBar ? \" (\".$isAdditionalBar.\")\" : \"\") . \"</h1>\";\n\n $out .= '<span class=\"tracy-icons\"><span class=\"resizeIcons\"><a href=\"#\" title=\"Maximize / Restore\" onclick=\"tracyResizePanel(\\'' . $this->className . '\\')\">+</a></span></span>';\n\n // panel body\n $out .= '<div class=\"tracy-inner\">';\n\n $numOrphanFiles = count($this->orphanFiles);\n\n if($numOrphanFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the orange highlighted orphan files?\\');\">\n <input type=\"hidden\" name=\"orphanPaths\" value=\"'.implode('|', $this->orphanFiles).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_WARN.' !important; color: #FFFFFF\" name=\"deleteOrphanFiles\" value=\"Delete '.$numOrphanFiles.' orphan'._n('', 's', $numOrphanFiles).'\" />\n </form>&nbsp&nbsp;';\n }\n\n if($this->numMissingFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the red highlighted missing pagefiles?\\');\">\n <input type=\"hidden\" name=\"missingPaths\" value=\"'.urlencode(json_encode($this->missingFiles)).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_ALERT.' !important; color: #FFFFFF\" name=\"deleteMissingFiles\" value=\"Delete '.$this->numMissingFiles.' missing pagefile'._n('', 's', $this->numMissingFiles).'\" />\n </form>';\n }\n\n if($numOrphanFiles > 0 || $this->numMissingFiles > 0) {\n $out .= '<br /><br />';\n }\n\n $out .= '<div id=\"tracyPageFilesList\">'.$this->filesListStr.'</div>';\n\n $out .= \\TracyDebugger::generatePanelFooter($this->name, \\Tracy\\Debugger::timer($this->name), strlen($out));\n $out .= '</div>';\n\n return parent::loadResources() . $out;\n }", "public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\t\t\n\t\techo '<div class = \"selector-demo\">';\n\t\techo '<div class=\"title div33 el\">';\n\t\techo $settings['title'];\n\t\techo '<div class = \"box\" style=\"background-color:blue; width: ' . $settings['width']['size'] . $settings['width']['unit'] . '\">';\n\t\techo 'Hello';\n\t\techo '</div>';\n\t\techo '</div>';\n\t\t\n\t\techo '<div class = \"wrapper\">\n\t\tHello Circle\n\t\t</div>';\n\t\t\n if ( 'yes' === $settings['show_title'] ) {\n\t\techo '<div class=\"title div34 el\">';\n\t\techo $settings['Subtitle'];\n\t\techo '</div>';\n\t\techo '<div class=\"title2 div35 el\">';\n\t\techo $settings['Subtitle'];\n\t\techo '</div>';\n\t\t}\n \n\t\tforeach ( $settings['gallery'] as $image ) {\n\t\t\techo '<img class = \"siva_image_drag\" src=\"' . $image['url'] . '\">';\n\t\t}\n\t\t\n\t\techo '</div>';\n\t\techo '<div class=\"selector-demo\">';\n\t\techo '<div class = \"div33 el\"> Anime Demo</div> <div class = \"div34 el\"> Anime Demo</div> <div class = \"div35 el\"> Anime Demo</div>';\n\t\techo $settings['class'];\n\t\techo '</div>';\n\t\t\n\t\t\n\t\t\n\t}", "public function Render()\n {\n return \"<span class='\".$this->Icone.\"' title='\".$this->Title.\"' onclick=\".$this->OnClick.\" >&nbsp;&nbsp;</span>\";\n }", "protected function render_content() {\n\t\t\t?>\n\t\t\t\t<div class=\"customizer-divider\"></div>\n\t\t\t<?php\n\t\t}", "public 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}", "public function getPanel()\n {\n $html = '';\n foreach ($this->_count as $count) {\n $html .= $count['name']. ' - '.$count['total'].' ('.$count['users'].')'.'<br/>';\n }\n \n $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n $panel = '<h4>К-во пользователей онлайн:</h4>'.$html;\n return $panel;\n }", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "public function run(){\n echo CHtml::closeTag(\"div\");\n \n if ($this->leftCollarVisible) {\n echo CHtml::openTag(\"div\", $this->getCollarOptions(\"left\"));\n echo CHtml::closeTag(\"div\");\n }\n \n if ($this->rightCollarVisible) {\n echo CHtml::openTag(\"div\", $this->getCollarOptions(\"right\"));\n echo CHtml::closeTag(\"div\");\n }\n \n if ($this->stitchesVisible) {\n echo CHtml::openTag(\"div\", $this->getStichOptions(\"top\"));\n echo CHtml::closeTag(\"div\");\n echo CHtml::openTag(\"div\", $this->getStichOptions(\"bottom\"));\n echo CHtml::closeTag(\"div\");\n }\n \n // Left shadow triangle\n echo CHtml::openTag(\"div\", $this->getShadowTriangleOptions(\"left\"));\n echo CHtml::closeTag(\"div\");\n \n // Right shadow triangle\n echo CHtml::openTag(\"div\", $this->getShadowTriangleOptions(\"right\"));\n echo CHtml::closeTag(\"div\");\n \n echo CHtml::closeTag(\"div\");\n echo CHtml::closeTag(\"div\");\n }", "function getHTML()\n {\n $show = true;\n $HTML = \"\n <div class='$this->size own-padding'>\n <div class='panel col-sm-12'>\n <header id='$this->headID' class='panel-heading'>\n $this->title\n <div class='panel-actions'>\n <a id='$this->buttonID' class='btn-minimize'>\n <i class='fa'><span class='arrow_up'/></i>\n </a>\n </div>\n </header>\n\n <div id='$this->bodyID' class='panel-body'>\n $this->content\n </div>\n </div>\n </div>\n\";\n\n\n if( $this->content == \"\"){\n $HTML = \"\";\n Errorlist::publicAddError(4,1);\n $show = false;\n }\n\n if( $this->title == \"\"){\n Errorlist::publicAddError(5,1);\n }\n\n if( $this->size == \"\"){\n Errorlist::publicAddError(6,1);\n $HTML = \"\";\n $show = false;\n }\n\n if($show){\n InitJSObjects::initObject($this->panelID, 'Panel', \"'$this->headID','$this->bodyID','$this->buttonID'\");\n EventHandler::newEvent(\"$this->buttonID\", \"function(){ $this->panelID.minMax() }\", \"click\");\n }\n\n\n return $HTML;\n }", "public 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}", "public 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}", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\t\t?> \t\n\t\t\t<div class=\"wpsm-numhead wpsm-style1\">\n\t\t\t\t<span><?php echo intval($settings['num']);?></span>\t\t\t\t\n\t\t\t\t<h<?php echo esc_attr($settings['heading']);?> <?php echo ''.$this->get_render_attribute_string( \"content\" );?>><?php echo ''.$settings['content'];?></h<?php echo esc_attr($settings['heading']);?>>\n\t\t\t</div>\n\t \t<?php\t\n\t}", "public function render() {\n echo $this->getHtml();\n }", "protected 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}", "function render()\n {\n return '<frame name=\"'.$this->m_name.'\" scrolling=\"'.$this->m_scrolling.'\" '.(!$this->m_resize?\"noresize\":\"\").\n ' src=\"'.$this->m_src.'\" marginwidth=\"'.$this->m_margin.'\" marginheight=\"'.$this->m_margin.'\">'.\"\\n\";\n }", "public function getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "public function render_content()\n {\n CustomizerAddon::view( 'controls.switch', ['control' => &$this] );\n }", "public function render_content() { ?>\n\t\t<label>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<div class=\"customize-control-content\">\n\t\t\t\t<textarea class=\"widefat\" cols=\"45\" rows=\"5\" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t</label>\n\t<?php }", "public 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}", "public function render()\n {\n $this->script = <<<EOT\n\nEOT;\n return parent::render();\n }", "function render() {\n\t\t\t// this is to be overwritten as each module has a very unique display\n\t\t\t// for now we will have this default lame content\n\t\t\treturn \"<div style=\\\"border:1px solid blue;display:table\\\">Empty Module</div>\";\n\t\t}", "protected function render() {\n\n\t\t$settings = $this->get_settings_for_display();\n\t\t$counter_number = $settings['portfolio_counter_number'];\n\t\t$counter_title = $settings['portfolio_counter_title'];\n\n ?>\n\t\t<!-- Counter Output Start Here -->\n\t\t\t<div class=\"counter-box rounded py-3 text-center\">\n\t\t\t\t<h3 class=\"counter-value\"><?php echo $counter_number; ?></h3>\n\t\t\t\t<h6 class=\"counter-head font-weight-normal mb-0\"><?php echo $counter_title; ?></h6>\n\t\t\t</div>\n\t\t<!-- Counter End Here -->\n <?php\n\t}", "public function render()\n\t{\n\t\t$title = $this->renderTitle();\n\t\t$subtitle = $this->renderSubtitle();\n\t\t$new = $this->renderNew();\n\n\t\treturn <<<HTML\n<section class=\"block-new\">\n\t<div class=\"container\">\n\t\t<div class=\"container-inner\">\n\t\t\t<div class=\"block-new-layout\">\n\t\t\t\t$title\n\t\t\t\t$subtitle\n\t\t\t\t$new\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</section>\nHTML;\n\t}", "public function asHtml()\n {\n $current = isset($this->options['request_parameters']['sfWebDebugPanel']) ? $this->options['request_parameters']['sfWebDebugPanel'] : null;\n\n $titles = array();\n $panels = array();\n foreach ($this->panels as $name => $panel)\n {\n if ($title = $panel->getTitle())\n {\n if (($content = $panel->getPanelContent()) || $panel->getTitleUrl())\n {\n $id = sprintf('sfWebDebug%sDetails', $name);\n $titles[] = sprintf('<li class=\"%s\"><a title=\"%s\" href=\"%s\"%s>%s</a></li>',\n $panel->getStatus() ? 'sfWebDebug'.ucfirst($this->getPriority($panel->getStatus())) : '',\n $panel->getPanelTitle(),\n $panel->getTitleUrl() ? $panel->getTitleUrl() : '#',\n $panel->getTitleUrl() ? '' : ' onclick=\"sfWebDebugShowDetailsFor(\\''.$id.'\\'); return false;\"',\n $title\n );\n $panels[] = sprintf('<div id=\"%s\" class=\"sfWebDebugTop\" style=\"display:%s\"><h1>%s</h1>%s</div>',\n $id,\n $name == $current ? 'block' : 'none',\n $panel->getPanelTitle(),\n $content\n );\n }\n else\n {\n $titles[] = sprintf('<li>%s</li>', $title);\n }\n }\n }\n\n return '\n <div id=\"sfWebDebug\">\n <div id=\"sfWebDebugBar\">\n <ul id=\"sfWebDebugDetails\" class=\"sfWebDebugMenu\">\n '.implode(\"\\n\", $titles).'\n </ul>\n </div>\n\n '.implode(\"\\n\", $panels).'\n </div>\n ';\n }", "function render() {\n $inner = Html::el('div class=\"carousel-inner\"');\n foreach($this->slides as $slide)\n $inner->addHtml($slide);\n //add inner content to carousel\n $this->html->addHtml($inner);\n\n //add control elements\n if(isset($this->param['allowControls']) && $this->param['allowControls'] === TRUE)\n $this->add_controls();\n\n return $this->html->render();\n }", "public function html()\n {\n $random_quote = $this->randomQuote();\n $cp_path = CP_ROUTE;\n return $this->view('widget', compact('random_quote','cp_path'))->render();\n }", "public function run()\n\t{\n\t\tlist($name,$id)=$this->resolveNameID();\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id']=$id;\n\t\tif(isset($this->htmlOptions['name']))\n\t\t\t$name=$this->htmlOptions['name'];\n\n\t\t#$this->registerClientScript($id);\n\t\t#$this->htmlOptions[\"class\"]=\"form-control\";\n\t\t$this->htmlOptions=array_merge($this->htmlOptions,array(\n\t\t\t// 'htmlOptions'=>array('container'=>null),\n\t\t\t'labelOptions'=>array('style'=>'width: 100%;height: 100%;cursor:pointer','class'=>'ptm pbm mbn'),\n\t\t\t'template'=>'<div class=\"col-lg-1\"><a href=\"#\" class=\"thumbnail text-center\" style=\"margin-left: -10px;margin-right: -10px;\">{beginLabel}{labelTitle}<div class=\"text-center\">{input}</div>{endLabel}</a></div>',\n\t\t\t'separator'=>'',\n\t\t));\n\t\t\n\t\t#echo \"<small class=\\\"text-muted\\\"><em>Here a message for user</em></small>\";\n\t\t#echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);\n\t\techo '<div class=\"row\">'.Chtml::activeRadioButtonList($this->model,$this->attribute,\n\t\t $this->listData,$this->htmlOptions).'</div>';\n\t}", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "public function getPanel()\n {\n if (!$this->auth->hasIdentity()) {\n $html = '<h4>No identity</h4>';\n } else {\n $html = '<h4>Identity</h4>';\n $html .= $this->cleanData($this->auth->getIdentity());\n }\n\n return $html;\n }", "public function panel_content()\n {\n\n // Check if there is a form created\n if (!$this->form) {\n echo '<div class=\"wpforms-alert wpforms-alert-info\">';\n _e('You need to <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup\">setup your form</a> before you can manage the settings.', 'wpforms');\n echo '</div>';\n return;\n }\n\n\n\n\n // --------------------------------------------------------------------//\n // Notifications\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-custom_content\">';\n echo '<div class=\"wpforms-panel-content-section-title\">';\n _e('Custom content', 'wpforms');\n echo '</div>';\n wpforms_panel_field(\n 'tinymce',\n 'settings',\n 'custom_content_editor',\n $this->form_data,\n __('', 'wpforms'),\n array(\n 'default' => __('', 'wpforms'),\n 'tinymce' => array(\n 'editor_height' => '400',\n 'media_buttons' => true\n ),\n )\n );\n echo '</div>';\n\n // --------------------------------------------------------------------//\n // General\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-general\">';\n echo '<div class=\"wpforms-panel-content-section-title\">';\n _e('General', 'wpforms');\n echo '</div>';\n wpforms_panel_field(\n 'select',\n 'settings',\n 'enable_archive',\n $this->form_data,\n __('Enable archives', 'wpforms'),\n array(\n 'default' => '1',\n 'options' => array(\n '1' => __('On', 'wpforms'),\n '0' => __('Off', 'wpforms'),\n ),\n 'tooltip' => __('This options to allow all data of form can be stored in Archives ', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'form_title',\n $this->form_data,\n __('Form Name', 'wpforms'),\n array(\n 'default' => $this->form->post_title,\n )\n );\n wpforms_panel_field(\n 'textarea',\n 'settings',\n 'form_desc',\n $this->form_data,\n __('Form Description', 'wpforms')\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'form_class',\n $this->form_data,\n __('Form CSS Class', 'wpforms'),\n array(\n 'tooltip' => __('Enter CSS class names for the form wrapper. Multiple class names should be separated with spaces.', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'submit_text',\n $this->form_data,\n __('Submit Button Text', 'wpforms'),\n array(\n 'default' => __('Submit', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'submit_text_processing',\n $this->form_data,\n __('Submit Button Processing Text', 'wpforms'),\n array(\n 'tooltip' => __('Enter the submit button text you would like the button display while the form submit is processing.', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'submit_class',\n $this->form_data,\n __('Submit Button CSS Class', 'wpforms'),\n array(\n 'tooltip' => __('Enter CSS class names for the form submit button. Multiple names should be separated with spaces.', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'checkbox',\n 'settings',\n 'honeypot',\n $this->form_data,\n __('Enable anti-spam honeypot', 'wpforms')\n );\n $recaptcha_key = wpforms_setting('recaptcha-site-key');\n $recaptcha_secret = wpforms_setting('recaptcha-secret-key');\n $recaptcha_type = wpforms_setting('recaptcha-type');\n if (!empty($recaptcha_key) && !empty($recaptcha_secret)) {\n wpforms_panel_field(\n 'checkbox',\n 'settings',\n 'recaptcha',\n $this->form_data,\n 'invisible' === $recaptcha_type ? __('Enable Google invisible reCAPTCHA', 'wpforms') : __('Enable Google reCAPTCHA (v2)', 'wpforms')\n );\n }\n do_action('wpforms_form_settings_general', $this);\n echo '</div>';\n\n // --------------------------------------------------------------------//\n // Notifications\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-notifications\">';\n do_action('wpforms_form_settings_notifications', $this);\n echo '</div>';\n\n // --------------------------------------------------------------------//\n // Confirmation\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-confirmation\">';\n echo '<div class=\"wpforms-panel-content-section-title\">';\n _e('Confirmation', 'wpforms');\n echo '</div>';\n wpforms_panel_field(\n 'select',\n 'settings',\n 'confirmation_type',\n $this->form_data,\n __('Confirmation Type', 'wpforms'),\n array(\n 'default' => 'message',\n 'options' => array(\n 'message' => __('Message', 'wpforms'),\n 'page' => __('Show Page', 'wpforms'),\n 'redirect' => __('Go to URL (Redirect)', 'wpforms'),\n ),\n )\n );\n wpforms_panel_field(\n 'tinymce',\n 'settings',\n 'confirmation_message',\n $this->form_data,\n __('Confirmation Message', 'wpforms'),\n array(\n 'default' => __('Thanks for contacting us! We will be in touch with you shortly.', 'wpforms'),\n 'tinymce' => array(\n 'editor_height' => '200',\n ),\n )\n );\n wpforms_panel_field(\n 'checkbox',\n 'settings',\n 'confirmation_message_scroll',\n $this->form_data,\n __('Automatically scroll to the confirmation message', 'wpforms')\n );\n $p = array();\n $pages = get_pages();\n foreach ($pages as $page) {\n $depth = count($page->ancestors);\n $p[$page->ID] = str_repeat('-', $depth) . ' ' . $page->post_title;\n }\n wpforms_panel_field(\n 'select',\n 'settings',\n 'confirmation_page',\n $this->form_data,\n __('Confirmation Page', 'wpforms'),\n array(\n 'options' => $p,\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'confirmation_redirect',\n $this->form_data,\n __('Confirmation Redirect URL', 'wpforms')\n );\n do_action('wpforms_form_settings_confirmation', $this);\n echo '</div>';\n\n do_action('wpforms_form_settings_panel_content', $this);\n }", "public function render() {\n\n echo $this->html;\n\n }", "function slidedeck_create_custom_slidedeck_block( $html ) {\n ob_start();\n include( SLIDEDECK2_DEVELOPER_DIRNAME . '/views/_create-custom-slidedeck-block.php' );\n $html = ob_get_contents();\n ob_end_clean();\n\n return $html;\n }", "public function panel() {\n if(Auth::isLoggedIn()) {\n $this->view->render('admin/module/liveEdit/panel', [\n 'nodes' => $this->get($this->route),\n 'user' => $this->user,\n 'route' => $this->route,\n 'template' => $this->template,\n 'languages' => $this->em->all(Language::class),\n 'current_language' => $this->em->findBy(Language::class ,[\n 'code' => $_SESSION['Lampion']['language']\n ])[0],\n 'name' => $this->routeNames[$this->route] ?? null\n ]);\n }\n }", "public 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}", "protected function render_template() {\n\t\t?>\n\t\t<li id=\"accordion-section-{{ data.id }}\" class=\"accordion-section control-section control-section-{{ data.type }} cannot-expand\">\n\t\t\t<h3 class=\"accordion-section-title\">\n\t\t\t\t{{ data.title }}\n\t\t\t\t<a href=\"{{ data.button_url }}\" class=\"button alignright\" target=\"_blank\" rel=\"nofollow\">{{ data.button_text }}</a>\n\t\t\t</h3>\n\t\t</li>\n\t\t<?php\n\t}", "public 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}", "function panel_level_tired_driver($addTypePanel,$levelTired,$content,$pathPhoto) {\n\t\techo \"<div class='container-fluid' style='margin-top:2%;'>\n\t\t\t<div class='row'>\n\t\t\t\t<div class='col-md-6'>\n\t\t\t\t\t<div class='panel panel-$addTypePanel'>\n\t\t\t\t\t\t<div class='panel-heading'><h1>Nivel de Fatiga $levelTired</h1></div>\n\t\t\t\t\t\t<div class='panel-body'>$content</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='col-md-6'>\n\t\t\t\t\t$pathPhoto\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\";\n\t}", "public function render( ) { ?>\n <div id=\"<?php echo esc_attr($this->get_id()); ?>-container\" class=\"rwc-metabox-field-media\">\n <input type=\"hidden\"\n name=\"<?php echo esc_attr($this->get_id()); ?>\"\n id=\"<?php echo esc_attr($this->get_id()); ?>\"\n value=\"<?php echo esc_attr( $this->get_value() ); ?>\" />\n <div class=\"image-container\">\n <span class=\"add-new-image-btn\">+</span>\n </div>\n </div>\n <?php wp_enqueue_media(); ?>\n <?php wp_enqueue_script( 'rwc-metabox-field-media',\n $this->get_metabox()->get_library()->get_uri() .\n '/js/rwc/metabox/field/media.js', array( 'jquery' ) ); ?>\n <?php wp_enqueue_style( 'rwc-metabox-field-media-css',\n $this->get_metabox()->get_library()->get_uri() .\n '/css/rwc/metabox/field/media.css' ); ?>\n <?php }", "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 }", "public function render()\n {\n $label = $this->presentLabel();\n\n return '<div class=\"form-group\">'.PHP_EOL.$label.$this->renderInner().'</div>';\n }", "function render(){\r\n\t\t\r\n\t\t$class = (isset($this->field['class']))?$this->field['class']:'large-text';\r\n $export_string = get_option($this->field['id']);\r\n if(!is_string($export_string)){\r\n $export_string = serialize($export_string);\r\n }\r\n\t\t$export_code=base64_encode($export_string);\r\n\t\t$placeholder = (isset($this->field['placeholder']))?' placeholder=\"'.esc_attr($this->field['placeholder']).'\" ':'';\r\n\t\techo '<p><strong>Export Code</strong> (Copy export code and paste it in import area of other WordPress isntallation)</p><textarea '.$placeholder.'class=\"export_code '.$class.'\" rows=\"6\" >'.$export_code.'</textarea>';\r\n\t\techo '<p><strong>Import Code</strong></p>\r\n <textarea id=\"'.$this->field['id'].'\" '.$placeholder.' class=\"import_code '.$class.'\" rows=\"6\" ></textarea>\r\n <a href=\"javascript:void(0);\" class=\"import_data button button-primary\" rel-id=\"'.$this->field['id'].'\">Import</a> ';\r\n \r\n\t\t\r\n\t\techo (isset($this->field['desc']) && !empty($this->field['desc']))?'<br/><span class=\"description\">'.$this->field['desc'].'</span>':'';\r\n\t\t\r\n\t}", "protected function render() {\r\n\t\t$settings = $this->get_settings_for_display();\r\n\t\t$all_feature_items = $settings['feature_items'];\r\n\t\t$featured = $settings['featured'] == 'yes' ? 'featured' : '';\r\n\t\t?>\r\n <div class=\"single-price-plan-02 <?php echo esc_attr( $featured ); ?>\">\r\n <div class=\"price-header\">\r\n <h4 class=\"name\"><?php echo esc_html( $settings['title'] ); ?></h4>\r\n <div class=\"price-wrap\">\r\n <span class=\"price\"><?php echo esc_html( $settings['sign'] ); ?><?php echo esc_html( $settings['price'] ); ?></span>\r\n <span class=\"month\"><?php echo esc_html( $settings['month'] ); ?></span>\r\n </div>\r\n </div>\r\n <div class=\"price-body\">\r\n <ul>\r\n\t\t\t\t\t<?php foreach ( $all_feature_items as $item ): ?>\r\n <li><?php echo esc_html( $item['feature'] ) ?></li>\r\n\t\t\t\t\t<?php endforeach; ?>\r\n </ul>\r\n </div>\r\n <div class=\"price-footer\">\r\n <a href=\"<?php echo esc_url( $settings['btn_link']['url'] ); ?>\"\r\n class=\"boxed-btn\"><?php echo esc_html( $settings['btn_text'] ); ?></a>\r\n </div>\r\n </div>\r\n\t\t<?php\r\n\t}", "function ShowPanel()\n{\n echo '<script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/jspanel.js\"></script>';\n}", "protected function render() {\n\n\t\t$settings = $this->get_settings_for_display();\n\t\t$section_heading_title = $settings['portfolio_section_heading_title'];\n\t\t$section_heading_sub_title = $settings['portfolio_section_heading_sub_title'];\n\n ?>\n\t\t<!-- Section Heading Output Start Here -->\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xl-8 col-lg-8 offset-lg-2 offset-xl-2\">\n\t\t\t\t\t<div class=\"section-title text-center\">\n\t\t\t\t\t\t<h2 class=\"mb-0\"><?php echo $section_heading_title; ?></h2>\n\t\t\t\t\t\t<p class=\"align-self-center mb-0\"><?php echo $section_heading_sub_title; ?><span class=\"heading-separator-line mx-auto\"></span> </p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<!-- Section Heading End Here -->\n <?php\n\t}", "public function render()\r\n\t{\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\tif (!empty($this->id)) \r\n\t\t{\r\n\t\t\t$content .= \"id='\" . $this->id . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($this->name)) \r\n\t\t{\r\n\t\t\t$content .= \"name='\" . $this->name . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($this->className)) \r\n\t\t{\r\n\t\t\t$content .= \"class='\" . $this->className . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\treturn $content;\r\n\t}", "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\t\t$javascriptValidationCode = $this->printJavascriptValidationCode();\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.(!empty($printJavascriptValidationCode) ? ' '.parent::JSENABLEDCLASS : '').'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"password\"'\r\n\t\t\t\t\t\t.' value=\"'.HtmlFormTools::auto_htmlspecialchars($this->text, $this->needsUtf8Safety()).'\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t\t.$javascriptValidationCode\r\n\t\t;\r\n\t}", "public function render()\n {\n return view('components.bank.accounts-panel');\n }", "public function drawEndOptionsPanel()\r\n {\r\n echo ' </ul>\r\n </div>';\r\n }", "public function render_content() {\n\n\t\tif ( empty( $this->choices ) ) {\n\t\t\treturn;\n\t\t} ?>\n\n\t\t<?php if ( ! empty( $this->label ) ) : ?>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t<?php endif; ?>\n\n\t\t<?php if ( ! empty( $this->description ) ) : ?>\n\t\t\t<span class=\"description customize-control-description\"><?php echo $this->description; ?></span>\n\t\t<?php endif; ?>\n\n\t\t<?php $multi_values = ! is_array( $this->value() ) ? explode( ',', $this->value() ) : $this->value(); ?>\n\n\t\t<ul>\n\t\t\t<?php foreach ( $this->choices as $value => $label ) : ?>\n\n\t\t\t\t<li>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\"\n\t\t\t\t\t\t value=\"<?php echo esc_attr( $value ); ?>\" <?php checked( in_array( $value, $multi_values ) ); ?> />\n\t\t\t\t\t\t<?php echo esc_html( $label ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\n\t\t\t<?php endforeach; ?>\n\t\t</ul>\n\n\t\t<input type=\"hidden\" <?php $this->link(); ?> value=\"<?php echo esc_attr( implode( ',', $multi_values ) ); ?>\"/>\n\t<?php }", "public function getPanel()\n\t{\n\t\t$body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n\n\t\tob_start();\n\n?>\n<h4>HTML</h4>\n<script type=\"text/javascript\" charset=\"utf-8\">\n\tvar ZFHtmlLoad = window.onload;\n\twindow.onload = function(){\n\t\tif (ZFHtmlLoad) {\n\t\t\tZFHtmlLoad();\n\t\t}\n\t\t$(\"#ZFDebug_Html_Tagcount\").html(document.getElementsByTagName(\"*\").length);\n\t\t$(\"#ZFDebug_Html_Stylecount\").html($(\"link[rel*=stylesheet]\").length);\n\t\t$(\"#ZFDebug_Html_Scriptcount\").html($(\"script[src]\").length);\n\t\t$(\"#ZFDebug_Html_Imgcount\").html($(\"img[src]\").length);\n\t};\n</script>\n<ul class=\"array-show\">\n\t<li><span class=\"key\">Tags</span> <span class=\"value\" id=\"ZFDebug_Html_Tagcount\"></span></li>\n\t<li><span class=\"key\">HTML Size</span> <span class=\"value\"><?php echo L8M_Library::getBytes(strlen($body)); ?></span></li>\n\t<li><span class=\"key\">CSS Files</span> <span class=\"value\" id=\"ZFDebug_Html_Stylecount\"></span></li>\n\t<li><span class=\"key\">JavaScript Files</span> <span class=\"value\" id=\"ZFDebug_Html_Scriptcount\"></span></li>\n\t<li><span class=\"key\">Image Files</span> <span class=\"value\" id=\"ZFDebug_Html_Imgcount\"></span></li>\n</ul>\n<h5>Validation</h5>\n<form method=\"<?php echo Zend_Form::METHOD_POST; ?>\" action=\"http://validator.w3.org/check\">\n\t<fieldset>\n\t\t<input type=\"hidden\" name=\"charset\" value=\"utf-8\" />\n\t\t<input type=\"hidden\" name=\"fragment\" value=\"<?php echo htmlentities($body); ?>\" />\n\t\t<input type=\"submit\" value=\"Validate With W3C\" />\n\t</fieldset>\n</form>\n<?php\n\n\t\treturn ob_get_clean();\n\t}", "public function html(){\n\t\treturn '<div class=\"form-group\">'.$this->label.$this->input.'</div>';\n\t}", "public function run()\n {\n Html::addCssClass($this->wrapperOptions, 'page-header');\n\n echo Html::beginTag(\"div\", $this->wrapperOptions);\n\n if (!empty($this->buttons)) {\n echo ButtonGroup::widget(\n [\n 'options' => $this->buttonGroupOptions,\n 'buttons' => $this->buttons,\n ]\n );\n }\n\n echo Html::tag(\"h1\", $this->title, $this->titleOptions);\n\n echo Html::endTag(\"div\");\n }", "protected function render() {\n $settings = $this->get_settings_for_display();\n\n if ( is_array( $settings['filterpanel'] ) ) {\n $settings['filterpanel'] = $this->rehub_filter_values( $settings['filterpanel'] );\n $settings['filterpanel'] = rawurlencode( json_encode( $settings['filterpanel'] ) );\n }\n // print_r($settings);\n $this->normalize_arrays( $settings );\n $this->render_custom_js();\n echo recent_posts_function( $settings );\n }", "protected function render() {\n\t\tglobal $product;\n\t\t$product_id = $product->get_id();\n\t\t$settings = $this->get_settings_for_display();\n\t\t$this->add_inline_editing_attributes( 'content', 'advanced' );\n\t\t?>\n\t\t<div class=\"product-page-header-widget\">\n\t\t\t<div class=\"content-inner\">\n\t\t\t\t<div class=\"product-page-header\" style=\"background:url(<?= $settings['image']['url'] ?>) no-repeat center center;\">\n\t\t\t\t\t<div class=\"pph-content\">\n\t\t\t\t\t\t<div class=\"pph-content-inner\">\n\t\t\t\t\t\t\t<div class=\"pph-wrapper\">\n\t\t\t\t\t\t\t\t<div class=\"triangle-strip\">\n\t\t\t\t\t\t\t\t\t<div class=\"t1\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"t2\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"t3\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"t4\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"text-wrapper\">\n\t\t\t\t\t\t\t\t\t<h2 class=\"p-name\"><?= $product->get_name() ?></h2>\n\t\t\t\t\t\t\t\t\t<div class=\"text-wysiwyg\">\n\t\t\t\t\t\t\t\t\t\t<?= wpautop( $settings['content'] ) ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<a href=\"<?= do_shortcode('[add_to_cart_url id=\"'.$product_id.'\"]'); ?>\" data-quantity=\"1\" data-product_id=\"<?= $product_id ?>\" class=\"add-to-cart-btn w-btn\">BUY NOW</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function render(){\n \t\treturn parent::render();\n \t}", "protected function render() {\n $settings = $this->get_settings_for_display();\n\n if ( $settings['testimonial_list'] ) {\n ?>\n\n <div class=\"swiper-container ts_swiper_container\">\n\n <div class=\"swiper-wrapper ts_swiper_wrapper\">\n \n <?php foreach ( $settings['testimonial_list'] as $item ) : ?>\n <div class=\"swiper-slide\">\n <?php if ( $item['testimonial_image']['url'] ) : ?>\n <div class=\"img-box\">\n <?php echo \\Elementor\\Group_Control_Image_Size::get_attachment_image_html( $item, 'testimonial_img_size', 'testimonial_image'); ?>\n </div>\n <?php endif; ?>\n <p class=\"testimonial-content\"><?php echo $item['testimonial_content']; ?></p>\n <p class=\"overview\"><span class=\"testimonial_name\"><?php echo $item['testimonial_name']; ?></span><?php if ( $item['testimonial_title'] ) : ?><span class=\"testimonial_title\">, <?php echo $item['testimonial_title']; ?></span><?php endif; ?></p>\n </div>\n <?php endforeach; ?>\n \n </div>\n\n <!-- Pagination -->\n <div class=\"swiper-pagination ts_swiper_pagination\"></div>\n\n <!-- Navigation Buttons -->\n <div class=\"swiper-button-prev ts_swiper_button_prev\"><i class=\"fas fa-chevron-left\"></i></div>\n <div class=\"swiper-button-next ts_swiper_button_next\"><i class=\"fas fa-chevron-right\"></i></div>\n\n </div>\n \n <?php\n }\n }", "protected function style_Panel(Abstract_Input $input): string\n {\n $body = $input->builder_Tag();\n $title = $input->getLable();\n $panel = (new Panel($title, $body));\n $icon = ' <span class=\"glyphicon glyphicon-pushpin\" aria-hidden=\"true\"></span> ';\n return ( new Box_shadow($icon, $panel->builder(), 8))\n ->builder();\n }", "public function display() {\n\t\t$this->prepareForDisplay();\n\n\t\techo '<div class=\"panel-heading\">';\n\t\t$this->displayHeader($this->Header, $this->getNavigation());\n\t\techo '</div>';\n\t\techo '<div class=\"panel-content statistics-container\">';\n\t\t$this->displayContent();\n\t\techo '</div>';\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}", "private function generateHead(){\n echo '<div class=\"panel panel-default\">';\n echo '<div class=\"panel-heading\">';\n echo '<h1 class=\"panel-title\"><span class=\"glyphicon glyphicon-flag\"></span>Your last orders</h1>';\n echo '</div>';\n echo '<div class=\"panel-body\">';\n }", "public function render($_params = NULL)\n {\n\t\tif($_params){\n\t\t\t$this->additional_parameters = $_params;\n\t\t}\n\t\t\n\t\t/* TODO Thinking for marking each injected code\n \t$injectedCode = \"\\n<!-- Begin of widget \".$this->widget_name.\" body -->\\n\";\n \n \t$injectedCode .= \"\\n<!-- End of widget \".$this->widget_name.\" body -->\\n\";\n\t\t*/\n\t\t\n\t\t\n\t\t$injectedCode = '';\n\n return $injectedCode; \n }", "public function showAddAdminPanel(){\n return $this->view('frontend/admin/addadmin.twig');\n }", "public function render(){\n\t\t$prefix = su_cmpt();\n\t\t\n\t\t$location = (isset($this->addon->settings->location) && $this->addon->settings->location) ? $this->addon->settings->location : 'Boston, MA';\n\t\t$country = (isset($this->addon->settings->country) && $this->addon->settings->country) ? $this->addon->settings->country : 'USA';\n\t\t$forecast = (isset($this->addon->settings->forecast) && $this->addon->settings->forecast) ? $this->addon->settings->forecast : '4';\n\t\t$color = (isset($this->addon->settings->color) && $this->addon->settings->color) ? $this->addon->settings->color : '#ffffff';\n\t\t$background = (isset($this->addon->settings->background) && $this->addon->settings->background) ? $this->addon->settings->background : '#8DD438';\n\t\t$padding = (isset($this->addon->settings->padding) && $this->addon->settings->padding) ? $this->addon->settings->padding : '25px';\n\t\t$margin = (isset($this->addon->settings->margin) && $this->addon->settings->margin) ? $this->addon->settings->margin : '0px';\n\t\t\n\t\t$city_only = ( $this->addon->settings->city_only == 1 ) ? 'yes' : 'no';\n\t\t\n\t\t$class = (isset($this->addon->settings->class) && $this->addon->settings->class) ? $this->addon->settings->class : '';\n\t\t$api = (isset($this->addon->settings->api) && $this->addon->settings->api) ? $this->addon->settings->api : '';\n\t\t$view = (isset($this->addon->settings->view) && $this->addon->settings->view) ? $this->addon->settings->view : '';\n\t\t$units = (isset($this->addon->settings->units) && $this->addon->settings->units) ? $this->addon->settings->units : '';\n\n\t\t// Output\n\t\t$output = '<div class=\"bdt-addon bdt-addon-weather ' . $class .'\">';\n\t\t$output .= su_do_shortcode('['.$prefix.'weather location=\"'.$location.'\" country=\"'.$country.'\" city_only=\"'.$city_only.'\" forecast=\"'.$forecast.'\" api=\"'.$api.'\" view=\"'.$view.'\" units=\"'.$units.'\" color=\"inherit\" background=\"inherit\"]');\n\t\t$output .= '</div>';\n\n\t\treturn $output;\n\t}", "protected function _render( $model, One_Dom $d )\n\t{\n\t\t$id = $this->getID();\n\t\t$params = $this->getParametersAsString();\n\t\t$events = $this->getEventsAsString();\n\t\t$title = $this->getCfg('title');\n\n\t\t$dom = One_Repository::getDom();\n\n\t\t$dom->add('<div id=\"' . $id . '\"' . $params . $events . '>' . \"\\n\");\n\t\t$dom->add('<h3 id=\"' . $id . '-title\" class=\"jpane-toggler title\"' . $params . $events . '><span>' . $title . '</span></h3>' . \"\\n\");\n\t\t$dom->add(\"<div class='jpane-slider content'>\");\n\n\t\tforeach($this->getContent() as $content)\n\t\t\t$content->render( $model, $dom );\n\n\t\t$dom->add('</div></div>');\n\n\t\t// add js declaration for the panel\n\t\t$options = '{';\n\t\t$opt['onActive']\t = 'function(toggler, i) { toggler.addClass(\\'jpane-toggler-down\\'); toggler.removeClass(\\'jpane-toggler\\'); }';\n\t\t$opt['onBackground'] = 'function(toggler, i) { toggler.addClass(\\'jpane-toggler\\'); toggler.removeClass(\\'jpane-toggler-down\\'); }';\n\t\t$opt['duration']\t = 200;\n\t\tforeach ($opt as $k => $v)\n\t\t{\n\t\t\tif ($v) {\n\t\t\t\t$options .= $k.': '.$v.',';\n\t\t\t}\n\t\t}\n\t\tif (substr($options, -1) == ',') {\n\t\t\t$options = substr($options, 0, -1);\n\t\t}\n\t\t$options .= '}';\n\n\t\t// $dom->add('window.addEvent(\\'domready\\', function(){ new Accordion($$(\\'.panel h3.jpane-toggler\\'), $$(\\'.panel div.jpane-slider\\'), '.$options.'); });', '_onload');\n\n\t\tOne_Vendor::getInstance()->loadScriptDeclaration('window.addEvent(\\'domready\\', function(){ new Accordion($$(\\'.panel h3.jpane-toggler\\'), $$(\\'.panel div.jpane-slider\\'), '.$options.'); });', 'onload', 10);\n\n\t\t$d->addDom($dom);\n\t}", "public function showAddEmployeePanel(){\n return $this->view('frontend/admin/addemployee.twig');\n }", "public function render()\n {\n $_ipt = '';\n\n if($this->type == 'submit') {\n $_ipt = $this->renderSubmitItem();\n }else if($this->inline !== 'false' || $this->type == 'inline') {\n $_ipt = $this->renderInlineItem();\n }else{\n $_ipt = <<<'blade'\n <div {{ $attributes->merge([\"class\" => \"layui-form-item\"]) }}>\n <label for=\"name\" class=\"layui-form-label {{$required}}\">\n @if($required)<span>*</span> @endif{{$label}}\n </label>\n <div class=\"layui-input-block\">{{$slot}}</div>\n </div>\n blade;\n }\n return $_ipt;\n }", "public function add_quick_view_panel() {\n\t\t\t$options = $this->get_options();\n\n\t\t\tif ( 'none' === $options['shop_page_quick_view_position'] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$icon = apply_filters( 'woostify_pro_quick_view_close_icon', 'ti-close' );\n\t\t\t?>\n\t\t\t<div id=\"woostify-quick-view-panel\" data-view_id=\"0\">\n\t\t\t\t<div class=\"shop-quick-view\">\n\t\t\t\t\t<button class=\"quick-view-close-btn <?php echo esc_attr( $icon ); ?>\"></button>\n\t\t\t\t\t<div class=\"quick-view-content\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function run()\n {\n echo \"\\n\" . $this->renderBodyEnd();\n echo \"\\n\" . Html::endTag('div');\n\n }", "public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}", "public function getPanelContent()\n {\n $sqlLogs = $this->getLogs();\n\n // Add table uses summary\n // Sort table uses\n $idTables = array();\n $counts = array();\n $i = 0;\n foreach(self::$tables as $table => $nbUse)\n {\n $counts[$table] = $nbUse;\n $idTables[$table] = $i++;\n }\n \n $tableSummary = array();\n \n if(is_array($counts))\n {\n arsort($counts, SORT_NUMERIC);\n \n // Build summary of table uses\n foreach($counts as $table => $nbUse)\n {\n $tableSummary[] = sprintf('<div style=\"float: left; margin-right: 10px; line-height: 15px;\"><a href=\"#\" onclick=\"jQuery(\\'#sfWebDebugBarCancelLink\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').hide(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.info\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.table-'.$table.'\\').show(); return false;\" title=\"Only display queries on this table\"><span style=\"color: blue;\"> %s</span> (%s)</a></div>', $table, $nbUse);\n }\n }\n\n // Add color legend\n $legend = '<div style=\"float: left; font-weight: bold; padding: 2px; margin: 2px 2px 2px 0;\">SQL status legend :</div>';\n foreach($this->colors as $min => $content)\n {\n $legend .= '<div style=\"background-color: '.$content[0].'; color: white; float: left; margin: 2px; padding: 2px;\">&gt;= '.$min.' queries ('.$content[1].')</div>';\n }\n\n $liStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n margin-bottom:0\"';\n\n $liInfoStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n background: #CCC; text-indent: 10px;\n text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);\"';\n\n\n\n // Build information and query rows\n $queries = array();\n foreach($sqlLogs as $i => $log)\n {\n $table = $log['table'];\n\n $message = '';\n if(array_key_exists($i, $this->info))\n {\n foreach($this->info[$i] as $mess)\n {\n $message .= '<li'.$liInfoStyle.' class=\"info\" style=\"\"><b>'.$mess['message'].' queries:</b></li>';\n }\n }\n \n $link = '';\n if(strstr($log['log'],'SELECT') > 0)\n {\n $link = '<a href=\"#\" style=\"color: blue;\" onclick=\"jQuery(this).parent().children(\\'span.select\\').show(); jQuery(this).hide(); return false;\">(View select content)</a>';\n }\n $message .= '<li'.$liStyle.' class=\"table-'.$table.' sfWebDebugDatabaseQuery\">'.$log['log'].' '.$link.'</li>';\n $queries[] = $message;\n }\n\n return '\n <div id=\"sfWebDebugAdvancedDatabaseLogs\">\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.$legend.'</div>\n <b>Table call summary (click on a table to filter queries)</b>\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.implode(\"\\n\", $tableSummary).'</div>\n <b>SQL queries <span id=\"sfWebDebugBarCancelLink\" style=\"display: none;\">(<a href=\"#\" style=\"color: blue\" onclick=\"jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').show(); jQuery(this).parent().hide(); return false;\">Cancel table filters</a>)</a></span></b>\n <ol style=\"margin-left: 20px\">'.implode(\"\\n\", $queries).'</ol>\n </div>\n ';\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 getHTML()\n\t{\t\t\t\t\n\t\t// getHTML() is called by ilRepositoryGUI::show()\n\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// there is no way to do a permissions check here, we have no wsp\n\t\t\n\t\t$this->filterInactivePostings();\n\t\t\n\t\t$list_items = $this->getListItems();\t\t\n\t\t\n\t\t$list = $nav = \"\";\n\t\tif($list_items)\n\t\t{\t\t\t\t\n\t\t\t$list = $this->renderList($list_items, \"previewEmbedded\");\n\t\t\t$nav = $this->renderNavigation($this->items, \"gethtml\", \"previewEmbedded\");\n\t\t}\t\t\n\t\t\n\t\treturn $this->buildEmbedded($list, $nav);\t\t\n\t}", "public function render()\n {\n echo htmlspecialcharsbx($this->getPrefix());\n $action = $this->getAction();\n $id = $this->getId();\n $class = $this->getClass();\n $name = $this->getName();\n $dataAttributes = $this->getDataAttributes();\n $dataAttributesString = '';\n foreach ($dataAttributes as $key => $value) {\n $dataAttributesString .= ' data-' . $key . '=\"' . $value . '\" ';\n }\n\n $formArguments = 'action=\"' . (($action !== null) ? $action : '#') . '\" ';\n $formArguments .= ($id !== null) ? 'id=\"' . $id . '\" ' : '';\n $formArguments .= !empty($class) ? 'class=\"' . implode(' ', $class) . '\" ' : '';\n $formArguments .= ($name !== null) ? 'name=\"' . $name . '\" ' : '';\n $formArguments .= $dataAttributesString;\n echo '<form ' . $formArguments . '>';\n\n $fields = $this->getFields();\n foreach ($fields as $key => $field) {\n $field->render();\n }\n\n echo '</form>';\n\n echo htmlspecialcharsbx($this->getPostfix());\n }", "public function panel_content() {\n\n\t\t$core_templates = apply_filters( 'wpforms_form_templates_core', array() );\n\t\t$additional_templates = apply_filters( 'wpforms_form_templates', array() );\n\t\t$additional_count = count( $additional_templates );\n\t\t?>\n\t\t<div id=\"wpforms-setup-form-name\">\n\t\t\t<span><?php esc_html_e( 'Form Name', 'wpforms-lite' ); ?></span>\n\t\t\t<input type=\"text\" id=\"wpforms-setup-name\" placeholder=\"<?php esc_attr_e( 'Enter your form name here&hellip;', 'wpforms-lite' ); ?>\">\n\t\t</div>\n\n\t\t<div class=\"wpforms-setup-title core\">\n\t\t\t<?php esc_html_e( 'Select a Template', 'wpforms-lite' ); ?>\n\t\t</div>\n\n\t\t<p class=\"wpforms-setup-desc core\">\n\t\t\t<?php\n\t\t\techo wp_kses(\n\t\t\t\t__( 'To speed up the process, you can select from one of our pre-made templates or start with a <strong><a href=\"#\" class=\"wpforms-trigger-blank\">blank form.</a></strong>', 'wpforms-lite' ),\n\t\t\t\tarray(\n\t\t\t\t\t'strong' => array(),\n\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t\t?>\n\t\t</p>\n\n\t\t<?php $this->template_select_options( $core_templates, 'core' ); ?>\n\n\t\t<div class=\"wpforms-setup-title additional\">\n\t\t\t<?php esc_html_e( 'Additional Templates', 'wpforms-lite' ); ?>\n\t\t\t<?php echo ! empty( $additional_count ) ? '<span class=\"count\">(' . $additional_count . ')</span>' : ''; ?>\n\t\t</div>\n\n\t\t<?php if ( ! empty( $additional_count ) ) : ?>\n\n\t\t\t<p class=\"wpforms-setup-desc additional\">\n\t\t\t\t<?php\n\t\t\t\tprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %1$s - WPForms.com URL to a template suggestion, %2$s - WPForms.com URL to a doc about custom templates. */\n\t\t\t\t\t\t__( 'Have a suggestion for a new template? <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">We\\'d love to hear it</a>. Also, you can <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">create your own templates</a>!', 'wpforms-lite' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t\t\t'target' => array(),\n\t\t\t\t\t\t\t\t'rel' => array(),\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'https://wpforms.com/form-template-suggestion/',\n\t\t\t\t\t'https://wpforms.com/docs/how-to-create-a-custom-form-template/'\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</p>\n\n\t\t\t<div class=\"wpforms-setup-template-search-wrap\">\n\t\t\t\t<i class=\"fa fa-search\" aria-hidden=\"true\"></i>\n\t\t\t\t<input type=\"text\" id=\"wpforms-setup-template-search\" value=\"\" placeholder=\"<?php esc_attr_e( 'Search additional templates...', 'wpforms-lite' ); ?>\">\n\t\t\t</div>\n\n\t\t\t<?php $this->template_select_options( $additional_templates, 'additional' ); ?>\n\n\t\t<?php else : ?>\n\n\t\t\t<p class=\"wpforms-setup-desc additional\">\n\t\t\t\t<?php\n\t\t\t\tprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %1$s - WPForms.com URL to an addon page, %2$s - WPForms.com URL to a docs article. */\n\t\t\t\t\t\t__( 'More are available in the <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">Form Templates Pack addon</a> or by <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">creating your own</a>.', 'wpforms-lite' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t\t\t'target' => array(),\n\t\t\t\t\t\t\t\t'rel' => array(),\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'https://wpforms.com/addons/form-templates-pack-addon/',\n\t\t\t\t\t'https://wpforms.com/docs/how-to-create-a-custom-form-template/'\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</p>\n\n\t\t<?php\n\t\tendif;\n\t\tdo_action( 'wpforms_setup_panel_after' );\n\t}", "public function render() { ?>\n <!-- Message alert -->\n <div class=\"alert alert-dismissable fade in\" id=\"message-alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <h4 id=\"message-alert-title\"></h4>\n <span id=\"message-alert-body\"></span>\n </div>\n <!-- Message alert end -->\n <?php\n }", "public function render_widget() {\n\n return Widget::render($this->settings);\n\n }", "function panel_info_for_modal($addClass,$nameItem,$contentMessage) {\n\t\techo \"<div class='panel $addClass text-center'>\n\t\t\t\t<div class='panel-heading'><strong>$nameItem</strong></div>\n\t\t\t\t<div class='panel-body'>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t$contentMessage.'<br>'\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\";\n\t}", "public function getPanel()\n\t{\n\t\tif (count($this->data)) {\n\t\t\t$template = parent::createTemplate();\n\t\t\t$template->data = $this->data;\n\n\t\t\treturn $template;\n\t\t}\n\t}", "public function render()\n {\n $html = System::template('admin/v_main.php', [\n 'title' => $this->title,\n 'content' => $this->content,\n ]);\n \n return $html;\n }" ]
[ "0.7449529", "0.7013223", "0.70042974", "0.66466624", "0.6574167", "0.65655375", "0.65591407", "0.64912575", "0.64757884", "0.6472299", "0.64442617", "0.6423426", "0.64165133", "0.64089715", "0.63769734", "0.63768154", "0.6357087", "0.63555574", "0.63422155", "0.631103", "0.6307751", "0.6303114", "0.62954813", "0.62784237", "0.6271286", "0.6265895", "0.6214361", "0.6207658", "0.619315", "0.61906725", "0.61734515", "0.61586124", "0.61559117", "0.6145159", "0.614284", "0.6131664", "0.61292946", "0.61178756", "0.6117452", "0.60988665", "0.60622483", "0.60517687", "0.6048411", "0.604419", "0.6039437", "0.6038529", "0.6037414", "0.603699", "0.60337543", "0.6028415", "0.6007705", "0.59939134", "0.5989498", "0.5982983", "0.5982836", "0.59786236", "0.59280187", "0.5925842", "0.592485", "0.5924386", "0.5923244", "0.5913794", "0.5908708", "0.5908158", "0.5901518", "0.5898245", "0.5872313", "0.58671236", "0.5836027", "0.583418", "0.58341056", "0.5825569", "0.5824591", "0.58201104", "0.58114773", "0.58079374", "0.5804732", "0.58036584", "0.58016145", "0.57994723", "0.57989675", "0.5795969", "0.57924515", "0.57876545", "0.578398", "0.5783648", "0.57656205", "0.5764049", "0.57552034", "0.5750518", "0.57459116", "0.5744734", "0.5744633", "0.57414234", "0.5737906", "0.57358813", "0.57326293", "0.5728937", "0.5724423", "0.5721444" ]
0.6072721
40
Handles an incomuing request and saves the data if necessary.
private function processRequest() { $request = NEnvironment::getService('httpRequest'); if ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { $data = json_decode(file_get_contents('php://input'), TRUE); if (count($data) > 0) { foreach ($data as $key => $value) { if (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) { $this->items[$key]['callback']->invokeArgs($this->items[$key]['args']); } } } die(json_encode(array('status' => "OK"))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function handleRequest();", "private function handlePostRequest() {\n $this->store();\n }", "public function handleRequest() {}", "abstract public function handle_request();", "public function handleDataSubmission() {}", "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 handleRequest();", "public function handleRequest();", "public function handleRequest();", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "function handleRequest() ;", "public function saveInfoAfterRequest()\n {\n if (!$this->_waitingToSaveInfo) {\n $this->_waitingToSaveInfo = true;\n\n // If the request is already over, trigger this immediately\n if (in_array($this->state, [\n Application::STATE_AFTER_REQUEST,\n Application::STATE_SENDING_RESPONSE,\n Application::STATE_END,\n ], true)) {\n $this->saveInfoAfterRequestHandler();\n } else {\n Craft::$app->on(WebApplication::EVENT_AFTER_REQUEST, [$this, 'saveInfoAfterRequestHandler']);\n }\n }\n }", "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 processRequest();", "abstract public function processRequest();", "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 handled_request() {\n if ( ! wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'nonce_from_shortcode' ) ) {\n wp_send_json_error( [\n 'error' => __( 'Nonce Verification Failed', 'form_submit_ajax' ),\n ] );\n }\n \n if ( empty( $_REQUEST ) ) {\n wp_send_json_error( [\n 'error' => __( 'Sorry data can not be empty', 'form_submit_ajax' )\n ] );\n }\n\n $args = [\n 'fname' => sanitize_text_field( $_REQUEST['fname'] ),\n 'lname' => sanitize_text_field( $_REQUEST['lname'] ),\n 'email' => sanitize_email( $_REQUEST['email'] ),\n 'message' => sanitize_textarea_field( $_REQUEST['message'] ),\n ];\n $inserted = wp_af_insert_address( $args );\n\n if ( is_wp_error( $inserted ) ) {\n wp_send_json_error( [\n 'error' => __( 'Something went wrong', 'form_submit_ajax' )\n ] );\n }\n\n wp_send_json_success( [\n 'message' => __( 'Data save successfuly', 'form_submit_ajax' )\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 }", "public function storeIncomingData() {}", "public abstract function processRequest();", "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 }", "public function postDispatch()\n {\n parent::postDispatch();\n\n $this->getRequestData();\n }", "abstract public function handleRequest($request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function captureIncomingRequest()\n {\n try {\n $this->request = new Request;\n } catch (\\Throwable $th) {\n exit(json_encode([\n 'error' => $th->getMessage(),\n 'SUCCESS' => false,\n ]));\n }\n\n $this->payload = $this->request->data();\n $this->endpoint = urldecode($this->payload['endpoint']);\n unset($this->payload['endpoint']);\n }", "public function processRequests() {\n\t\t$receivedRequests = $this->receivedRequestMapper->findAll();\n\t\tforeach ($receivedRequests as $receivedRequest) {\n\t\t\t$id = $receivedRequest->getId();\n\t\t\t$sendingLocation = $receivedRequest->getSendingLocation();\n\t\t\t$type = $receivedRequest->getRequestType();\n\t\t\t$addedAt = $receivedRequest->getAddedAt();\n\t\t\t$field1 = $receivedRequest->getField1();\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase Request::USER_EXISTS: //Want same behavior for these two queries\n\t\t\t\tcase Request::FETCH_USER: //for login for a user that doesn't exist in the db\n\t\t\t\t\t$userExists = $this->api->userExists($field1) ? '1' : '0';\t\n\n\t\t\t\t\t$this->api->beginTransaction();\n\t\t\t\t\t$response = new QueuedResponse($id, $sendingLocation, (string) $userExists, $this->api->microTime());\n\t\t\t\t\t$this->queuedResponseMapper->save($response); //Does not throw Exception if already exists\n\n\t\t\t\t\tif ($userExists) {\n\t\t\t\t\t\t$userUpdate = $this->userUpdateMapper->find($field1);\n\t\t\t\t\t\t$displayName = $this->api->getDisplayName($field1);\n\t\t\t\t\t\t$password = $this->api->getPassword($field1);\n\t\t\t\t\t\t$queuedUser = new QueuedUser($field1, $displayName, $password, $userUpdate->getUpdatedAt(), $sendingLocation); \n\t\t\t\t\t\t$this->queuedUserMapper->save($queuedUser); //Does not throw Exception if already exists\n\t\t\t\t\t}\n\t\t\t\t\t$this->api->commit();\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->api->log(\"Invalid request_type {$type} for request from {$sendingLocation} added_at {$addedAt}, field1 = {$field1}\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request = $this->receivedRequestMapper->delete($receivedRequest);\n\t\t}\n\t}", "abstract public function handleRequest(Request $request);", "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 }", "abstract protected function process(Request $request);", "public function handlerNeedsRequest()\n {\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}", "abstract function _do_execute(request $request);", "protected function _request() {}", "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('resetTablesRequest', $_POST)) {\n handleResetRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n }\n\n disconnectFromDB();\n }\n }", "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 }", "protected function handle(Request $request) {}", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "function process_request() {\n\t\tglobal $publishthis;\n\n\t\ttry{\n\n\t\t\t$bodyContent = '';\n\n\t\t\tif ( function_exists( 'wpcom_vip_file_get_contents' ) ) {\n\t\t\t\t$bodyContent = wpcom_vip_file_get_contents( 'php://input', 10, 60 );\n\t\t\t} else {\n\t\t\t\t$bodyContent = file_get_contents( 'php://input' );\n\t\t\t}\n\n\t\t\t$publishthis->log->addWithLevel( array( 'message' => 'Endpoint Request', 'status' => 'info', 'details' => $bodyContent ), \"2\" );\n\n\t\t\t$arrEndPoint = json_decode( $bodyContent, true );\n\n\t\t\t$action = $arrEndPoint[\"action\"];\n\n\t\t\t$pt_settings = $publishthis->get_options();\n\n\t\t\tif( !in_array( $action, array('resetState', 'stopEndpoint', 'resumeEndpoint') ) ) {\n\t\t\t\t$manually_stopped = get_option( 'pt_import_manually_stopped' );\n\t\t\t\tif ( $manually_stopped == 1 ) {\n\t\t\t\t\t$this->sendFailure('Import manually stopped');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch( $action ) {\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$this->actionVerify();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"publish\":\n\t\t\t\t\tif( $publishthis->get_option( 'curated_publish' ) != 'import_from_manager' ) {\n\t\t\t\t\t\t$this->sendFailure( \"Publishing through CMS is disabled\" );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$feedId = intval( $arrEndPoint[\"feedId\"], 10 );\n\t\t\t\t\t$pageNum = intval( $arrEndPoint[\"pageNum\"], 10 );\n\t\t\t\t\t$importId = $arrEndPoint[\"importId\"];\n\n\t\t\t\t\t$this->actionPublish2( $feedId, $pageNum, $importId );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"getAuthors\":\n\t\t\t\t\t$this->actionGetAuthors();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"getCategories\":\n\t\t\t\t\t$this->actionGetCategories();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"resetState\":\n\t\t\t\t\t$this->resetState();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"stopEndpoint\":\n\t\t\t\t\t$this->stopEndpoint();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"resumeEndpoint\":\n\t\t\t\t\t$this->resumeEndpoint();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->sendFailure( \"Empty or bad request made to endpoint\" );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch( Exception $ex ) {\n\t\t\t//we will log this to the pt logger, but we always need to send back a failure if this occurs\n\n\t\t\t$this->sendFailure( $ex->getMessage() );\n\t\t}\n\n\t\treturn;\n\t}", "public function postExecution($request){}", "public function store(Request $request)\n {\n DB::beginTransaction();\n \n try {\n\n $validator = Validator::make($request->all(), Inquiry::createRules());\n\n if ($validator->fails()) {\n throw new \\Exception($validator->errors());\n }\n\n $inquiry = $this->jobChoiceService->inquiry()->store($request);\n\n if ($inquiry) {\n $this->data['results']['message'] = 'Inquiry successfully sent.';\n $this->data['status'] = 200;\n }\n\n } catch (\\Exception $e) {\n DB::rollBack();\n $this->data['error'] = $e->getMessage();\n }\n\n DB::commit();\n return response()->json($this->data, $this->data['status']);\n\n }", "function processIncomingData() {\n\t \tglobal $TSFE;\n\n\t \t\t// fetch incoming POST data and restore current session data:\n\t \t$incomingData = t3lib_div::_GP($this->prefixId);\n\t \t\n\t \tif (!is_array ($this->sessionData)) {\n\t \t\t$this->sessionData = array (\n\t \t\t\t'data' => array(),\n\t \t\t\t'submitCount' => 0,\n\t \t\t\t'currentStep' => 1,\n\t\t\t\t'submissionId' => md5(t3lib_div::getIndpEnv('REMOTE_ADDR').microtime()),\n\t \t\t);\n\t \t}\n\t \tif (!is_array ($incomingData['data'])) {\n\t \t\t$incomingData['data'] = array();\n\t \t}\n\n\t \t\t// To avoid submit spamming attacks we restrict each session to a certain amount of submits:\n\t\t$this->sessionData['submitCount']++;\n\t\tif ($this->sessionData['submitCount'] < $this->maxSubmitsPerSession) {\n\n\t\t\t\t// Now proceed according to the type of submission:\n\t\t\tif (isset ($incomingData['submitcancel'])) {\n\t\t\t\t$this->submitType = 'cancel';\n\t\t\t\t$this->sessionData['data'] = array();\n\t\t\t\t$this->sessionData['currentStep'] = 1;\n\t\t\t\t\t// Reset submission id. This is used for making sure that a submission is only processed once. It must be handled by the extension\n\t\t\t\t\t// which processes the form:\n\t\t\t\t$this->sessionData['submissionId'] = md5(t3lib_div::getIndpEnv('REMOTE_ADDR').microtime());\n\t\t\t} elseif (isset ($incomingData['submitproceed'])) {\n\t\t\t\t$this->submitType = 'proceed';\n\t\t\t\t$this->sessionData['data'] = (t3lib_div::array_merge_recursive_overrule ($this->sessionData['data'], $incomingData['data']));\n\n\t\t\t\t$evalResult = $this->evaluate_stepFields ($incomingData['currentstep'], $this->sessionData['data']);\n\t\t\t\tif ($evalResult === TRUE) {\n\t\t\t\t\t$this->sessionData['currentStep']= $incomingData['currentstep'] + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->submitType = 'evalerror';\n\t\t\t\t}\n\t\t\t} elseif (isset ($incomingData['submitback'])) {\n\t\t\t\t$this->submitType = 'back';\n\t\t\t\t$this->sessionData['data'] = (t3lib_div::array_merge_recursive_overrule ($this->sessionData['data'], $incomingData['data']));\n\t\t\t\t$this->sessionData['currentStep']= $incomingData['currentstep'] - 1;\n\t\t\t} elseif (isset ($incomingData['submitsubmit'])) {\n\t\t\t\t$this->submitType = 'submit';\n\t\t\t\t$this->sessionData['data'] = (t3lib_div::array_merge_recursive_overrule ($this->sessionData['data'], $incomingData['data']));\n\t\t\t\t$evalResult = $this->evaluate_allFields ($this->sessionData['data']);\n\t\t\t\tif ($evalResult !== TRUE) {\n\t\t\t\t\t$this->submitType = 'evalerror';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$TSFE->fe_user->setKey ('ses', $this->prefixId, $this->sessionData);\n\t\t$this->currentStep = $this->sessionData['currentStep'];\n\t }", "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 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}", "protected function processRequest()\n\t{\n\t\t$this->request[\"COPY_ORDER\"] = $_REQUEST[\"COPY_ORDER\"] == \"Y\";\n\t\t$this->request[\"ID\"] = urldecode(urldecode($this->arParams[\"ID\"]));\n\n\t\tif (strlen($_REQUEST[\"del_filter\"]))\n\t\t{\n\t\t\tunset($_REQUEST[\"filter_id\"]);\n\t\t\tunset($_REQUEST[\"filter_date_from\"]);\n\t\t\tunset($_REQUEST[\"filter_date_to\"]);\n\t\t\tunset($_REQUEST[\"filter_status\"]);\n\t\t\tunset($_REQUEST[\"filter_payed\"]);\n\t\t\tunset($_REQUEST[\"filter_canceled\"]);\n\t\t\t$_REQUEST[\"filter_history\"] = \"Y\";\n\t\t\tif ($this->arParams[\"SAVE_IN_SESSION\"] == \"Y\")\n\t\t\t{\n\t\t\t\tunset($_SESSION[\"spo_filter_id\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_date_from\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_date_to\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_status\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_payed\"]);\n\t\t\t\tunset($_SESSION[\"spo_filter_canceled\"]);\n\t\t\t\t$_SESSION[\"spo_filter_history\"] = \"Y\";\n\t\t\t}\n\t\t}\n\n\t\t$this->filterRestore();\n\t\t$this->filterStore();\n\n\t\t$this->sortBy = (strlen($_REQUEST[\"by\"]) ? $_REQUEST[\"by\"]: \"ID\");\n\t\t$this->sortOrder = (strlen($_REQUEST[\"order\"]) ? $_REQUEST[\"order\"]: \"DESC\");\n\n\t\t$this->prepareFilter();\n\t}", "function processRecording($request) {\n $connector = $this->getConnector();\n $connector->handleRecording($request);\n }", "public function request() { if($this->allowed(USER_WORKER)) {\n switch($this->action) {\n case 'pendingAmount':\n $this->getPending();\n break;\n case 'pendingList':\n $this->getRequests();\n break;\n case 'rejectedList':\n $this->getRequests('rejected');\n break;\n case 'acceptedList':\n $this->getRequests('accepted');\n break;\n case 'reject':\n $this->reject();\n break;\n case 'accept':\n $this->accept();\n break;\n default:\n $this->updateValue();\n break;\n }\n // direct update\n // TODO\n } else if ( ! $this->action ) {\n if($this->institution && testInstitution($this->institution)) {\n $this->appendToQueue();\n } else {\n $this->denied();\n }\n }\n }", "protected function main()\n {\n $this->checkPosted();\n $database = $this->getDatabase();\n $request = $this->getRequest($database);\n $currentUser = User::getCurrent($database);\n\n $target = WebRequest::postString('target');\n\n // FIXME: domains!\n $requestQueue = RequestQueue::getByApiName($database, $target, 1);\n\n if ($requestQueue === false) {\n throw new ApplicationLogicException('Defer target not valid');\n }\n\n if ($request->getQueue() == $requestQueue->getId() && $request->getStatus() == RequestStatus::OPEN) {\n SessionAlert::warning('This request is already in the specified queue.');\n $this->redirect('viewRequest', null, array('id' => $request->getId()));\n\n return;\n }\n\n $closureDate = $request->getClosureDate();\n $date = new DateTime();\n $date->modify(\"-7 days\");\n\n if ($request->getStatus() == RequestStatus::CLOSED && $closureDate < $date) {\n if (!$this->barrierTest('reopenOldRequest', $currentUser, 'RequestData')) {\n throw new ApplicationLogicException(\n \"You are not allowed to re-open a request that has been closed for over a week.\");\n }\n }\n\n if ($request->getEmail() === $this->getSiteConfiguration()->getDataClearEmail()) {\n if (!$this->barrierTest('reopenClearedRequest', $currentUser, 'RequestData')) {\n throw new ApplicationLogicException(\n \"You are not allowed to re-open a request for which the private data has been purged.\");\n }\n }\n\n if ($request->getStatus() === RequestStatus::JOBQUEUE) {\n /** @var JobQueue[] $pendingJobs */\n $pendingJobs = JobQueueSearchHelper::get($database)->byRequest($request->getId())->statusIn([\n JobQueue::STATUS_QUEUED,\n JobQueue::STATUS_READY,\n JobQueue::STATUS_WAITING,\n ])->fetch();\n\n foreach ($pendingJobs as $job) {\n $job->setStatus(JobQueue::STATUS_CANCELLED);\n $job->setError('Cancelled by request deferral');\n $job->save();\n\n Logger::backgroundJobCancelled($database, $job);\n }\n }\n\n $request->setReserved(null);\n $request->setStatus(RequestStatus::OPEN);\n $request->setQueue($requestQueue->getId());\n $request->setUpdateVersion(WebRequest::postInt('updateversion'));\n $request->save();\n\n Logger::deferRequest($database, $request, $requestQueue->getLogName());\n\n $this->getNotificationHelper()->requestDeferred($request);\n\n $deto = htmlentities($requestQueue->getDisplayName(), ENT_COMPAT, 'UTF-8');\n SessionAlert::success(\"Request {$request->getId()} deferred to {$deto}\");\n\n $this->redirect();\n }", "public function process_data() {\n // Process portfolio export request if any.\n $this->process_portfolio_export();;\n\n // New/update entries request.\n if ($editentries = optional_param('editentries', '', PARAM_TAGLIST)) {\n $this->editentries = $editentries;\n return;\n }\n\n // Process entries data.\n if ($processed = $this->process_entries_data()) {\n list($strnotify, $processedeids) = $processed;\n\n // Redirect base url.\n $redirecturl = $this->baseurl;\n $redirecturl->remove_params('eids');\n $redirecturl->remove_params('editentries');\n\n // TODO: handle filter removal if necessary.\n // $redirecturl->remove_params('filter');\n\n $response = $strnotify;\n $timeout = 0;\n\n // Are we returning to form?\n if ($editentries = $this->editentries) {\n if ($processedeids) {\n $processedentries = implode(',', $processedeids);\n // If we continue editing the same entries, simply return.\n if ($processedentries == $editentries) {\n return;\n }\n }\n\n // Otherwise, redirect to same view with new editentries param.\n $redirecturl->param('editentries', $editentries);\n redirect($redirecturl, $response, $timeout);\n }\n\n // We are not returning to form, so we need to apply redirection settings if any.\n $submission = $this->submission_settings;\n $timeout = !empty($submission['timeout']) ? $submission['timeout'] : 0;\n if (!empty($submission['redirect'])) {\n $redirecturl->param('view', $submission['redirect']);\n }\n\n if ($processedeids) {\n // Submission response.\n if (!empty($submission['message'])) {\n $response = $submission['message'];\n }\n\n // Display after if set and not returning to form.\n if (!empty($submission['displayafter'])) {\n $redirecturl->param('eids', implode(',', $processedeids));\n }\n }\n\n redirect($redirecturl, $response, $timeout);\n }\n }", "protected function initiateSubRequest() {}", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function process(Request $request)\n {\n \n // next if you want save one step progress to session use\n $this->saveProgress($request);\n }", "public function process_queue()\r\n {\r\n error_reporting(0);\r\n\r\n // TODO: Prefill information is stored in this array. It's nasty, but it works for now.\r\n // This will need to be cleaned up somehow, later.\r\n $this->prefillRequests = array();\r\n\r\n $this->parseResponses();\r\n\r\n // Array of keys that need to be included in the response.\r\n $include = array('request', 'class', 'hit');\r\n $responseQuery = [];\r\n foreach($this->messageQuery as $response) {\r\n // Switch all keys to lower case to prevent possible case errors.\r\n $responseArr = array_change_key_case($response, CASE_LOWER);\r\n // returns an array that intersects with the keys from the $include array\r\n $responseQuery[] = array_intersect_key($responseArr, array_flip($include));\r\n }\r\n\r\n $requestSummary = $this->ArchiveResponse->ArchiveRequest->Request->getSummary(\r\n $this->CurrentAgency->agencyId,\r\n $this->CurrentDevice->agencyDeviceId);\r\n\r\n $summary = array(\r\n 'requests' => $requestSummary,\r\n 'response' => $responseQuery,\r\n 'prefill' => $this->prefillRequests\r\n );\r\n $this->set('summary', $summary);\r\n }", "public function handleServiceRequest() {\n //\n // Create instance of SOAP server.\n //\n $SoapServer = new SoapServer($this->getWsdlFullPath()); \n $SoapServer->setClass(AblePolecat_Data::getDataTypeName($this)); \n $SoapServer->setPersistence(SOAP_PERSISTENCE_SESSION);\n $SoapServer->handle();\n }", "public function entryOICAction(Request $request){\n\n $nic=Auth::User()->nic;\n $user=db::table('users')->where('Nic',$nic)->First();\n $statusType=$request->statusType;\n if($statusType==\"new\"){\n //initial entry progress when submitting the entry\n $citizenNIC=$request->complainantNIC;\n $userInfo = db::table('users')->where('nic',$citizenNIC)->First();\n $email=$userInfo->email;\n\n\n $progress=new EntryProgress();\n $progress->entryID=$request->entryID;\n $progress->progress=$request->initialProgress;\n $progress->policeOfficerName=$user->name;\n $progress->officerNic=$user->nic;\n $progress->rank=$user->profession;\n $progress->policeOffice=$user->policeOffice;\n $progress->role=$user->role;\n $progress->citizenView=\"Yes\";\n $progress->policeView=\"Yes\";\n $progress->save();\n\n //entry progress when oic forward the entry to the branch\n $progress=new EntryProgress();\n $progress->entryID=$request->entryID;\n $progress->policeOfficerName=$user->name;\n $progress->officerNic=$user->nic;\n $progress->rank=$user->profession;\n $progress->policeOffice=$user->policeOffice;\n $progress->role=$user->role;\n $progress->progress=\"Entry is forwarded to the $request->branch branch of $request->policeStation\";\n $progress->citizenView=\"No\";\n $progress->policeView=\"Yes\";\n $progress->save();\n\n $progress=new EntryProgress();\n $progress->entryID=$request->entryID;\n $progress->policeOfficerName=$user->name;\n $progress->officerNic=$user->nic;\n $progress->rank=$user->profession;\n $progress->policeOffice=$user->policeOffice;\n $progress->role=$user->role;\n $progress->progress=\"Entry is accepted and Forwarded to the relevant section.\";\n $progress->citizenView=\"Yes\";\n $progress->policeView=\"No\";\n $progress->save();\n\n if($request->evidence!=null){\n $evidence=new Evidence();\n $evidence->entryID=$request->entryID;\n $evidence->witnessId=Auth::User()->nic;\n $evidence->evidence_txt=$request->evidence;\n if ($request->evidenceCitizenView==\"Yes\"){\n $evidence->citizenView=\"Yes\";\n }\n else{\n $evidence->citizenView=\"No\";\n }\n $evidence->policeView=\"Yes\";\n $evidence->save();\n\n }\n if ($request->hasFile('evidenceImage')){\n\n $files=$request->file('evidenceImage');\n $folderName=$request->entryID;\n\n $dt = Carbon::now();\n $newdatez=str_replace(':',\"-\",$dt);\n $i=1;\n foreach($files as $file) {\n $fileExtension=$file->getClientOriginalExtension();\n $fileNewName=$i.\".\".$fileExtension;\n $file->move(\n base_path() . \"/public/evidences/$folderName/$newdatez\",$fileNewName\n );\n $i += 1;\n }\n $evidence=new Evidence();\n $evidence->entryID=$request->entryID;\n $evidence->witnessId=Auth::User()->nic;\n $evidence->evidence_txt=\"Image Evidence\";\n $evidence->evidence_image_count=$i;\n if ($request->evidenceImageCitizenView==\"Yes\"){\n $evidence->citizenView=\"Yes\";\n }\n else{\n $evidence->citizenView=\"No\";\n }\n $evidence->policeView=\"Yes\";\n $evidence->evidence_image=$newdatez;\n $evidence->save();\n }else{\n if($request->suspects!=null){\n $suspects=new Suspect();\n $suspects->entryID=$request->entryID;\n $suspects->name=$request->suspects;\n $suspects->userName=$user->name;\n $suspects->userNic=$nic;\n $suspects->userRole=$user->role;\n if ($request->suspectCitizenView==\"Yes\"){\n $suspects->citizenView=\"Yes\";\n }\n else{\n $suspects->citizenView=\"No\";\n }\n $suspects->policeView=\"Yes\";\n $suspects->save();\n }\n\n if($request->entryProgress!=null){\n $progress=new EntryProgress();\n $progress->entryID=$request->entryID;\n $progress->progress=$request->entryProgress;\n $progress->policeOfficerName=$user->name;\n $progress->officerNic=$user->nic;\n $progress->rank=$user->profession;\n $progress->policeOffice=$user->policeOffice;\n $progress->role=$user->role;\n if ($request->progressCitizenView==\"Yes\"){\n $progress->citizenView=\"Yes\";\n }\n else{\n $progress->citizenView=\"No\";\n }\n $progress->policeView=\"Yes\";\n\n $progress->save();\n }\n }\n\n $branchTemp=db::table('police_offices')->where('policeOfficeType',\"Branch Police Office\")->where('headPoliceOffice',$request->policeStation)->where('policeOfficeArea',$request->branch)->First();\n\n DB::table('entries')\n ->where('entryID',$request->entryID)\n ->update(['oicNotification'=>\"n\",'boicNotification'=>\"y\",'status'=>\"ongoing\",'branch'=>$branchTemp->id]);\n\n $data = array(\n 'heading'=>\"Weclome to Crime Reporting System..\",\n 'entryAccept'=>\"Your Entry was accepted by the Officer Incharge of \".$user->policeOffice,\n 'entryID'=> \"Entry ID : \".$request->entryID,\n 'complaint'=>\"Complaint : \".$request->complaint,\n 'messageToCitizen1'=>\"Your entry will be investigated by the relevant police branch.\",\n 'messageToCitizen2'=>\"If you have any evidences and suspects please submit\",\n 'thank'=>\"Thank You!\");\n\n Mail::send(['text'=>'sendEmail.entryAcceptEmail'], $data, function($message) use($email) {\n $message->to($email)->subject\n ('Entry Accepted');\n $message->from('[email protected]','SL Police');\n });\n }\n else if($statusType==\"ongoing\"){\n if($request->ongoingSubmit==\"Close Entry\"){\n DB::table('entries')\n ->where('entryID',$request->entryID)\n ->update(['status'=>\"closed\"]);\n $nic=Auth::User()->nic;\n $entries=db::table('entries')->where('status',\"ongoing\")->get();\n $type=\"Closed Entries\";\n $oicDetails = db::table('users')->where('nic',$nic)->First();\n $branches = db::table('police_offices')->where('headPoliceOffice',$oicDetails->policeOffice)->where('policeOfficeType','Branch Police Office')->get();\n\n $progress=new EntryProgress();\n $progress->entryID=$request->entryID;\n $progress->policeOfficerName=$user->name;\n $progress->officerNic=$user->nic;\n $progress->rank=$user->profession;\n $progress->policeOffice=$user->policeOffice;\n $progress->role=$user->role;\n $progress->progress=\"Investigation is over and the entry is solved.\";\n $progress->citizenView=\"Yes\";\n $progress->policeView=\"Yes\";\n $progress->save();\n }\n $type=\"Ongoing Entries\";\n\n if($request->evidence!=null){\n $evidence=new Evidence();\n $evidence->entryID=$request->entryID;\n $evidence->witnessId=Auth::User()->nic;\n $evidence->evidence_txt=$request->evidence;\n if ($request->evidenceCitizenView==\"Yes\"){\n $evidence->citizenView=\"Yes\";\n }\n else{\n $evidence->citizenView=\"No\";\n }\n $evidence->policeView=\"Yes\";\n $evidence->save();\n\n }\n if ($request->hasFile('evidenceImage')){\n\n $files=$request->file('evidenceImage');\n $folderName=$request->entryID;\n\n $dt = Carbon::now();\n $newdatez=str_replace(':',\"-\",$dt);\n $i=1;\n foreach($files as $file) {\n $fileExtension=$file->getClientOriginalExtension();\n $fileNewName=$i.\".\".$fileExtension;\n $file->move(\n base_path() . \"/public/evidences/$folderName/$newdatez\",$fileNewName\n );\n $i += 1;\n }\n $evidence=new Evidence();\n $evidence->entryID=$request->entryID;\n $evidence->witnessId=Auth::User()->nic;\n $evidence->evidence_txt=\"Image Evidence\";\n $evidence->evidence_image_count=$i;\n if ($request->evidenceImageCitizenView==\"Yes\"){\n $evidence->citizenView=\"Yes\";\n }\n else{\n $evidence->citizenView=\"No\";\n }\n $evidence->policeView=\"Yes\";\n $evidence->evidence_image=$newdatez;\n $evidence->save();\n }\n if($request->suspects!=null){\n $suspects=new Suspect();\n $suspects->entryID=$request->entryID;\n $suspects->name=$request->suspects;\n $suspects->userName=$user->name;\n $suspects->userNic=$nic;\n $suspects->userRole=$user->role;\n if ($request->suspectCitizenView==\"Yes\"){\n $suspects->citizenView=\"Yes\";\n }\n else{\n $suspects->citizenView=\"No\";\n }\n $suspects->policeView=\"Yes\";\n $suspects->save();\n }\n\n if($request->entryProgress!=null){\n $progress=new EntryProgress();\n $progress->entryID=$request->entryID;\n $progress->progress=$request->entryProgress;\n $progress->policeOfficerName=$user->name;\n $progress->officerNic=$user->nic;\n $progress->rank=$user->profession;\n $progress->policeOffice=$user->policeOffice;\n $progress->role=$user->role;\n if ($request->progressCitizenView==\"Yes\"){\n $progress->citizenView=\"Yes\";\n }\n else{\n $progress->citizenView=\"No\";\n }\n $progress->policeView=\"Yes\";\n\n $progress->save();\n }\n }\n\n $entry=db::table('entries')->where('entryID',$request->entryID)->First();\n $evidences=db::table('evidence')->where('entryId',$request->entryID)->where('policeView',\"Yes\")->get();\n $suspects=db::table('suspects')->where('entryID',$request->entryID)->where('policeView',\"Yes\")->get();\n $entryProgresses=db::table('entry_progresses')->where('policeView',\"Yes\")->where('entryID',$request->entryID)->get();\n $nic=Auth::User()->nic;\n $oicDetails = db::table('users')->where('nic',$nic)->First();\n $branches = db::table('police_offices')->where('headPoliceOffice',$oicDetails->policeOffice)->where('policeOfficeType','Branch Police Office')->get();\n $currentBranch=db::table('police_offices')->where('id',$entry->branch)->First();\n\n return view('oic/entryView',compact('entry','evidences','suspects','entryProgresses','branches','oicDetails','currentBranch'));\n }", "public function requestHasBeenHandled()\n {\n $this->requestHandled = true;\n }", "function store() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the default model\n\t\t$model = $this->getDefaultModel();\n\n\t\tif (!$model) {\n\t\t\tthrow new Exception('Store task called, but there is no model assigned to that controller. Check method getDefaultModel.');\n\t\t}\n\n\t\t// Make a normalized data object from HTTP request data\n\t\t$data = $model->getDataFromRequest();\n\n\t\t// Prepare the data (auto-fill data like empty URL segment fields and similar)\n\t\t$model->prepareForStorage($data);\n\n\t\t// Check if the data validates\n\t\t$checkResult = $model->validateData($data);\n\n\t\t$isInsert = $model->isInsert($data);\n\n\t\t// Abort and send feedback if validation fails\n\t\tif ($checkResult === false) {\n\t\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\t\t\t$response = new stdClass();\n\t\t\t$response->success = false;\n\t\t\t$response->errors = $model->getErrors();\n\t\t\techo json_encode($response);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the data stored\n\t\t$success = $model->store($data);\n\n\t\t// Run the afterSave stuff\n\t\t$this->afterStore($success);\n\n\t\t// Abort and send feedback if storage fails\n\t\tif ($success === false) {\n\t\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\t\t\t$response = new stdClass();\n\t\t\t$response->success = false;\n\t\t\t$response->errors = $model->getErrors();\n\t\t\techo json_encode($response);\n\t\t\treturn;\n\t\t}\n\n\t\t// Purge the cache\n\t\t$this->purgeCache();\n\n\t\t// Bring the good news\n\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\t\t$response = new stdClass();\n\t\t$response->success = true;\n\t\t$response->messages = array();\n\t\t$response->wasInsert = $isInsert;\n\t\t$response->messages[] = KText::_('Record saved.');\n\n\t\t// Add the current record data to the response\n\t\tif (!empty($data->id)) {\n\t\t\t$model->forgetRecord($data->id);\n\t\t\t$response->data = $model->getRecord($data->id);\n\t\t}\n\t\telse {\n\t\t\t$response->data = NULL;\n\t\t}\n\n\t\tif (KRequest::getKeyword('task') == 'apply') {\n\t\t\t// On inserts, we redirect to the right edit URL (have the right ID set)\n\t\t\tif ($isInsert) {\n\t\t\t\t// Get the controller name\n\t\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t\t// Get the redirect URL\n\t\t\t\t$url = 'index.php?option='.$this->component.'&controller='.$controllerName.'&task=edit&id='.$data->id;\n\t\t\t\t// If the return param is sent along, append it\n\t\t\t\tif (KRequest::getString('return')) {\n\t\t\t\t\t$url .= '&return='.KRequest::getString('return');\n\t\t\t\t}\n\t\t\t\t// Get it all together\n\t\t\t\t$response->redirectUrl = KLink::getRoute($url, false);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (KRequest::getString('return')) {\n\t\t\t\t$url = KLink::base64UrlDecode(KRequest::getString('return'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Get the controller name\n\t\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t\t// Get the redirect URL\n\t\t\t\t$url = KLink::getRoute('index.php?option='.$this->component.'&controller='.$controllerName, false);\n\t\t\t}\n\n\t\t\t$response->redirectUrl = $url;\n\t\t}\n\n\t\techo json_encode($response);\n\n\t}", "public function handle(Request $request)\n {\n $this->user = $request->user();\n $this->request = $request;\n\n $this->updateBusinessDetail();\n $this->syncBusinessDetailCharacteristics();\n }", "protected function process() {\n\n $jobId = $this->param();\n\n $jobTitle = $this->app()->request->post(\"title\");\n $jobDescription = $this->app()->request->post(\"description\");\n $jobSkills = $this->app()->request->post(\"skills\");\n\n $jobPositions = $this->app()->request->post(\"positions\");\n $jobLocation = $this->app()->request->post(\"location\");\n $jobType = $this->app()->request->post(\"type\");\n $jobStart = $this->app()->request->post(\"start\");\n\n\n if($jobType == 'temporary') {\n $jobDuration = $this->app()->request->post(\"duration\");\n }\n else {\n $jobDuration = '';\n }\n\n $skills = explode(\",\", $jobSkills);\n\n if(!$this->validPost($jobTitle, $jobDescription, $jobSkills, $jobPositions, $jobLocation, $jobDuration, $jobStart, $jobType)) {\n return;\n }\n\n require_once 'models/Job.php';\n\n\n switch($jobType) {\n case 'temporary':\n require_once 'models/TemporaryJob.php';\n $job = new TemporaryJob($jobId);\n $job->setTitle($jobTitle);\n $job->setDescription($jobDescription);\n $job->setSkills($skills);\n $job->setPositions($jobPositions);\n $job->setLocation($jobLocation);\n $job->setStartTime($jobStart);\n $job->setDuration($jobDuration);\n $job->saveToDb();\n break;\n\n case 'permanent':\n require_once 'models/PermanentJob.php';\n $job = new PermanentJob($jobId);\n $job->setTitle($jobTitle);\n $job->setDescription($jobDescription);\n $job->setSkills($skills);\n $job->setPositions($jobPositions);\n $job->setLocation($jobLocation);\n $job->setStartTime($jobStart);\n $job->saveToDb();\n break;\n }\n }", "public function handleUserEntry()\n {\n $sessionClass = ReporticoSession();\n\n // First look for a parameter beginning \"submit_\". This will identify\n // What the user wanted to do.\n\n $hide_area = false;\n $show_area = false;\n $maintain_sql = false;\n $xmlsavefile = false;\n $xmldeletefile = false;\n if (($k = $this->getMatchingPostItem(\"/^submit_/\"))) {\n // Strip off \"_submit\"\n preg_match(\"/^submit_(.*)/\", $k, $match);\n\n // Now we should be left with a field element and an action\n // Lets strip the two\n $match1 = preg_split('/_/', $match[0]);\n $fld = $match1[1];\n $action = $match1[2];\n\n switch ($action) {\n case \"ADD\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->addMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"DELETE\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->deleteMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"MOVEUP\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->moveupMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"MOVEDOWN\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->movedownMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"SET\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->updateMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"REPORTLINK\":\n case \"REPORTLINKITEM\":\n // Link in an item from another report\n $this->linkInReportFields(\"link\", $fld, $action);\n $show_area = $fld;\n break;\n\n case \"REPORTIMPORT\":\n case \"REPORTIMPORTITEM\":\n // Link in an item from another report\n $this->linkInReportFields(\"import\", $fld, $action);\n $show_area = $fld;\n break;\n\n case \"SAVE\":\n $xmlsavefile = $this->query->xmloutfile;\n if (!$xmlsavefile) {\n trigger_error(ReporticoLang::templateXlate(\"UNABLE_TO_SAVE\") . ReporticoLang::templateXlate(\"SPECIFYXML\"), E_USER_ERROR);\n }\n\n break;\n\n case \"PREPARESAVE\":\n $xmlsavefile = $this->query->xmloutfile;\n $sessionClass::setReporticoSessionParam(\"execute_mode\", \"PREPARE\");\n\n if (!$xmlsavefile) {\n header(\"HTTP/1.0 404 Not Found\", true);\n echo '<div class=\"reportico-error-box\">' . ReporticoLang::templateXlate(\"UNABLE_TO_SAVE\") . ReporticoLang::templateXlate(\"SPECIFYXML\") . \"</div>\";\n die;\n }\n\n break;\n\n case \"DELETEREPORT\":\n $xmldeletefile = $this->query->xmloutfile;\n break;\n\n case \"HIDE\":\n $hide_area = $fld;\n break;\n\n case \"SHOW\":\n $show_area = $fld;\n break;\n\n case \"SQL\":\n $show_area = $fld;\n if ($fld == \"mainquerqury\") {\n // Main Query SQL Generation.\n $sql = stripslashes($_REQUEST[\"mainquerqury_SQL\"]);\n\n $maintain_sql = $sql;\n if (Authenticator::login()) {\n $p = new SqlParser($sql);\n if ($p->parse()) {\n $p->importIntoQuery($qr);\n if ($this->query->datasource->connect()) {\n $p->testQuery($this->query, $sql);\n }\n\n }\n }\n } else {\n // It's a lookup\n if (preg_match(\"/mainquercrit(.*)qury/\", $fld, $match1)) {\n $lookup = (int) $match1[1];\n $lookup_char = $match1[1];\n\n // Access the relevant crtieria item ..\n $qc = false;\n $ak = array_keys($this->query->lookup_queries);\n if (array_key_exists($lookup, $ak)) {\n $q = $this->query->lookup_queries[$ak[$lookup]]->lookup_query;\n } else {\n $q = new Reportico();\n }\n\n // Parse the entered SQL\n $sqlparm = $fld . \"_SQL\";\n $sql = $_REQUEST[$sqlparm];\n $q->maintain_sql = $sql;\n $q = new Reportico();\n $p = new SqlParser($sql);\n if ($p->parse()) {\n if ($p->testQuery($this->query, $sql)) {\n $p->importIntoQuery($q);\n $this->query->setCriteriaLookup($ak[$lookup], $q, \"WHAT\", \"NOW\");\n }\n }\n }\n }\n\n break;\n\n }\n }\n\n // Now work out what the maintainance screen should be showing by analysing\n // whether user pressed a SHOW button a HIDE button or keeps a maintenance item\n // show by presence of a shown value\n if (!$show_area) {\n // User has not pressed SHOW_ button - this would have been picked up in previous submit\n // So look for longest shown item - this will allow us to draw the maintenace screen with\n // the correct item maximised\n foreach ($_REQUEST as $k => $req) {\n if (preg_match(\"/^shown_(.*)/\", $k, $match)) {\n $containee = \"/^\" . $hide_area . \"/\";\n $container = $match[1];\n if (!preg_match($containee, $container)) {\n if (strlen($match[1]) > strlen($show_area)) {\n $show_area = $match[1];\n }\n }\n }\n }\n\n }\n\n if (!$show_area) {\n $show_area = \"mainquer\";\n }\n\n $xmlout = new XmlWriter($this->query);\n $xmlout->prepareXmlData();\n\n // If Save option has been used then write data to the named file and\n // use this file as the defalt input for future queries\n if ($xmlsavefile) {\n if ($this->query->allow_maintain != \"SAFE\" && $this->query->allow_maintain != \"DEMO\" && ReporticoApp::getConfig('allow_maintain')) {\n $xmlout->writeFile($xmlsavefile);\n $sessionClass::setReporticoSessionParam(\"xmlin\", $xmlsavefile);\n $sessionClass::unsetReporticoSessionParam(\"xmlintext\");\n } else {\n trigger_error(ReporticoLang::templateXlate(\"SAFENOSAVE\"), E_USER_ERROR);\n }\n\n }\n\n // If Delete Report option has been used then remove the file\n // use this file as the defalt input for future queries\n if ($xmldeletefile) {\n if ($this->query->allow_maintain != \"SAFE\" && $this->query->allow_maintain != \"DEMO\" && ReporticoApp::getConfig('allow_maintain')) {\n $xmlout->removeFile($xmldeletefile);\n $sessionClass::setReporticoSessionParam(\"xmlin\", false);\n $sessionClass::unsetReporticoSessionParam(\"xmlintext\");\n } else {\n trigger_error(ReporticoLang::templateXlate(\"SAFENODEL\"), E_USER_ERROR);\n }\n\n }\n\n $xml = $xmlout->getXmldata();\n $this->query->xmlintext = $xml;\n\n $this->query->xmlin = new XmlReader($this->query, false, $xml);\n $this->query->xmlin->show_area = $show_area;\n $this->query->maintain_sql = false;\n }", "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 }", "protected function processInput()\n {\n if (empty($this->input)) {\n $this->input = request()->except('_token');\n\n if ($this->injectUserId) {\n $this->input['user_id'] = Auth::user()->id;\n }\n }\n $this->sanitize();\n request()->replace($this->input); // @todo IS THIS NECESSARY?\n }", "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}", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "function process_request()\n {\n // Note: some modules prefer 's' to indicate the instance number... may need to implement that as well.\n // Fetch the course module instance\n $id = required_param('id', PARAM_INT);\n if (!$this->cm = get_coursemodule_from_id('sloodle', $id)) error('Course module ID was incorrect.');\n // Fetch the course data\n if (!$this->course = sloodle_get_record('course', 'id', $this->cm->course)) error('Failed to retrieve course.');\n $this->sloodle_course = new SloodleCourse();\n if (!$this->sloodle_course->load($this->course)) error(get_string('failedcourseload', 'sloodle'));\n\n // Fetch the SLOODLE instance itself\n if (!$this->sloodle = sloodle_get_record('sloodle', 'id', $this->cm->instance)) error('Failed to find SLOODLE module instance');\n }", "public function handleRequest(){\n\t\t$SitemapCollection = SitemapActions::selectList();\n\t\t\n\t\t// Put them in a data field so they can be used on the view\n\t\t$this->getDataObject()->set('SitemapCollection',$SitemapCollection);\n\t}", "function processRequest(){\n\tglobal $muse; // App settings & database\n\tglobal $HTTP_RAW_POST_DATA;\n\t\n\t// Get the user's posted action\n\t$muse['actionRequestRaw'] = $HTTP_RAW_POST_DATA;\n\t$muse['actionRequest'] = $muse['db']->real_escape_string(trim($HTTP_RAW_POST_DATA));\n\t// First word of action request will be the action keyword.\n\t$muse['actionKeyword'] = strtolower(substr( $muse['actionRequest'], 0, strpos( $muse['actionRequest'], \" \" ) ) );\n\t\n\t// If it's only one word, through it back in. Capatlization issues?\n\tif ($muse['actionKeyword']==false) {\n\t\t$muse['actionKeyword'] = $muse['actionRequest'];\n\t}\n}", "public function prepareRequest()\r\n {\r\n\r\n }", "public static function process_http_request()\n {\n }", "public function runRequest() {\n }", "public function store ( Request $request )\n {\n // NO-OP\n }", "protected function forwardToReferringRequest() {}", "public function store()\n\t{\n\t\t\n\t\t$input = \\Request::all();\n\n\t\t$request = $this->request->store($input);\n\n\t\tif ($request === false) return \\Response::json(['message' => 'Sorry, there was an error on our end'], 404);\n\n\t\treturn \\Response::json(['message' => 'request was created', \"data\" => $request], 200);\n\n\t}", "public function process_request () {\n \n add_action( 'admin_notices', array( $this, 'admin_notices' ) );\n \n $supported_actions = array( 'activate-products', 'deactivate-product' );\n if ( !isset( $_REQUEST['action'] ) || !in_array( $_REQUEST['action'], $supported_actions ) || !check_admin_referer( 'bulk-' . 'licenses' ) ) {\n return null;\n }\n \n $response = false;\n $status = 'false';\n $type = $_REQUEST['action'];\n\n switch ( $type ) {\n case 'activate-products':\n $products = array();\n if ( isset( $_POST[ 'products' ] ) && 0 < count( $_POST[ 'products' ] ) ) {\n foreach ( $_POST[ 'products' ] as $k => $v ) {\n if ( !empty( $v[ 'license_key' ] ) ) {\n $products[$k] = $v;\n }\n }\n }\n if ( 0 < count( $products ) ) {\n //echo \"<pre>\"; print_r( $products ); echo \"</pre>\"; die();\n $response = $this->activate_products( $products );\n } else {\n $response = false;\n $type = 'no-license-keys';\n }\n break;\n\n case 'deactivate-product':\n if ( isset( $_GET['filepath'] ) && ( '' != $_GET['filepath'] ) ) {\n $response = $this->deactivate_product( $_GET['filepath'] );\n }\n break;\n\n default:\n break;\n }\n\n if ( $response == true ) {\n $status = 'true';\n }\n \n $redirect_url = \\UsabilityDynamics\\Utility::current_url( array( 'type' => urlencode( $type ), 'status' => urlencode( $status ) ), array( 'action', 'filepath', '_wpnonce' ) );\n wp_safe_redirect( $redirect_url );\n exit;\n }", "public function handle(Request $request)\n {\n\n // Getter to get the global var which hold our form field value\n $method = $request->getMethod();\n $getterHolder = \"get\" . ucfirst(strtolower($method));\n $holder = $request->$getterHolder();\n\n\n if ($holder->isSet()) {\n $fileFieldKey = [];\n\n $fieldKeysName = array_keys($this->fields);\n\n // Add post \n foreach ($fieldKeysName as $key) {\n\n // Skype the file field\n if (new $this->fields[$key]['class'] instanceof FileField) {\n $fileFieldKey[] = $key;\n continue;\n }\n\n // Create new instance of this field class\n $object = new $this->fields[$key]['class'];\n\n // Cast the value into the right type\n $this->data[$key] = $object::cast($holder->get($key));\n }\n\n // If any file, add it data\n if ($request->hasUploadedFile()) {\n \n $files = $request->getFiles();\n foreach ($fileFieldKey as $key) {\n $this->data[$key] = $files->get($key);\n }\n \n }\n $this->isSubmitted = true;\n }\n \n }", "public function handle()\n {\n $vkRequestsParams = RequestController::vkRequestsParams();\n $started_at = Carbon::now();\n $methods = [\n 'qwerty',\n ];\n $items = VkQueue::whereIn('method', $methods)->take($vkRequestsParams->records)->get();\n\n $this->log(0, 'RequestVk started at ' . Carbon::now()->format('Y-m-d, H:i:s'));\n $this->log(0, 'Available records: ' . $items->count());\n $this->log(0, 'Acceptable Records Count per Minute: ' . $vkRequestsParams->records);\n\n foreach ($items as $item) {\n if ($this->isBreakTimeRequest($started_at)) {\n $this->log($item->id, 'isBreakTimeRequest');\n continue;\n }\n\n if (Carbon::parse($item->user->expired_at) <= Carbon::now()) {\n $this->log($item->id, 'storeError :: Token expired');\n $this->storeError($item->user_id, $item->method, $item->access_token, trans('api.31'));\n $item->delete();\n continue;\n }\n\n $url = config('vk.request_url', 'http://localhost');\n\n $response = RequestController::send('POST', str_finish($url, '/') . $item->method, json_decode($item->context));\n\n if (!empty($response->error_description)) {\n $this->log($item->id, 'storeError :: ' . $response->error_description);\n $this->storeError($item->user_id, $item->method, $item->access_token, $response->error_description);\n } else {\n $this->log($item->id, 'storeSuccess :: ' . gettype($response));\n $this->storeSuccess($item->user_id, $item->method, $item->access_token, $response);\n }\n\n $item->delete();\n }\n\n $this->log(0, 'Requesting time: ' . Carbon::now()->diff($started_at)->s . 's');\n $this->log(0, 'RequestVk exiting at ' . Carbon::now()->format('Y-m-d, H:i:s'));\n }", "function handleSignUpRequest() {\n if (connectToDB()) {\n if (array_key_exists('signUp', $_POST)) {\n signUpRequest();\n }\n disconnectFromDB();\n }\n}", "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 }", "protected function processPutRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'put'\n ]));\n }", "public function handle(Request $request);", "protected function processing()\n {\n $this->response = $this->response->withStatus(203);\n $this->jsonBody($this->payload->getOutput());\n }", "public function execute($request)\n {\n parent::execute($request);\n }", "public function willProcessRequest(array $data) {\n }", "public static function handleInput()\n {\n switch ($_REQUEST[\"cmd\"]) {\n //cancella il profilo del cliente \n case 'cancella':\n self::cancella();\n break;\n //modifica il profilo del cliente \n case 'back_home_page':\n case 'showrecensioni':\n self::showHomePage();\n break;\n //modifica il profilo personale\n case 'modifica_profilo_personale':\n self::modificaProfiloPersonale();\n break;\n //modifca il profilo dell'azienda\n case 'modifica_profilo_azienda':\n self::modificaProfiloAzienda();\n break;\n //modifica i servizi offerti\n case 'modifica_servizi':\n self::modificaServizi();\n break;\n //aggiorna profilo personale\n case 'update_profilo_personale':\n self::updateProfiloPersonale();\n break;\n //aggiorna profilo azienda\n case 'update_profilo_azienda':\n self::updateProfiloAzienda();\n break;\n //aggiorna servizi\n case 'update_servizi':\n self::updateServizi();\n break;\n }\n }", "public function handle(): void\n {\n try {\n $response = $this->client->get($this->getCallUrl());\n\n $result = json_decode($response->getBody()->getContents());\n\n $this->checkSuccess($result);\n\n $article = $this->clientArticleService->saveArticleFromObject($result->data);\n\n $this->info('Article with ID '. $article->id. ' saved');\n }catch(\\Throwable $exception){\n $this->error($exception->getMessage());\n }\n }", "function parse_incoming()\n {\n\t\t//-----------------------------------------\n\t\t// Attempt to switch off magic quotes\n\t\t//-----------------------------------------\n\n\t\t@set_magic_quotes_runtime(0);\n\n\t\t$this->get_magic_quotes = @get_magic_quotes_gpc();\n\t\t\n \t//-----------------------------------------\n \t// Clean globals, first.\n \t//-----------------------------------------\n \t\n\t\t$this->clean_globals( $_GET );\n\t\t$this->clean_globals( $_POST );\n\t\t$this->clean_globals( $_COOKIE );\n\t\t$this->clean_globals( $_REQUEST );\n \t\n\t\t# GET first\n\t\t$input = $this->parse_incoming_recursively( $_GET, array() );\n\t\t\n\t\t# Then overwrite with POST\n\t\t$input = $this->parse_incoming_recursively( $_POST, $input );\n\t\t\n\t\t$this->input = $input;\n\t\t\n\t\t$this->define_indexes();\n\n\t\tunset( $input );\n\t\t\n\t\t# Assign request method\n\t\t$this->input['request_method'] = strtolower($this->my_getenv('REQUEST_METHOD'));\n\t}", "public function process()\n {\n if ($this->request->isCancelled() === true) {\n $this->setSessionData();\n $this->response->send();\n return;\n }\n \n $this->interceptorInitializer->setDescriptor($this->processorResolver->getInterceptorDescriptor($this->request))\n ->init();\n foreach ($this->interceptorInitializer->getPreInterceptors() as $preInterceptor) {\n $preInterceptor->preProcess($this->request, $this->session, $this->response);\n if ($this->request->isCancelled() === true) {\n $this->setSessionData();\n $this->response->send();\n return;\n }\n }\n \n $processor = null;\n try {\n $processor = $this->processorResolver->resolve($this->request, $this->session, $this->response);\n $processor->startup(new stubDummyUriRequest($this->request->readHeader('REQUEST_URI')->unsecure()));\n if ($processor->forceSsl() === true && $processor->isSsl() === false) {\n $this->response->addHeader('Location', 'https://' . $this->request->getURI());\n $this->request->cancel();\n $this->response->send();\n return;\n }\n \n $processor->process();\n } catch (stubProcessorException $pe) {\n $this->response->setStatusCode($pe->getStatusCode());\n }\n \n if (null !== $processor) {\n $processor->cleanup();\n }\n \n if ($this->request->isCancelled() === false) {\n foreach ($this->interceptorInitializer->getPostInterceptors() as $postInterceptor) {\n $postInterceptor->postProcess($this->request, $this->session, $this->response);\n if ($this->request->isCancelled() === true) {\n break;\n }\n }\n }\n \n $this->setSessionData();\n $this->response->send();\n }", "public function handle($request);", "final public function handle(\\HttpRequest $request)\n {\n $processed = $this->successor->processing($request);\n\n if ($processed === null) {\n if ($this->successor !== null) {\n $processed = $this->successor->handle($request);\n }\n }\n\n return $processed;\n }", "public function execute(request $request) {\n\t\t$this->_do_execute($request);\n\t}", "public function prepareRequest()\n {\n }", "protected function handleResultRequest() {\n\t\t// no longer letting people in without these things. If this is\n\t\t// preventing you from doing something, you almost certainly want to be\n\t\t// somewhere else.\n\t\t$deadSession = false;\n\t\tif ( !$this->adapter->session_hasDonorData() ) {\n\t\t\t$deadSession = true;\n\t\t}\n\t\t$oid = $this->adapter->getData_Unstaged_Escaped( 'order_id' );\n\n\t\t$request = $this->getRequest();\n\t\t$referrer = $request->getHeader( 'referer' );\n\t\t$liberated = false;\n\t\tif ( $this->adapter->session_getData( 'order_status', $oid ) === 'liberated' ) {\n\t\t\t$liberated = true;\n\t\t}\n\n\t\t// XXX need to know whether we were in an iframe or not.\n\t\tglobal $wgServer;\n\t\tif ( $this->isReturnFramed() && ( strpos( $referrer, $wgServer ) === false ) && !$liberated ) {\n\t\t\t$sessionOrderStatus = $request->getSessionData( 'order_status' );\n\t\t\t$sessionOrderStatus[$oid] = 'liberated';\n\t\t\t$request->setSessionData( 'order_status', $sessionOrderStatus );\n\t\t\t$this->logger->info( \"Resultswitcher: Popping out of iframe for Order ID \" . $oid );\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setHeaders();\n\t\t$userAgent = $request->getHeader( 'User-Agent' );\n\t\tif ( !$userAgent ) {\n\t\t\t$userAgent = 'Unknown';\n\t\t}\n\n\t\tif ( $this->isRepeatReturnProcess() ) {\n\t\t\t$this->logger->warning(\n\t\t\t\t'Donor is trying to process an already-processed payment. ' .\n\t\t\t\t\"Adapter Order ID: $oid.\\n\" .\n\t\t\t\t\"Cookies: \" . print_r( $_COOKIE, true ) . \"\\n\" .\n\t\t\t\t\"User-Agent: \" . $userAgent\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'repeat return processing' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $deadSession ) {\n\t\t\tif ( $this->adapter->isReturnProcessingRequired() ) {\n\t\t\t\twfHttpError( 403, 'Forbidden', wfMessage( 'donate_interface-error-http-403' )->text() );\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t'Resultswitcher: Request forbidden. No active donation in the session. ' .\n\t\t\t\t\t\"Adapter Order ID: $oid.\\n\" .\n\t\t\t\t\t\"Cookies: \" . print_r( $_COOKIE, true ) . \"\\n\" .\n\t\t\t\t\t\"User-Agent: \" . $userAgent\n\t\t\t\t);\n\t\t\t}\n\t\t\t// If it's possible for a donation to go through without our\n\t\t\t// having to do additional processing in the result switcher,\n\t\t\t// we don't want to falsely claim it failed just because we\n\t\t\t// lost the session data. We also don't want to give any\n\t\t\t// information to scammers hitting this page with no session,\n\t\t\t// so we always show the thank you page. We don't want to do\n\t\t\t// any post-processing if we're not sure whether we actually\n\t\t\t// originated this attempt, so we return right after.\n\t\t\t$this->logger->warning(\n\t\t\t\t'Resultswitcher: session is dead, but the ' .\n\t\t\t\t'donor may have made a successful payment.'\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'dead session' );\n\t\t\treturn;\n\t\t}\n\t\t$this->logger->info( \"Resultswitcher: OK to process Order ID: \" . $oid );\n\n\t\tif ( $this->adapter->checkTokens() ) {\n\t\t\t// feed processDonorReturn all the GET and POST vars\n\t\t\t$requestValues = $this->getRequest()->getValues();\n\t\t\t$result = $this->adapter->processDonorReturn( $requestValues );\n\t\t\t$this->markReturnProcessed();\n\t\t\t$this->renderResponse( $result );\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->logger->error( \"Resultswitcher: Token Check Failed. Order ID: $oid\" );\n\t\t}\n\t\t$this->displayFailPage();\n\t}", "public function serveRequest()\n {\n $msg = $this->connection->read();\n if (!$msg) return;\n $this->connection->acknowledge($msg);\n \n $replyMsg = $this->act($msg);\n\n // write correlation id\n $replyMsg->setHeader(\"correlation-id\", $msg->getId());\n\n $this->connection->send($msg->getReplyTo(), $replyMsg);\t\t\n }", "public function process() {\n\n require_once 'libs/Auth.php';\n $username = \"\";\n $userId = -1;\n\n if(Auth::isAuthorized()) {\n $userId = Auth::userId();\n require_once 'models/User.php';\n $user = new User($userId);\n $username = $user->username();\n }\n\n $this->setVar('username', $username);\n $this->setVar('userId', $userId);\n\n require_once 'models/Job.php';\n\n $jobId = $this->param();\n\n $job = new Job($jobId);\n\n $skills = $job->skills();\n\n $skillString = \"\";\n foreach($skills as $skill) {\n $skillString .= $skill . \" \";\n }\n\n $jobArray = Array();\n\n $jobArray['id'] = $job->id();\n\n $this->setVar('jobArray', $jobArray);\n $this->setVar('seekers', $job->interestedSeekers());\n $this->setVar('jobPosterId', $job->postedById());\n }", "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}", "public function process(Request $request)\n {\n $paymentService = new PaymentService();\n $paymentService->synchronize();\n }", "public function process(Request $request)\n {\n $paymentService = new PaymentService();\n $paymentService->synchronize();\n }", "protected function changeRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('CHANGE_REQUEST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//If no data has been submitted\n\t\t\tif($this->getModel()->getInputString(\"template\", null, \"P\")==null)\n\t\t\t{\n\t\t\t\t//Get the page content request\n\t\t\t\t$active = $this->getModel()->getCurrentTemplate();\n\t\t\t\t\n\t\t\t\t//Get all available templates\n\t\t\t\t$all = $this->getModel()->getAllTemplates();\n\t\t\t\t\n\t\t\t\t//Create an editor for data\n\t\t\t\t$this->getView()->createTable($active, $all);\n\t\t\t}\n\t\t\t//Data has been submitted to be processed\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Save data\n\t\t\t\t$this->getModel()->saveTemplateData();\n\t\t\t\t\n\t\t\t\t//Redirect\n\t\t\t\t$this->getView()->setTemplateRedirect();\n\t\t\t}\n\t\t}\n\t}", "private function _processSubmit()\n {\n global $interface;\n global $configArray;\n\n // Without IDs, we can't continue\n if (empty($_REQUEST['ids'])) {\n header(\n \"Location: \" . $this->followupUrl . \"?errorMsg=bulk_noitems_advice\"\n );\n exit();\n }\n\n $url = $configArray['Site']['url'] . \"/Search/Results?lookfor=\" .\n urlencode(implode(\" \", $_POST['ids'])) . \"&type=ids\";\n $result = $this->sendEmail(\n $url, $_POST['to'], $_POST['from'], $_POST['message']\n );\n\n if (!PEAR::isError($result)) {\n $this->followupUrl .= \"?infoMsg=\" . urlencode(\"bulk_email_success\");\n header(\"Location: \" . $this->followupUrl);\n exit();\n } else {\n // Assign Error Message and Available Data\n $this->errorMsg = $result->getMessage();\n $interface->assign('formTo', $_POST['to']);\n $interface->assign('formFrom', $_POST['from']);\n $interface->assign('formMessage', $_POST['message']);\n $interface->assign('formIDS', $_POST['ids']);\n }\n }", "public function receive(){\n $eslId = $this->uri->segment(3); //Get the flower shop ID\n\n $formData = $this->input->post(NULL, TRUE);\n\n $domain = $formData['_domain'];\n $name = $formData['_name'];\n\n if($name === \"bid_available\"){\n //Get data to store\n $data = array(\n 'guildPhoneNumber' => $formData['guildPhoneNumber'],\n 'deliveryRequestId' => $formData['deliveryRequestId'],\n 'driverPhoneNumber' => $formData['driverPhoneNumber'],\n 'driverName' => $formData['driverName'],\n 'estimatedDeliveryTime' => $formData['estimatedDeliveryTime']\n );\n\n //Store bid in DB and exit\n $this->save_bid($data);\n }\n else if($name === \"complete\"){\n $driverPhoneNumber = $formData['driverPhoneNumber'];\n\n $this->load->model('bids_model');\n $this->bids_model->set_delivered($driverPhoneNumber);\n }\n }", "protected abstract function handleData();" ]
[ "0.66231966", "0.6583789", "0.65708536", "0.6460047", "0.64457726", "0.6346557", "0.6308204", "0.6308204", "0.6308204", "0.6267159", "0.6256219", "0.62231654", "0.61323", "0.6128386", "0.60756946", "0.60458106", "0.60281986", "0.60217947", "0.6019527", "0.6010355", "0.60018027", "0.597878", "0.59563553", "0.59317315", "0.5904972", "0.5903194", "0.5848342", "0.5847105", "0.58239204", "0.5821733", "0.5809817", "0.5790853", "0.5775111", "0.5763891", "0.57570326", "0.5735529", "0.5691189", "0.5678954", "0.56751686", "0.5669055", "0.56670105", "0.56528485", "0.56230605", "0.561038", "0.56091505", "0.56070477", "0.5603537", "0.5600819", "0.55915046", "0.55827695", "0.55585855", "0.5555619", "0.552408", "0.5521532", "0.5510898", "0.5510887", "0.5504593", "0.5494626", "0.5487951", "0.5487443", "0.54825777", "0.54722685", "0.54712206", "0.5467177", "0.54626787", "0.5453219", "0.54503506", "0.5449509", "0.54458445", "0.5437179", "0.5432768", "0.5427127", "0.5426914", "0.54262465", "0.54230005", "0.5415929", "0.5409547", "0.540517", "0.5401239", "0.5381677", "0.53784686", "0.53712165", "0.53664076", "0.53626525", "0.53605115", "0.5356528", "0.53521216", "0.53378177", "0.5331147", "0.5329984", "0.53261495", "0.5323281", "0.53227264", "0.53185654", "0.53033304", "0.53033304", "0.5299672", "0.52983207", "0.52981263", "0.52901477" ]
0.5825159
28
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() { $f = new SheetController; $f->GetAllFunc(); $this->info('Get All Data Successfully'); }
{ "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\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\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 // 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 $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\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\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 $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 $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 $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 $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\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 // 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 \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 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 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 $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 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 $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 {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\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()\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(Command $command);", "public function handle(Command $command);", "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 $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 //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\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 // 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 $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 if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\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 $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\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.6469971", "0.64641356", "0.6427384", "0.6349752", "0.63188183", "0.62750113", "0.6261585", "0.6261214", "0.6235854", "0.6225116", "0.6222161", "0.6214144", "0.6193531", "0.6191337", "0.6183868", "0.61772275", "0.61766857", "0.6172786", "0.6149171", "0.6148903", "0.61484134", "0.61469173", "0.6138112", "0.61347705", "0.61316174", "0.61158997", "0.6113888", "0.6110495", "0.6108539", "0.61056405", "0.6102598", "0.61022663", "0.61016774", "0.6096468", "0.6094955", "0.60922974", "0.6088507", "0.6083433", "0.6082336", "0.6077499", "0.60767883", "0.6075641", "0.6073871", "0.6072606", "0.60701466", "0.60694647", "0.60693175", "0.6067332", "0.6061484", "0.6059711", "0.6059688", "0.60574067", "0.60503477", "0.6042625", "0.6040687", "0.6032303", "0.60306066", "0.602774", "0.60255086", "0.60207987", "0.60190594", "0.6018816", "0.60144967", "0.60144013", "0.6014115", "0.6011956", "0.60092497", "0.6007996", "0.60079277", "0.60061836", "0.60051036", "0.6001119", "0.6001112", "0.6000026", "0.5999729", "0.5991934", "0.59873074", "0.5987054", "0.59868026", "0.59868026", "0.59856236", "0.59836555", "0.5980716", "0.5976703", "0.5976261", "0.5973673", "0.5969664", "0.59683484", "0.5966431", "0.5965345", "0.59645647", "0.59615767", "0.5960291", "0.59555584", "0.59549415", "0.5952351", "0.59519506", "0.594845", "0.5946748", "0.5946337", "0.5944945" ]
0.0
-1
les methodes de constructeur de la class
public function __conctruct($Matricule="",$Nom="",$Prenom="",$Email="",$Tel="",$Naiss=""){ $this->Matricule=$Matricule; $this->Nom=$Nom; $this->Prenom=$Prenom; $this->Email=$Email; $this->Tel=$Tel; $this->Naiss=$Naiss; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() ;", "function _construct(){ }", "function _construct() {\n \t\n\t\t\n\t}", "public function __construct()\n {\n //koji su mu prosledjeni\n $a = func_get_args();\n $i = func_num_args();\n $f = \"__construct\" . $i;\n if (method_exists($this, $f)) {\n call_user_func_array(array($this, $f), $a);\n\n }\n\n }", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}", "public function _construct()\n\t{\n\n\t}", "public function fn_construct_class() {\n\t}", "protected abstract function __construct();", "function __construct(){\n\t\t// nowt much...\n\t}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "private final function __construct() {}", "public function construct() {\n\n }", "public function __construct()\n {\n $this->init_class();\n $this->init_method();\n }", "function __construct(){}", "function __construct(){}", "function __construct(){}", "private function __construct () {}", "function __constructor(){}", "final private function __construct(){\r\r\n\t}", "function __construct (){\n\t\t}", "function __construct() {}", "public function construct()\n\t\t{\n\t\t}", "public function __construct(){\n\t\t//asi poder tener dispoble la vista que le pertenece a esta clase\n\t\tparent::__construct();\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.7992371", "0.797857", "0.7901767", "0.7890786", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.78808475", "0.7834405", "0.7822565", "0.7816972", "0.78022665", "0.7791794", "0.77848434", "0.77848434", "0.77848434", "0.77848434", "0.77848434", "0.77848434", "0.7769102", "0.7752938", "0.77528846", "0.77437663", "0.77437663", "0.77437663", "0.7717258", "0.77156913", "0.771214", "0.77111185", "0.7704326", "0.76971793", "0.76901233", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767", "0.76890767" ]
0.0
-1
les getters et setters
public function getMatricule(){ return $this->$Matricule; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function setRequiredGetters();", "public static function setters();", "public static function getters();", "abstract protected function getDirectGetters();", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($description_obj as $obj) {\n\t\t//print_r($obj);\n\n\t\techo $tabs,\"/// getter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function get_{$obj->Field}()\\t\\t{return \\$this->$obj->Field;}\\n\",\n\t\t\t $tabs,\"/// setter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function set_{$obj->Field}(\\$val)\\t{\\$this->$obj->Field = \",assignEscape($obj),\";}\\n\",\n\t\t\t \"\\n\";\n\t}\n\techo $tabs,\"public function get_last_error()\\t\\t{return \\$this->_last_error;}\\n\";\n\techo \"\\n\\n\";\n}", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function set();", "abstract public function get() ;", "public static function setters() {\n return self::$setters;\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "abstract function get();", "function __get($name)\n { return $this->$name = $this->$name();\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }", "public static function setters()\n {\n return self::$setters;\n }" ]
[ "0.7417559", "0.7414373", "0.69296813", "0.68948793", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.6875738", "0.68352044", "0.66705173", "0.66705173", "0.66705173", "0.66705173", "0.66705173", "0.66705173", "0.66326046", "0.662457", "0.65052056", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.64393055", "0.63867307", "0.63850343", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033", "0.63714033" ]
0.0
-1
Operation metadata for suggesting Trials. Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1;
public function getGenericMetadata() { return $this->generic_metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setGenericMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AIPlatform\\V1\\GenericOperationMetadata::class);\n $this->generic_metadata = $var;\n\n return $this;\n }", "private function getDefaultOperationDescriptor()\n {\n return [\n 'additionalArgumentMethods' => [\n 'getProject',\n ],\n 'getOperationMethod' => 'get',\n 'cancelOperationMethod' => null,\n 'deleteOperationMethod' => 'delete',\n 'operationErrorCodeMethod' => 'getHttpErrorStatusCode',\n 'operationErrorMessageMethod' => 'getHttpErrorMessage',\n 'operationNameMethod' => 'getName',\n 'operationStatusMethod' => 'getStatus',\n 'operationStatusDoneValue' => \\Google\\Cloud\\Compute\\V1\\Operation\\Status::DONE,\n ];\n }", "abstract public function signRequestHeaders(\n\t\t$httpVerb = Microsoft_Http_Client::GET,\n\t\t$path = '/',\n\t\t$query = array(),\n\t\t$headers = null,\n\t\t$forTableStorage = false,\n\t\t$resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN,\n\t\t$requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ,\n\t\t$rawData = null\n\t);", "public function getSyncMetadata() {}", "function getOperationInfo() {\n return userpoints_get_info($this->getOperation());\n }", "public function signRequestHeaders(\n\t\t$httpVerb = Microsoft_Http_Client::GET,\n\t\t$path = '/',\n\t\t$queryString = '',\n\t\t$headers = null,\n\t\t$forTableStorage = false,\n\t\t$resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN,\n\t\t$requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ,\n\t\t$rawData = null\n\t) {\n\t\t// http://github.com/sriramk/winazurestorage/blob/214010a2f8931bac9c96dfeb337d56fe084ca63b/winazurestorage.py\n\n\t\t// Table storage?\n\t\tif ($forTableStorage) {\n\t\t\tthrow new Microsoft_WindowsAzure_Credentials_Exception('The Windows Azure SDK for PHP does not support SharedKey authentication on table storage. Use SharedKeyLite authentication instead.');\n\t\t}\n\t\t\n\t\t// Determine path\n\t\tif ($this->_usePathStyleUri) {\n\t\t\t$path = substr($path, strpos($path, '/'));\n\t\t}\n\n\t\t// Determine query\n\t\t$queryString = $this->_prepareQueryStringForSigning($queryString);\n\t\n\t\t// Canonicalized headers\n\t\t$canonicalizedHeaders = array();\n\t\t\n\t\t// Request date\n\t\t$requestDate = '';\n\t\tif (isset($headers[Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date'])) {\n\t\t $requestDate = $headers[Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date'];\n\t\t} else {\n\t\t $requestDate = gmdate('D, d M Y H:i:s', time()) . ' GMT'; // RFC 1123\n\t\t $canonicalizedHeaders[] = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date:' . $requestDate;\n\t\t}\n\t\t\n\t\t// Build canonicalized headers\n\t\tif (!is_null($headers)) {\n\t\t\tforeach ($headers as $header => $value) {\n\t\t\t\tif (is_bool($value)) {\n\t\t\t\t\t$value = $value === true ? 'True' : 'False';\n\t\t\t\t}\n\n\t\t\t\t$headers[$header] = $value;\n\t\t\t\tif (substr($header, 0, strlen(Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER)) == Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER) {\n\t\t\t\t $canonicalizedHeaders[] = strtolower($header) . ':' . $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsort($canonicalizedHeaders);\n\n\t\t// Build canonicalized resource string\n\t\t$canonicalizedResource = '/' . $this->_accountName;\n\t\tif ($this->_usePathStyleUri) {\n\t\t\t$canonicalizedResource .= '/' . $this->_accountName;\n\t\t}\n\t\t$canonicalizedResource .= $path;\n\t\tif ($queryString !== '') {\n\t\t $queryStringItems = $this->_makeArrayOfQueryString($queryString);\n\t\t foreach ($queryStringItems as $key => $value) {\n\t\t \t$canonicalizedResource .= \"\\n\" . strtolower($key) . ':' . urldecode($value);\n\t\t }\n\t\t}\n\t\t\n\t\t// Content-Length header\n\t\t$contentLength = '';\n\t\tif (strtoupper($httpVerb) != Microsoft_Http_Client::GET\n\t\t\t && strtoupper($httpVerb) != Microsoft_Http_Client::DELETE\n\t\t\t && strtoupper($httpVerb) != Microsoft_Http_Client::HEAD) {\n\t\t\t$contentLength = 0;\n\t\t\t\n\t\t\tif (!is_null($rawData)) {\n\t\t\t\t$contentLength = strlen($rawData);\n\t\t\t}\n\t\t}\n\n\t\t// Create string to sign \n\t\t$stringToSign = array();\n\t\t$stringToSign[] = strtoupper($httpVerb); \t\t\t\t\t\t\t\t\t// VERB\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-Encoding', '');\t\t// Content-Encoding\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-Language', '');\t\t// Content-Language\n \t$stringToSign[] = $contentLength; \t\t\t\t\t\t\t\t\t\t\t// Content-Length\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-MD5', '');\t\t\t\t// Content-MD5\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-Type', '');\t\t\t// Content-Type\n \t$stringToSign[] = \"\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Date\n \t$stringToSign[] = $this->_issetOr($headers, 'If-Modified-Since', '');\t\t// If-Modified-Since\n \t$stringToSign[] = $this->_issetOr($headers, 'If-Match', '');\t\t\t\t// If-Match\n \t$stringToSign[] = $this->_issetOr($headers, 'If-None-Match', '');\t\t\t// If-None-Match\n \t$stringToSign[] = $this->_issetOr($headers, 'If-Unmodified-Since', '');\t\t// If-Unmodified-Since\n \t$stringToSign[] = $this->_issetOr($headers, 'Range', '');\t\t\t\t\t// Range\n \t\n \tif (!$forTableStorage && count($canonicalizedHeaders) > 0) {\n \t\t$stringToSign[] = implode(\"\\n\", $canonicalizedHeaders); // Canonicalized headers\n \t}\n \t\t\n \t$stringToSign[] = $canonicalizedResource;\t\t \t\t\t// Canonicalized resource\n \t$stringToSign = implode(\"\\n\", $stringToSign);\n \t$signString = base64_encode(hash_hmac('sha256', $stringToSign, $this->_accountKey, true));\n\n \t// Sign request\n \t$headers[Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date'] = $requestDate;\n \t$headers['Authorization'] = 'SharedKey ' . $this->_accountName . ':' . $signString;\n \t\n \t// Return headers\n \treturn $headers;\n\t}", "public function getAddMetadata()\n {\n return $this->readOneof(3);\n }", "function getCorrOperationDescription(array $operation) {\n\treturn corrOperationTypes($operation['type']);\n}", "public function getMetadata()\n {\n $this->getFtpMetadata();\n\n parent::getMetadata();\n\n /**\n * Discovery creates an array of Files and Directories based on Path\n */\n if ($this->exists === true) {\n $this->discovery($this->path);\n }\n\n $this->getSize();\n\n return;\n }", "public function getMetadata() {}", "public function getMetadata() {}", "public function getMetadata();", "public function getMetadata();", "public function getMetadata();", "public function metadata()\r\n\t{\r\n return array(\"nit\" => array(),\r\n \"nombre\" => array(),\r\n \"telefono\" => array(),\r\n \"direccion\" => array(),\r\n \"correo\" => array());\r\n }", "function add_metadata_taxonomies() {\n\t/*\n\tEducational use: http://schema.org/educationalUse e.g. http://purl.org/dcx/lrmi-vocabs/edUse/instruction\nEducational audience: http://schema.org/EducationalAudience e.g. http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student\nInteractivity type: http://schema.org/interactivityType e.g. http://purl.org/dcx/lrmi-vocabs/interactivityType/expositive (active, expositive, or mixed)\nProficiency level: http://schema.org/proficiencyLevel (Beginner, Expert)\n\t*/\n\tadd_educational_use();\n\tadd_educational_audience();\n\tadd_interactivity_type();\n\tadd_proficiency_level();\n}", "abstract protected function getTableMetadata(string $name, string $type, bool $refresh);", "public function getOperationInfo()\n {\n $value = $this->get(self::OPERATIONINFO);\n return $value === null ? (string)$value : $value;\n }", "public function syncMetadata() {}", "public function getOperations()\r\n {\r\n return $this->operations;\r\n }", "public function testUpdateMetadata1UsingPUT()\n {\n }", "protected function getAdvancedMultiIndexSuggestResultsRequest($suggest)\n {\n // verify the required parameter 'suggest' is set\n if ($suggest === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $suggest when calling getAdvancedMultiIndexSuggestResults'\n );\n }\n\n $resourcePath = '/indexes/suggest';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($suggest)) {\n $_tempBody = $suggest;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('auth_token');\n if ($apiKey !== null) {\n $queryParams['auth_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-RSearch-App-ID');\n if ($apiKey !== null) {\n $headers['X-RSearch-App-ID'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function listsgenericGenericput($generic_id)\r\n {\r\n $input = Request::all();\r\n $generic = Generic::findOrFail($generic_id);\r\n $generic->update(['name' => $input['name']]);\r\n if($generic->save()){\r\n return response()->json(['msg' => 'Updated generic']);\r\n }else{\r\n return response('Oops, seems like there was a problem updating the generic');\r\n }\r\n }", "protected function getRouteInfo(RestServiceEntity $metadata, array $config)\n {\n $routeName = $metadata->routeName;\n if (\n ! $routeName\n || ! isset($config['router']['routes'][$routeName]['options']['route'])\n ) {\n return;\n }\n $metadata->exchangeArray([\n 'route_match' => $config['router']['routes'][$routeName]['options']['route'],\n ]);\n }", "public function getOperations()\n {\n return $this->operations;\n }", "public function getOperationContext();", "public function getOperation();", "public function getOperationParams()\n {\n return $this->operation_params;\n }", "public function getOperationType()\n {\n return OP_TABLES;\n }", "public function testGetMetadata1UsingGET()\n {\n }", "public function testGetMetadata3UsingGET()\n {\n }", "public function testUpdateMetadata3UsingPUT()\n {\n }", "abstract public function getErrorMetadata(): array;", "public function getOperationMade() {}", "public function getGenericCalls()\n {\n return $this->genericCalls;\n }", "public function getHumanReviewOperation()\n {\n return $this->human_review_operation;\n }", "function _drush_infinite_base_migrate_taxonomy_seo_data_finished($success, array $results, array $operations) {\n \\Drupal::state()->set('infinite_base.term_seo_migrate', 1);\n drush_log(dt('Operation finished'), \"ok\");\n}", "protected function getDefaultOperations(EntityInterface $entity) {\n $operations = [];\n if ($entity->access('update') && $entity->hasLinkTemplate('edit-form')) {\n $operations['edit'] = [\n 'title' => $this->t('Edit'),\n 'weight' => 10,\n 'url' => $entity->urlInfo('edit-form'),\n ];\n }\n if ($entity->isActivated()) {\n $operations['disable'] = [\n 'title' => $this->t('Disable'),\n 'weight' => 100,\n 'url' => Url::fromRoute('entity.font.deactivate', ['js' => 'nojs', 'font' => $entity->id()], ['query' => \\Drupal::destination()->getAsArray()]),\n ];\n }\n if ($entity->isDeactivated()) {\n $operations['enable'] = [\n 'title' => $this->t('enable'),\n 'weight' => 100,\n 'url' => Url::fromRoute('entity.font.activate', ['js' => 'nojs', 'font' => $entity->id()], ['query' => \\Drupal::destination()->getAsArray()]),\n ];\n }\n\n return $operations;\n }", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'publishDate', 'client', 'workType', 'briefDescription', 'description', 'caseStudyID', 'isPrivate', 'commentsAllowed', 'screenshots', 'prevImageURL', 'finalURL');\n \t}", "protected function initMetadata($data, $metadata) {}", "public function crceTariffGetTariffsWithHttpInfo($correlation_id = null, $transaction_id = null, $user = null, $label = null)\n {\n // parse inputs\n $resourcePath = \"/tariffs\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($label !== null) {\n $queryParams['label'] = $this->apiClient->getSerializer()->toQueryValue($label);\n }\n // header params\n if ($correlation_id !== null) {\n $headerParams['correlationId'] = $this->apiClient->getSerializer()->toHeaderValue($correlation_id);\n }\n // header params\n if ($transaction_id !== null) {\n $headerParams['transactionId'] = $this->apiClient->getSerializer()->toHeaderValue($transaction_id);\n }\n // header params\n if ($user !== null) {\n $headerParams['user'] = $this->apiClient->getSerializer()->toHeaderValue($user);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('accessKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['accessKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\iNew\\Rest6_1\\Model\\GetTariffsResponse',\n '/tariffs'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\iNew\\Rest6_1\\Model\\GetTariffsResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\GetTariffsResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 400:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\RestError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 500:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\RestError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "function getOperation() {\n return $this->operation;\n }", "public function getOperationType()\n {\n return $this->operation_type;\n }", "private function encodeRequestMetadata(array $metadata): string\n {\n // Initialize an empty metadata string.\n $metadata_string = \"\";\n\n // Iterate over the available metadata names.\n foreach (API::METADATA_NAMES as $metadata_type => $metadata_fields) {\n // Store the first letter of the metadata type.\n $metadata_letter = substr($metadata_type, 0, 1);\n\n // Initialize an empty metadata part string.\n $metadata_part = \"\";\n\n //\n if (isset($metadata[$metadata_type])) {\n // Iterate over each field of this metadata type.\n foreach ($metadata_fields as $field_name => $field_code) {\n // If this field was requested..\n if (in_array($field_name, $metadata[$metadata_type])) {\n // .. add it to the metadata part.\n $metadata_part .= $field_code;\n }\n }\n\n // If, after checking for requested metadata of this type, some matches were found..\n if ($metadata_part !== \"\") {\n // Add the letter and numbers matching the requested metadata to the metadata string.\n $metadata_string .= \"{$metadata_letter}{$metadata_part}\";\n }\n }\n }\n\n // Return the filled in metadata string.\n return $metadata_string;\n }", "function wp_migrate_old_typography_shape($metadata)\n {\n }", "public function getOperation(): string\n {\n return $this->operation;\n }", "public function getOperation(): string\n {\n return $this->operation;\n }", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function testUpdateMetadata2UsingPUT()\n {\n }", "public function deleteMetadata($path)\n {\n require_once 'Zend/Cloud/OperationNotAvailableException.php';\n throw new Zend_Cloud_OperationNotAvailableException('Deleting metadata not implemented');\n }", "public function getAdditionalInformation()\n {\n $compName = '';\n\n if ($compUid = $this->getCompetition()) {\n $competition = tx_rnbase::makeInstance('tx_cfcleague_models_Competition', $compUid);\n $compName = $competition->isValid() ? $competition->getName() : '[invalid!]';\n }\n\n return sprintf('Aktualisierung der Spieler für Wettbewerb >%s<', $compName);\n // return sprintf( $GLOBALS['LANG']->sL('LLL:EXT:mksearch/locallang_db.xml:scheduler_indexTask_taskinfo'),\n // $this->getTargetPath(), $this->getItemsInQueue());\n }", "public function getMetadata(): array;", "protected function _getAllCustomMetadataKeys() {}", "function getOperation() {\n\t\treturn $this->get('_operation', $this->get('operation'));\n\t}", "public function setMetadata($var)\n {\n GPBUtil::checkString($var, True);\n $this->Metadata = $var;\n\n return $this;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "private function givenServiceWithOperations()\n {\n // Response GetBook types\n $responseBookName = new ComplexType($this->config, 'Method_Get_Book_Response_BOOK_BOOK_NAME');\n $responseBookName->addMember('string', 'bookName', false);\n $responseBook = new ComplexType($this->config, 'Method_Get_Book_Response_BOOK');\n $responseBook->addMember('int', 'bookId', false);\n // Base type example\n $responseBook->setBaseType($responseBookName);\n $returnGetBookType = new ComplexType($this->config, 'Get_Book_Type_Response');\n $returnGetBookType->addMember('Method_Get_Book_Response_BOOK', 'book_response', false);\n // Request GetBook types\n $bookType = new Enum($this->config, 'Book_Type_Enumeration', 'string');\n $bookType->addValue('fiction');\n $bookType->addValue('comedy');\n $requestBook = new ComplexType($this->config, 'Method_Get_Book_Request_BOOK');\n $requestBook->addMember('int', 'bookId', false);\n $requestBook->addMember('Book_Type_Enumeration', 'genre', false);\n $requestGetBook = new ComplexType($this->config, 'Get_Book_Type_Request');\n $requestGetBook->addMember('Method_Get_Book_Request_BOOK', 'book_request', false);\n // Operation GetBook\n $getBookOperation = new Operation('GetBook', 'Get_Book_Type_Request $request', 'Get Book', 'Get_Book_Type_Response');\n // Response GetAuthors type\n $responseAuthor = new ComplexType($this->config, 'Get_Authors_Response_Author');\n $responseAuthor->addMember('int', 'authorId', false);\n $responseAuthor->addMember('string', 'authorName', false);\n $returnGetAuthors = new ComplexType($this->config, 'Method_Get_Authors_Response');\n $returnGetAuthors->addMember('Get_Authors_Response_Author[]', 'Get_Authors_Response_Author', false);\n // Request GetAuthors type\n $requestGetAuthor = new ComplexType($this->config, 'Method_Get_Authors_Request');\n $requestGetAuthor->addMember('Method_Get_Book_Request_BOOK', 'book_request', false);\n // Operation GetAuthors\n $getAuthorsOperator = new Operation('GetAuthor', 'Method_Get_Authors_Request $request', 'Get Authors', 'Method_Get_Authors_Response');\n // Request SetVersion\n $requestSetVersion = new ComplexType($this->config, 'Method_Set_Version_Request');\n // Operation SetVersion\n $setVersionOperator = new Operation('SetVersion', 'Method_Set_Version_Request $request', 'Set version', null);\n // Service creation\n $types = [\n $responseBookName,\n $responseBook,\n $returnGetBookType,\n $requestBook,\n $requestGetBook,\n $responseAuthor,\n $returnGetAuthors,\n $requestGetAuthor,\n $bookType,\n $requestSetVersion,\n ];\n $service = new Service($this->config, 'Book_Shell', $types, 'Book shells');\n $service->addOperation($getBookOperation);\n $service->addOperation($getAuthorsOperator);\n $service->addOperation($setVersionOperator);\n\n return $service;\n }", "public function listsgenericpost()\r\n {\r\n $input = Request::all();\r\n $new_generic = Generic::create($input);\r\n if($new_generic){\r\n return response()->json(['msg' => 'Created new generic']);\r\n }else{\r\n return response('Oops, seemes like something went wrong while trying to create a new generic');\r\n }\r\n }", "public function get_metadata() {\n\t\treturn array_merge(parent::get_metadata(), array(\n\t\t\t'friendly_name' => 'List View'\n\t\t));\n\t}", "function fetchMeta($metadata)\n {\n $languages = $this->getLanguages();\n $attribname = $this->fieldName().(!$this->isMlNode()?'_'.$languages[0]:'');\n $this->m_size = min($metadata[$attribname]['len'], $this->maxInputSize());\n $this->m_searchsize = min($metadata[$attribname]['len'], 20);\n $this->m_maxsize = $metadata[$attribname]['len'];\n }", "public function get_keywords() {\n\t\treturn [ 'Feature image', 'photo', 'visual' ];\n\t}", "public function genericSearchFields()\n {\n return ['url', 'content', 'title', 'arguments_json', 'language_info'];\n }", "public function getMetadata($path)\n {\n }", "public function getHttpMetas()\n {\n return $this->httpMetas;\n }", "public function testGetMetadata2UsingGET()\n {\n }", "public function getAllTableMetadata()\n {\n return $this->metadata;\n }", "function autoMetadata(){\n\t\t \n\t\t $this->getMakeMetadata();\n\t\t $this->getProjects();\n\t\t $this->getPersons();\n\t\t $this->getProjectCreators();\n\t\t $this->saveMetadata(); //save the results\n\t }", "function getMakeMetadata(){\n\t\t if(!$this->getSavedMetadata()){\n\t\t\t\t$this->tableID = false;\n\t\t\t\t$this->tableName = \"[Not titled]\";\n\t\t\t\t$this->tableDesciption = \"[Not described]\";\n\t\t\t\t$this->tableTags = false;\n\t\t\t\t$this->tableDOI = false;\n\t\t\t\t$this->tableARK = false;\n\t\t\t\t$this->published = false;\n\t\t\t\t$this->pubCreated = false;\n\t\t\t\t$this->pubUpdate = false;\n\t\t\t\t$this->license = $this->DBgetLicense();\n\t\t\t\t$this->getProjects();\n\t\t\t\t$this->getPersons();\n\t\t\t\t$this->getProjectCreators();\n\t\t\t\t$this->getGenerateTableID(); //create a table ID based in the metadata for the table\n\t\t\t\t$this->saveMetadata(); //save the results\n\t\t }\n\t\t else{\n\t\t\t\t$this->metadataParse(); //get saved metadata ready to use\n\t\t }\n\t\t $this->getTableSize(); //get the number of records in a table\n\t\t $this->getTableFields(); //get the fields in a table.\n\t\t $this->getSampleRecords(); //get the fields in a table.\n\t }", "public function getAttributeName()\n {\n return 'TaskSuggestion';\n }", "public function update_transaction_info( \\PostFinanceCheckout\\Sdk\\Model\\Transaction $transaction, WC_Order $order ) {\n\t\t$info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_by_transaction( $transaction->getLinkedSpaceId(), $transaction->getId() );\n\t\t$info->set_transaction_id( $transaction->getId() );\n\t\t$info->set_authorization_amount( $transaction->getAuthorizationAmount() );\n\t\tif ( $transaction->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::FAILED ) {\n\t\t\t$info->set_order_id( null );\n\t\t} else {\n\t\t\t$info->set_order_id( $order->get_id() );\n\t\t}\n\t\t$info->set_order_mapping_id( $order->get_id() );\n\t\t$info->set_state( $transaction->getState() );\n\t\t$info->set_space_id( $transaction->getLinkedSpaceId() );\n\t\t$info->set_space_view_id( $transaction->getSpaceViewId() );\n\t\t$info->set_language( $transaction->getLanguage() );\n\t\t$info->set_currency( $transaction->getCurrency() );\n\t\t$info->set_connector_id(\n\t\t\t! is_null( $transaction->getPaymentConnectorConfiguration() ) ? $transaction->getPaymentConnectorConfiguration()->getConnector() : null\n\t\t);\n\t\t$info->set_payment_method_id(\n\t\t\t! is_null( $transaction->getPaymentConnectorConfiguration() ) && $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration() !=\n\t\t\tnull ? $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getPaymentMethod() : null\n\t\t);\n\t\t$info->set_image( $this->get_resource_path( $this->get_payment_method_image( $transaction, $order ) ) );\n\t\t$info->set_image_base( $this->get_resource_base( $this->get_payment_method_image( $transaction, $order ) ) );\n\t\t$info->set_labels( $this->get_transaction_labels( $transaction ) );\n\t\tif ( $transaction->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::FAILED ||\n\t\t\t$transaction->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::DECLINE ) {\n\t\t\t$failed_charge_attempt = $this->get_failed_charge_attempt( $transaction->getLinkedSpaceId(), $transaction->getId() );\n\t\t\tif ( ! is_null( $failed_charge_attempt ) ) {\n\t\t\t\tif ( ! is_null( $failed_charge_attempt->getFailureReason() ) ) {\n\t\t\t\t\t$info->set_failure_reason( $failed_charge_attempt->getFailureReason()->getDescription() );\n\t\t\t\t}\n\t\t\t\t$info->set_user_failure_message( $failed_charge_attempt->getUserFailureMessage() );\n\t\t\t}\n\t\t\tif ( is_null( $info->get_failure_reason() ) ) {\n\t\t\t\tif ( ! is_null( $transaction->getFailureReason() ) ) {\n\t\t\t\t\t$info->set_failure_reason( $transaction->getFailureReason()->getDescription() );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( empty( $info->get_user_failure_message() ) ) {\n\t\t\t\t$info->set_user_failure_message( $transaction->getUserFailureMessage() );\n\t\t\t}\n\t\t}\n\t\t$info = apply_filters( 'wc_postfinancecheckout_update_transaction_info', $info, $transaction, $order );\n\t\t$info->save();\n\t\treturn $info;\n\t}", "public function suggest() {\n \n $query = ['query' => ['match_all' => []]];\n if (Request::has('q')) {\n $query = [\n 'query' => [\n 'nested' => [\n 'path' => 'prefLabels',\n 'query' => [\n 'bool' => [\n 'must' => [\n [ 'prefix' => [ 'prefLabels.label' => Request::get('q') ] ],\n [ 'match' => [ 'prefLabels.lang' => 'en' ] ]\n ]\n ]\n ]\n ]\n ]\n ];\n }\n \n $hits = Subject::suggest($query, 'resource');\n return response()\n ->json($hits)\n ->header(\"Vary\", \"Accept\");\n }", "public function describeActiveOperationTaskWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->isHistory)) {\n $query['IsHistory'] = $request->isHistory;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->pageNumber)) {\n $query['PageNumber'] = $request->pageNumber;\n }\n if (!Utils::isUnset($request->pageSize)) {\n $query['PageSize'] = $request->pageSize;\n }\n if (!Utils::isUnset($request->region)) {\n $query['Region'] = $request->region;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->securityToken)) {\n $query['SecurityToken'] = $request->securityToken;\n }\n if (!Utils::isUnset($request->taskType)) {\n $query['TaskType'] = $request->taskType;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DescribeActiveOperationTask',\n 'version' => '2015-01-01',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DescribeActiveOperationTaskResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "public function format(OperationInterface $operation): string\n {\n return $operation instanceof DescribableOperationInterface\n ? (string)$operation\n : sprintf(\n 'Generic operation %s',\n spl_object_hash($operation)\n );\n }", "public function onGenericPreTransition(WorkflowTransitionEvent $event) {\n $this->setMessage($event, 'generic pre-transition');\n }", "public function allMetadata(): BattleNetResponseInterface\n {\n return $this->createRequest('GET', '/hearthstone/metadata');\n }", "public function getProjectStepOneAttributeNames(){\n return array(\n 'project_batch_id',\n 'name',\n 'file_id',\n 'nickname',\n 'client_id',\n 'owner_id',\n 'order_number',\n 'distributor_id',\n 'order_date',\n 'product_id',\n 'due_date',\n 'delivery_facility_id',\n 'version_id',\n 'title_year',\n 'content_type_id',\n 'client_coordinator_id',\n );\n }", "public function testCreateMetadata()\n {\n }", "private function computeHashes(DifferentialChangeset $changeset) {\n\n $effect_key = DifferentialChangeset::METADATA_EFFECT_HASH;\n\n $effect_hash = $this->newEffectHash($changeset);\n if ($effect_hash !== null) {\n $changeset->setChangesetMetadata($effect_key, $effect_hash);\n }\n }", "public function describeAction()\n\t{\n\t\t$resourceProperties = static::resourceEntityPropertiesDescription($this->objectManager);\n\t\tif ($this->normalizeResourceTypes) {\n\t\t\t$schemas[] = &$resourceProperties;\n\t\t\twhile (count($schemas) > 0) {\n\t\t\t\tforeach ($schemas[0] as &$property) {\n\t\t\t\t\t$property['type'] = ResourceTypeHelper::normalize($property['type']);\n\t\t\t\t\tif (isset($property['elementType']) && $property['elementType'] !== null) {\n\t\t\t\t\t\t$property['elementType'] = ResourceTypeHelper::normalize($property['elementType']);\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($property['schema'])) {\n\t\t\t\t\t\tif (is_array($property['schema'])) {\n\t\t\t\t\t\t\t$schemas[] = &$property['schema'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$property['schema'] = ResourceTypeHelper::normalize($property['schema']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarray_shift($schemas);\n\t\t\t}\n\t\t}\n\t\t//$resourceProperties = array_diff($resourceProperties, array('Persistence_Object_Identifier'));\n\t\t$this->view->assign('description', $resourceProperties);\n\t\tif ($this->view instanceof JsonView) {\n\t\t\t$this->view->setVariablesToRender(['description']);\n\t\t}\n\t}", "public function createLinksFromAttributes(Metadata $operation): array;", "public function createEmptyMetadata();", "public function analyzeMetadata(): void\n {\n try {\n $favicon = $this->filter('link[rel=\"icon\"]')->first()->attr('href');\n } catch (\\InvalidArgumentException $e) {\n $favicon = '';\n }\n $this->installation->setFavicon($this->getBaseHref().$favicon);\n\n // fetch title when different\n $title = $this->filter('title')->text();\n $this->installation->setTitle($title);\n\n // fetch theme color\n try {\n $themeColor = trim($this->filter('meta[name=\"theme-color\"]')->attr('content')) ?? '';\n\n // white is not visible on white background, fallback is defined in frontend\n if ($themeColor === '#ffffff') {\n $themeColor = '';\n }\n } catch (\\InvalidArgumentException $e) {\n $themeColor = '';\n }\n $this->installation->setThemeColor($themeColor);\n }", "public function getMetadataOptions()\n {\n return $this->metadata_options;\n }", "static public function createMetadata(array $inputs)\n\t{\n\t\t$classes = [];\n\t\tforeach($inputs as $input)\n\t\t{\n\t\t\t$classes[static::factoryType($input['identifier'], $input['type'])] = $input['class'];\n\t\t}\n\t\t\n\t\treturn new Metadata(\n\t\t\t'relating', \n\t\t\t$classes,\n\t\t\tarray(\n\t\t\t\t'cache_prefix' => 'relating',\n\t\t\t\t'cache_tag' => 'relating-tag'\n\t\t\t)\n\t\t);\t\n\t}", "abstract protected function requiredOperations1(): void;", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function getOperation() {\n\t\treturn $this->operation;\n\t}", "public function testListMetadata()\n {\n }", "public function getOperationType()\n {\n if (array_key_exists(\"operationType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"operationType\"], \"\\Beta\\Microsoft\\Graph\\Model\\TeamsAsyncOperationType\") || is_null($this->_propDict[\"operationType\"])) {\n return $this->_propDict[\"operationType\"];\n } else {\n $this->_propDict[\"operationType\"] = new TeamsAsyncOperationType($this->_propDict[\"operationType\"]);\n return $this->_propDict[\"operationType\"];\n }\n }\n return null;\n }", "public function getRouteHints()\n {\n return $this->route_hints;\n }", "public function specificMetadata(string $type): BattleNetResponseInterface\n {\n return $this->createRequest('GET', '/hearthstone/metadata/' . $type);\n }", "public function create($newmeta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (is_string ( $newmeta ) && isset ( $_POST ['properties'] ) && is_object ( json_decode ( $_POST ['properties'] ) )) {\n\t\t\t\tif ($this->isCreateable ()) {\n\t\t\t\t\t// @TODO\n\t\t\t\t\t// Need to convert because there is an old structure\n\t\t\t\t\t$aMetavalues = array ();\n\t\t\t\t\tforeach ( json_decode ( $_POST ['properties'] ) as $sName => $sValue ) {\n\t\t\t\t\t\tarray_push ( $aMetavalues, array ('name' => $sName, 'value' => $sValue ) );\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $aMetavalues ) <= 150) {\n\t\t\t\t\t\t$iPrimaryMeta = ( int ) $this->oMetas->insertMeta ( array ('name' => $newmeta, 'accounts_idaccount' => $this->usr, 'namespaces_idnamespace' => $this->req ['request'] ['ns'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (( int ) $iPrimaryMeta > 0 && count ( $aMetavalues ) > 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($this->setUsage ( $this->usr, array ('maxmetas' => 1 ) )) {\n\t\t\t\t\t\t\t\tif ($this->oMetavalue->insertValue ( $aMetavalues, $iPrimaryMeta )) {\n\t\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('message' => 'Metaitem was created', 'meta' => $iPrimaryMeta ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_BUDGET_LIMIT_REACHED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_EXISTS' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'TO_MUCH_PROPERTYS' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "protected function c_parseOperationAttributes() {\n\n //if ($this->clientoutput->status != \"successfull-ok\")\n // return false;\n \n $op = -1;\n for ($i = 0 ; $i < count($this->clientoutput->response) ; $i++) {\n\t\t\n if ($this->clientoutput->response[$i]['attributes'] == \"operation-attributes\")\n $op ++;\n\t\t\t\t\n $k = -1; \n for ($j = 0 ; $j < (count($this->clientoutput->response[$i]) - 1) ; $j ++)\n if (!empty($this->clientoutput->response[$i][$j]['name'])) {\n $k++;\n $l = 0;\n $this->parsed[$op][$k]['range'] = $this->clientoutput->response[$i]['attributes'];\n $this->parsed[$op][$k]['name'] = $this->clientoutput->response[$i][$j]['name'];\n $this->parsed[$op][$k]['type'] = $this->clientoutput->response[$i][$j]['type'];\n $this->parsed[$op][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n } else {\n $l ++;\n $this->parsed[$op][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n }\n }\n \n //$this->clientoutput->response = array();\n\n $this->client_operation_attributes = new stdClass();\n\t\t\n for ($op_nbr = 0 ; $op_nbr <= $op ; $op_nbr ++) {\n\t\t\n $op_index = \"op_\".$op_nbr;\n $this->client_operation_attributes->$op_index = new stdClass();\n\t\t\t\n for ($i = 0 ; $i < count($this->parsed[$op_nbr]) ; $i ++) {\n $name = $this->parsed[$op_nbr][$i]['name'];\n $php_name = str_replace('-','_',$name);\n $type = $this->parsed[$op_nbr][$i]['type'];\n $range = $this->parsed[$op_nbr][$i]['range'];\n $this->client_operation_attributes->$op_index->$php_name = new stdClass();\n $this->client_operation_attributes->$op_index->$php_name->_type = $type;\n $this->client_operation_attributes->$op_index->$php_name->_range = $range;\n for ($j = 0 ; $j < (count($this->parsed[$op_nbr][$i]) - 3) ; $j ++) {\n # This causes incorrect parsing of integer job attributes.\n # 2010-08-16\n # bpkroth\n #$value = self::_interpretAttribute($name,$type,$this->parsed[$job_nbr][$i][$j]);\n $value = $this->parsed[$op_nbr][$i][$j];\n $index = '_value'.$j;\n $this->client_operation_attributes->$op_index->$php_name->$index = $value;\n }\n }\n }\n \n $this->parsed = array();\n }", "function describeService($data)\r\n\r\n\t{\r\n\r\n\t\t$className = $data['label'];\r\n\r\n\t\t//Sanitize path\r\n\r\n\t\t$path = str_replace('..', '', $data['data']);\r\n\r\n\t\t//Generate the method table from this info\r\n\r\n\t\t// Browse the cakePHP controllers folder\t\t\r\n\r\n\t\t$this->_path = CONTROLLERS;\r\n\r\n\t\t\r\n\r\n\t\t$methodTable = CakeMethodTable::create($this->_path . $path . $className . '.php', NULL, $classComment);\r\n\r\n\t\treturn array($methodTable, $classComment);\r\n\r\n\t}", "public function getTTNMeta() {\n\n\t\t$obj = new stdClass();\n\n\t\t$obj->time = $this->time;\n\t\t$obj->frequency = $this->frequency;\n\t\t$obj->modulation = $this->modulation;\n\t\tif ( 'LORA' == $this->modulation ) {\n\t\t\t$obj->data_rate = $this->data_rate;\n\t\t} else {\n\t\t\t$obj->bit_rate = $this->bit_rate;\n\t\t}\n\t\t$obj->coding_rate = $this->coding_rate;\n\t\t$obj->gateways = [];\n\t\tforeach ( $this->gateways as $gate ) {\n\n\t\t\t$obj->gateways[] = $gate->getTTNGateMeta();\n\n\t\t}\n\n\t\tif ( !is_null($this->location) ) {\n\t\t\t$obj->latitude = $this->location->getLatitude();\n\t\t\t$obj->longitude = $this->location->getLongitude();\n\t\t\tif ( !is_null($this->location->getAltitude()) ) {\n\t\t\t\t$obj->altitude = $this->location->getAltitude();\n\t\t\t}\n\t\t}\n\n\t\treturn $obj;\n\n\t}" ]
[ "0.63990295", "0.4166838", "0.41522458", "0.41314238", "0.41055712", "0.40080577", "0.39407963", "0.39168134", "0.39081725", "0.3898466", "0.3898466", "0.3848293", "0.3848293", "0.3848293", "0.38397527", "0.3832415", "0.38169038", "0.37977087", "0.37752447", "0.3773832", "0.37517574", "0.37516302", "0.374959", "0.3703395", "0.3690272", "0.36786267", "0.36644274", "0.3652615", "0.36325788", "0.36229053", "0.36219805", "0.3612617", "0.36061046", "0.36008695", "0.35967514", "0.3589311", "0.3575515", "0.3571105", "0.3564683", "0.35607356", "0.35552686", "0.3551311", "0.35411578", "0.3538668", "0.35372028", "0.35299885", "0.35299885", "0.3526764", "0.35264477", "0.3504852", "0.3502238", "0.35020298", "0.3497293", "0.34923977", "0.34919527", "0.34900925", "0.34873864", "0.34873864", "0.34873864", "0.34873864", "0.34873864", "0.34826678", "0.34791344", "0.34722674", "0.34716395", "0.34684208", "0.34661618", "0.34612602", "0.3456649", "0.34531057", "0.34460342", "0.34458673", "0.34397468", "0.3438137", "0.34310204", "0.34253278", "0.34234688", "0.34111512", "0.341084", "0.3409996", "0.3409252", "0.3407343", "0.34062427", "0.3404982", "0.3397029", "0.33804366", "0.33802447", "0.33793083", "0.33696118", "0.33693874", "0.33654615", "0.3364086", "0.3358213", "0.33551094", "0.33540183", "0.33494827", "0.33481687", "0.3347119", "0.33445227", "0.33410263" ]
0.48028782
1
Operation metadata for suggesting Trials. Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1;
public function setGenericMetadata($var) { GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); $this->generic_metadata = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGenericMetadata()\n {\n return $this->generic_metadata;\n }", "private function getDefaultOperationDescriptor()\n {\n return [\n 'additionalArgumentMethods' => [\n 'getProject',\n ],\n 'getOperationMethod' => 'get',\n 'cancelOperationMethod' => null,\n 'deleteOperationMethod' => 'delete',\n 'operationErrorCodeMethod' => 'getHttpErrorStatusCode',\n 'operationErrorMessageMethod' => 'getHttpErrorMessage',\n 'operationNameMethod' => 'getName',\n 'operationStatusMethod' => 'getStatus',\n 'operationStatusDoneValue' => \\Google\\Cloud\\Compute\\V1\\Operation\\Status::DONE,\n ];\n }", "abstract public function signRequestHeaders(\n\t\t$httpVerb = Microsoft_Http_Client::GET,\n\t\t$path = '/',\n\t\t$query = array(),\n\t\t$headers = null,\n\t\t$forTableStorage = false,\n\t\t$resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN,\n\t\t$requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ,\n\t\t$rawData = null\n\t);", "public function getSyncMetadata() {}", "function getOperationInfo() {\n return userpoints_get_info($this->getOperation());\n }", "public function signRequestHeaders(\n\t\t$httpVerb = Microsoft_Http_Client::GET,\n\t\t$path = '/',\n\t\t$queryString = '',\n\t\t$headers = null,\n\t\t$forTableStorage = false,\n\t\t$resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN,\n\t\t$requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ,\n\t\t$rawData = null\n\t) {\n\t\t// http://github.com/sriramk/winazurestorage/blob/214010a2f8931bac9c96dfeb337d56fe084ca63b/winazurestorage.py\n\n\t\t// Table storage?\n\t\tif ($forTableStorage) {\n\t\t\tthrow new Microsoft_WindowsAzure_Credentials_Exception('The Windows Azure SDK for PHP does not support SharedKey authentication on table storage. Use SharedKeyLite authentication instead.');\n\t\t}\n\t\t\n\t\t// Determine path\n\t\tif ($this->_usePathStyleUri) {\n\t\t\t$path = substr($path, strpos($path, '/'));\n\t\t}\n\n\t\t// Determine query\n\t\t$queryString = $this->_prepareQueryStringForSigning($queryString);\n\t\n\t\t// Canonicalized headers\n\t\t$canonicalizedHeaders = array();\n\t\t\n\t\t// Request date\n\t\t$requestDate = '';\n\t\tif (isset($headers[Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date'])) {\n\t\t $requestDate = $headers[Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date'];\n\t\t} else {\n\t\t $requestDate = gmdate('D, d M Y H:i:s', time()) . ' GMT'; // RFC 1123\n\t\t $canonicalizedHeaders[] = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date:' . $requestDate;\n\t\t}\n\t\t\n\t\t// Build canonicalized headers\n\t\tif (!is_null($headers)) {\n\t\t\tforeach ($headers as $header => $value) {\n\t\t\t\tif (is_bool($value)) {\n\t\t\t\t\t$value = $value === true ? 'True' : 'False';\n\t\t\t\t}\n\n\t\t\t\t$headers[$header] = $value;\n\t\t\t\tif (substr($header, 0, strlen(Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER)) == Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER) {\n\t\t\t\t $canonicalizedHeaders[] = strtolower($header) . ':' . $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsort($canonicalizedHeaders);\n\n\t\t// Build canonicalized resource string\n\t\t$canonicalizedResource = '/' . $this->_accountName;\n\t\tif ($this->_usePathStyleUri) {\n\t\t\t$canonicalizedResource .= '/' . $this->_accountName;\n\t\t}\n\t\t$canonicalizedResource .= $path;\n\t\tif ($queryString !== '') {\n\t\t $queryStringItems = $this->_makeArrayOfQueryString($queryString);\n\t\t foreach ($queryStringItems as $key => $value) {\n\t\t \t$canonicalizedResource .= \"\\n\" . strtolower($key) . ':' . urldecode($value);\n\t\t }\n\t\t}\n\t\t\n\t\t// Content-Length header\n\t\t$contentLength = '';\n\t\tif (strtoupper($httpVerb) != Microsoft_Http_Client::GET\n\t\t\t && strtoupper($httpVerb) != Microsoft_Http_Client::DELETE\n\t\t\t && strtoupper($httpVerb) != Microsoft_Http_Client::HEAD) {\n\t\t\t$contentLength = 0;\n\t\t\t\n\t\t\tif (!is_null($rawData)) {\n\t\t\t\t$contentLength = strlen($rawData);\n\t\t\t}\n\t\t}\n\n\t\t// Create string to sign \n\t\t$stringToSign = array();\n\t\t$stringToSign[] = strtoupper($httpVerb); \t\t\t\t\t\t\t\t\t// VERB\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-Encoding', '');\t\t// Content-Encoding\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-Language', '');\t\t// Content-Language\n \t$stringToSign[] = $contentLength; \t\t\t\t\t\t\t\t\t\t\t// Content-Length\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-MD5', '');\t\t\t\t// Content-MD5\n \t$stringToSign[] = $this->_issetOr($headers, 'Content-Type', '');\t\t\t// Content-Type\n \t$stringToSign[] = \"\";\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Date\n \t$stringToSign[] = $this->_issetOr($headers, 'If-Modified-Since', '');\t\t// If-Modified-Since\n \t$stringToSign[] = $this->_issetOr($headers, 'If-Match', '');\t\t\t\t// If-Match\n \t$stringToSign[] = $this->_issetOr($headers, 'If-None-Match', '');\t\t\t// If-None-Match\n \t$stringToSign[] = $this->_issetOr($headers, 'If-Unmodified-Since', '');\t\t// If-Unmodified-Since\n \t$stringToSign[] = $this->_issetOr($headers, 'Range', '');\t\t\t\t\t// Range\n \t\n \tif (!$forTableStorage && count($canonicalizedHeaders) > 0) {\n \t\t$stringToSign[] = implode(\"\\n\", $canonicalizedHeaders); // Canonicalized headers\n \t}\n \t\t\n \t$stringToSign[] = $canonicalizedResource;\t\t \t\t\t// Canonicalized resource\n \t$stringToSign = implode(\"\\n\", $stringToSign);\n \t$signString = base64_encode(hash_hmac('sha256', $stringToSign, $this->_accountKey, true));\n\n \t// Sign request\n \t$headers[Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PREFIX_STORAGE_HEADER . 'date'] = $requestDate;\n \t$headers['Authorization'] = 'SharedKey ' . $this->_accountName . ':' . $signString;\n \t\n \t// Return headers\n \treturn $headers;\n\t}", "public function getAddMetadata()\n {\n return $this->readOneof(3);\n }", "function getCorrOperationDescription(array $operation) {\n\treturn corrOperationTypes($operation['type']);\n}", "public function getMetadata()\n {\n $this->getFtpMetadata();\n\n parent::getMetadata();\n\n /**\n * Discovery creates an array of Files and Directories based on Path\n */\n if ($this->exists === true) {\n $this->discovery($this->path);\n }\n\n $this->getSize();\n\n return;\n }", "public function getMetadata() {}", "public function getMetadata() {}", "public function getMetadata();", "public function getMetadata();", "public function getMetadata();", "public function metadata()\r\n\t{\r\n return array(\"nit\" => array(),\r\n \"nombre\" => array(),\r\n \"telefono\" => array(),\r\n \"direccion\" => array(),\r\n \"correo\" => array());\r\n }", "function add_metadata_taxonomies() {\n\t/*\n\tEducational use: http://schema.org/educationalUse e.g. http://purl.org/dcx/lrmi-vocabs/edUse/instruction\nEducational audience: http://schema.org/EducationalAudience e.g. http://purl.org/dcx/lrmi-vocabs/educationalAudienceRole/student\nInteractivity type: http://schema.org/interactivityType e.g. http://purl.org/dcx/lrmi-vocabs/interactivityType/expositive (active, expositive, or mixed)\nProficiency level: http://schema.org/proficiencyLevel (Beginner, Expert)\n\t*/\n\tadd_educational_use();\n\tadd_educational_audience();\n\tadd_interactivity_type();\n\tadd_proficiency_level();\n}", "abstract protected function getTableMetadata(string $name, string $type, bool $refresh);", "public function getOperationInfo()\n {\n $value = $this->get(self::OPERATIONINFO);\n return $value === null ? (string)$value : $value;\n }", "public function syncMetadata() {}", "public function getOperations()\r\n {\r\n return $this->operations;\r\n }", "public function testUpdateMetadata1UsingPUT()\n {\n }", "protected function getAdvancedMultiIndexSuggestResultsRequest($suggest)\n {\n // verify the required parameter 'suggest' is set\n if ($suggest === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $suggest when calling getAdvancedMultiIndexSuggestResults'\n );\n }\n\n $resourcePath = '/indexes/suggest';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($suggest)) {\n $_tempBody = $suggest;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('auth_token');\n if ($apiKey !== null) {\n $queryParams['auth_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-RSearch-App-ID');\n if ($apiKey !== null) {\n $headers['X-RSearch-App-ID'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function listsgenericGenericput($generic_id)\r\n {\r\n $input = Request::all();\r\n $generic = Generic::findOrFail($generic_id);\r\n $generic->update(['name' => $input['name']]);\r\n if($generic->save()){\r\n return response()->json(['msg' => 'Updated generic']);\r\n }else{\r\n return response('Oops, seems like there was a problem updating the generic');\r\n }\r\n }", "protected function getRouteInfo(RestServiceEntity $metadata, array $config)\n {\n $routeName = $metadata->routeName;\n if (\n ! $routeName\n || ! isset($config['router']['routes'][$routeName]['options']['route'])\n ) {\n return;\n }\n $metadata->exchangeArray([\n 'route_match' => $config['router']['routes'][$routeName]['options']['route'],\n ]);\n }", "public function getOperations()\n {\n return $this->operations;\n }", "public function getOperationContext();", "public function getOperation();", "public function getOperationParams()\n {\n return $this->operation_params;\n }", "public function getOperationType()\n {\n return OP_TABLES;\n }", "public function testGetMetadata1UsingGET()\n {\n }", "public function testGetMetadata3UsingGET()\n {\n }", "public function testUpdateMetadata3UsingPUT()\n {\n }", "abstract public function getErrorMetadata(): array;", "public function getOperationMade() {}", "public function getGenericCalls()\n {\n return $this->genericCalls;\n }", "public function getHumanReviewOperation()\n {\n return $this->human_review_operation;\n }", "function _drush_infinite_base_migrate_taxonomy_seo_data_finished($success, array $results, array $operations) {\n \\Drupal::state()->set('infinite_base.term_seo_migrate', 1);\n drush_log(dt('Operation finished'), \"ok\");\n}", "protected function getDefaultOperations(EntityInterface $entity) {\n $operations = [];\n if ($entity->access('update') && $entity->hasLinkTemplate('edit-form')) {\n $operations['edit'] = [\n 'title' => $this->t('Edit'),\n 'weight' => 10,\n 'url' => $entity->urlInfo('edit-form'),\n ];\n }\n if ($entity->isActivated()) {\n $operations['disable'] = [\n 'title' => $this->t('Disable'),\n 'weight' => 100,\n 'url' => Url::fromRoute('entity.font.deactivate', ['js' => 'nojs', 'font' => $entity->id()], ['query' => \\Drupal::destination()->getAsArray()]),\n ];\n }\n if ($entity->isDeactivated()) {\n $operations['enable'] = [\n 'title' => $this->t('enable'),\n 'weight' => 100,\n 'url' => Url::fromRoute('entity.font.activate', ['js' => 'nojs', 'font' => $entity->id()], ['query' => \\Drupal::destination()->getAsArray()]),\n ];\n }\n\n return $operations;\n }", "public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'publishDate', 'client', 'workType', 'briefDescription', 'description', 'caseStudyID', 'isPrivate', 'commentsAllowed', 'screenshots', 'prevImageURL', 'finalURL');\n \t}", "protected function initMetadata($data, $metadata) {}", "public function crceTariffGetTariffsWithHttpInfo($correlation_id = null, $transaction_id = null, $user = null, $label = null)\n {\n // parse inputs\n $resourcePath = \"/tariffs\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($label !== null) {\n $queryParams['label'] = $this->apiClient->getSerializer()->toQueryValue($label);\n }\n // header params\n if ($correlation_id !== null) {\n $headerParams['correlationId'] = $this->apiClient->getSerializer()->toHeaderValue($correlation_id);\n }\n // header params\n if ($transaction_id !== null) {\n $headerParams['transactionId'] = $this->apiClient->getSerializer()->toHeaderValue($transaction_id);\n }\n // header params\n if ($user !== null) {\n $headerParams['user'] = $this->apiClient->getSerializer()->toHeaderValue($user);\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('accessKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['accessKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\iNew\\Rest6_1\\Model\\GetTariffsResponse',\n '/tariffs'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\iNew\\Rest6_1\\Model\\GetTariffsResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\GetTariffsResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 400:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\RestError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 500:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\RestError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "function getOperation() {\n return $this->operation;\n }", "public function getOperationType()\n {\n return $this->operation_type;\n }", "private function encodeRequestMetadata(array $metadata): string\n {\n // Initialize an empty metadata string.\n $metadata_string = \"\";\n\n // Iterate over the available metadata names.\n foreach (API::METADATA_NAMES as $metadata_type => $metadata_fields) {\n // Store the first letter of the metadata type.\n $metadata_letter = substr($metadata_type, 0, 1);\n\n // Initialize an empty metadata part string.\n $metadata_part = \"\";\n\n //\n if (isset($metadata[$metadata_type])) {\n // Iterate over each field of this metadata type.\n foreach ($metadata_fields as $field_name => $field_code) {\n // If this field was requested..\n if (in_array($field_name, $metadata[$metadata_type])) {\n // .. add it to the metadata part.\n $metadata_part .= $field_code;\n }\n }\n\n // If, after checking for requested metadata of this type, some matches were found..\n if ($metadata_part !== \"\") {\n // Add the letter and numbers matching the requested metadata to the metadata string.\n $metadata_string .= \"{$metadata_letter}{$metadata_part}\";\n }\n }\n }\n\n // Return the filled in metadata string.\n return $metadata_string;\n }", "function wp_migrate_old_typography_shape($metadata)\n {\n }", "public function getOperation(): string\n {\n return $this->operation;\n }", "public function getOperation(): string\n {\n return $this->operation;\n }", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function testUpdateMetadata2UsingPUT()\n {\n }", "public function deleteMetadata($path)\n {\n require_once 'Zend/Cloud/OperationNotAvailableException.php';\n throw new Zend_Cloud_OperationNotAvailableException('Deleting metadata not implemented');\n }", "public function getAdditionalInformation()\n {\n $compName = '';\n\n if ($compUid = $this->getCompetition()) {\n $competition = tx_rnbase::makeInstance('tx_cfcleague_models_Competition', $compUid);\n $compName = $competition->isValid() ? $competition->getName() : '[invalid!]';\n }\n\n return sprintf('Aktualisierung der Spieler für Wettbewerb >%s<', $compName);\n // return sprintf( $GLOBALS['LANG']->sL('LLL:EXT:mksearch/locallang_db.xml:scheduler_indexTask_taskinfo'),\n // $this->getTargetPath(), $this->getItemsInQueue());\n }", "public function getMetadata(): array;", "protected function _getAllCustomMetadataKeys() {}", "public function setMetadata($var)\n {\n GPBUtil::checkString($var, True);\n $this->Metadata = $var;\n\n return $this;\n }", "function getOperation() {\n\t\treturn $this->get('_operation', $this->get('operation'));\n\t}", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "private function givenServiceWithOperations()\n {\n // Response GetBook types\n $responseBookName = new ComplexType($this->config, 'Method_Get_Book_Response_BOOK_BOOK_NAME');\n $responseBookName->addMember('string', 'bookName', false);\n $responseBook = new ComplexType($this->config, 'Method_Get_Book_Response_BOOK');\n $responseBook->addMember('int', 'bookId', false);\n // Base type example\n $responseBook->setBaseType($responseBookName);\n $returnGetBookType = new ComplexType($this->config, 'Get_Book_Type_Response');\n $returnGetBookType->addMember('Method_Get_Book_Response_BOOK', 'book_response', false);\n // Request GetBook types\n $bookType = new Enum($this->config, 'Book_Type_Enumeration', 'string');\n $bookType->addValue('fiction');\n $bookType->addValue('comedy');\n $requestBook = new ComplexType($this->config, 'Method_Get_Book_Request_BOOK');\n $requestBook->addMember('int', 'bookId', false);\n $requestBook->addMember('Book_Type_Enumeration', 'genre', false);\n $requestGetBook = new ComplexType($this->config, 'Get_Book_Type_Request');\n $requestGetBook->addMember('Method_Get_Book_Request_BOOK', 'book_request', false);\n // Operation GetBook\n $getBookOperation = new Operation('GetBook', 'Get_Book_Type_Request $request', 'Get Book', 'Get_Book_Type_Response');\n // Response GetAuthors type\n $responseAuthor = new ComplexType($this->config, 'Get_Authors_Response_Author');\n $responseAuthor->addMember('int', 'authorId', false);\n $responseAuthor->addMember('string', 'authorName', false);\n $returnGetAuthors = new ComplexType($this->config, 'Method_Get_Authors_Response');\n $returnGetAuthors->addMember('Get_Authors_Response_Author[]', 'Get_Authors_Response_Author', false);\n // Request GetAuthors type\n $requestGetAuthor = new ComplexType($this->config, 'Method_Get_Authors_Request');\n $requestGetAuthor->addMember('Method_Get_Book_Request_BOOK', 'book_request', false);\n // Operation GetAuthors\n $getAuthorsOperator = new Operation('GetAuthor', 'Method_Get_Authors_Request $request', 'Get Authors', 'Method_Get_Authors_Response');\n // Request SetVersion\n $requestSetVersion = new ComplexType($this->config, 'Method_Set_Version_Request');\n // Operation SetVersion\n $setVersionOperator = new Operation('SetVersion', 'Method_Set_Version_Request $request', 'Set version', null);\n // Service creation\n $types = [\n $responseBookName,\n $responseBook,\n $returnGetBookType,\n $requestBook,\n $requestGetBook,\n $responseAuthor,\n $returnGetAuthors,\n $requestGetAuthor,\n $bookType,\n $requestSetVersion,\n ];\n $service = new Service($this->config, 'Book_Shell', $types, 'Book shells');\n $service->addOperation($getBookOperation);\n $service->addOperation($getAuthorsOperator);\n $service->addOperation($setVersionOperator);\n\n return $service;\n }", "public function listsgenericpost()\r\n {\r\n $input = Request::all();\r\n $new_generic = Generic::create($input);\r\n if($new_generic){\r\n return response()->json(['msg' => 'Created new generic']);\r\n }else{\r\n return response('Oops, seemes like something went wrong while trying to create a new generic');\r\n }\r\n }", "function fetchMeta($metadata)\n {\n $languages = $this->getLanguages();\n $attribname = $this->fieldName().(!$this->isMlNode()?'_'.$languages[0]:'');\n $this->m_size = min($metadata[$attribname]['len'], $this->maxInputSize());\n $this->m_searchsize = min($metadata[$attribname]['len'], 20);\n $this->m_maxsize = $metadata[$attribname]['len'];\n }", "public function get_metadata() {\n\t\treturn array_merge(parent::get_metadata(), array(\n\t\t\t'friendly_name' => 'List View'\n\t\t));\n\t}", "public function get_keywords() {\n\t\treturn [ 'Feature image', 'photo', 'visual' ];\n\t}", "public function genericSearchFields()\n {\n return ['url', 'content', 'title', 'arguments_json', 'language_info'];\n }", "public function getMetadata($path)\n {\n }", "public function getHttpMetas()\n {\n return $this->httpMetas;\n }", "public function testGetMetadata2UsingGET()\n {\n }", "public function getAllTableMetadata()\n {\n return $this->metadata;\n }", "function autoMetadata(){\n\t\t \n\t\t $this->getMakeMetadata();\n\t\t $this->getProjects();\n\t\t $this->getPersons();\n\t\t $this->getProjectCreators();\n\t\t $this->saveMetadata(); //save the results\n\t }", "function getMakeMetadata(){\n\t\t if(!$this->getSavedMetadata()){\n\t\t\t\t$this->tableID = false;\n\t\t\t\t$this->tableName = \"[Not titled]\";\n\t\t\t\t$this->tableDesciption = \"[Not described]\";\n\t\t\t\t$this->tableTags = false;\n\t\t\t\t$this->tableDOI = false;\n\t\t\t\t$this->tableARK = false;\n\t\t\t\t$this->published = false;\n\t\t\t\t$this->pubCreated = false;\n\t\t\t\t$this->pubUpdate = false;\n\t\t\t\t$this->license = $this->DBgetLicense();\n\t\t\t\t$this->getProjects();\n\t\t\t\t$this->getPersons();\n\t\t\t\t$this->getProjectCreators();\n\t\t\t\t$this->getGenerateTableID(); //create a table ID based in the metadata for the table\n\t\t\t\t$this->saveMetadata(); //save the results\n\t\t }\n\t\t else{\n\t\t\t\t$this->metadataParse(); //get saved metadata ready to use\n\t\t }\n\t\t $this->getTableSize(); //get the number of records in a table\n\t\t $this->getTableFields(); //get the fields in a table.\n\t\t $this->getSampleRecords(); //get the fields in a table.\n\t }", "public function getAttributeName()\n {\n return 'TaskSuggestion';\n }", "public function update_transaction_info( \\PostFinanceCheckout\\Sdk\\Model\\Transaction $transaction, WC_Order $order ) {\n\t\t$info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_by_transaction( $transaction->getLinkedSpaceId(), $transaction->getId() );\n\t\t$info->set_transaction_id( $transaction->getId() );\n\t\t$info->set_authorization_amount( $transaction->getAuthorizationAmount() );\n\t\tif ( $transaction->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::FAILED ) {\n\t\t\t$info->set_order_id( null );\n\t\t} else {\n\t\t\t$info->set_order_id( $order->get_id() );\n\t\t}\n\t\t$info->set_order_mapping_id( $order->get_id() );\n\t\t$info->set_state( $transaction->getState() );\n\t\t$info->set_space_id( $transaction->getLinkedSpaceId() );\n\t\t$info->set_space_view_id( $transaction->getSpaceViewId() );\n\t\t$info->set_language( $transaction->getLanguage() );\n\t\t$info->set_currency( $transaction->getCurrency() );\n\t\t$info->set_connector_id(\n\t\t\t! is_null( $transaction->getPaymentConnectorConfiguration() ) ? $transaction->getPaymentConnectorConfiguration()->getConnector() : null\n\t\t);\n\t\t$info->set_payment_method_id(\n\t\t\t! is_null( $transaction->getPaymentConnectorConfiguration() ) && $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration() !=\n\t\t\tnull ? $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getPaymentMethod() : null\n\t\t);\n\t\t$info->set_image( $this->get_resource_path( $this->get_payment_method_image( $transaction, $order ) ) );\n\t\t$info->set_image_base( $this->get_resource_base( $this->get_payment_method_image( $transaction, $order ) ) );\n\t\t$info->set_labels( $this->get_transaction_labels( $transaction ) );\n\t\tif ( $transaction->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::FAILED ||\n\t\t\t$transaction->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionState::DECLINE ) {\n\t\t\t$failed_charge_attempt = $this->get_failed_charge_attempt( $transaction->getLinkedSpaceId(), $transaction->getId() );\n\t\t\tif ( ! is_null( $failed_charge_attempt ) ) {\n\t\t\t\tif ( ! is_null( $failed_charge_attempt->getFailureReason() ) ) {\n\t\t\t\t\t$info->set_failure_reason( $failed_charge_attempt->getFailureReason()->getDescription() );\n\t\t\t\t}\n\t\t\t\t$info->set_user_failure_message( $failed_charge_attempt->getUserFailureMessage() );\n\t\t\t}\n\t\t\tif ( is_null( $info->get_failure_reason() ) ) {\n\t\t\t\tif ( ! is_null( $transaction->getFailureReason() ) ) {\n\t\t\t\t\t$info->set_failure_reason( $transaction->getFailureReason()->getDescription() );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( empty( $info->get_user_failure_message() ) ) {\n\t\t\t\t$info->set_user_failure_message( $transaction->getUserFailureMessage() );\n\t\t\t}\n\t\t}\n\t\t$info = apply_filters( 'wc_postfinancecheckout_update_transaction_info', $info, $transaction, $order );\n\t\t$info->save();\n\t\treturn $info;\n\t}", "public function describeActiveOperationTaskWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->isHistory)) {\n $query['IsHistory'] = $request->isHistory;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->pageNumber)) {\n $query['PageNumber'] = $request->pageNumber;\n }\n if (!Utils::isUnset($request->pageSize)) {\n $query['PageSize'] = $request->pageSize;\n }\n if (!Utils::isUnset($request->region)) {\n $query['Region'] = $request->region;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->securityToken)) {\n $query['SecurityToken'] = $request->securityToken;\n }\n if (!Utils::isUnset($request->taskType)) {\n $query['TaskType'] = $request->taskType;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DescribeActiveOperationTask',\n 'version' => '2015-01-01',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DescribeActiveOperationTaskResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "public function suggest() {\n \n $query = ['query' => ['match_all' => []]];\n if (Request::has('q')) {\n $query = [\n 'query' => [\n 'nested' => [\n 'path' => 'prefLabels',\n 'query' => [\n 'bool' => [\n 'must' => [\n [ 'prefix' => [ 'prefLabels.label' => Request::get('q') ] ],\n [ 'match' => [ 'prefLabels.lang' => 'en' ] ]\n ]\n ]\n ]\n ]\n ]\n ];\n }\n \n $hits = Subject::suggest($query, 'resource');\n return response()\n ->json($hits)\n ->header(\"Vary\", \"Accept\");\n }", "public function allMetadata(): BattleNetResponseInterface\n {\n return $this->createRequest('GET', '/hearthstone/metadata');\n }", "public function format(OperationInterface $operation): string\n {\n return $operation instanceof DescribableOperationInterface\n ? (string)$operation\n : sprintf(\n 'Generic operation %s',\n spl_object_hash($operation)\n );\n }", "public function onGenericPreTransition(WorkflowTransitionEvent $event) {\n $this->setMessage($event, 'generic pre-transition');\n }", "public function testCreateMetadata()\n {\n }", "public function getProjectStepOneAttributeNames(){\n return array(\n 'project_batch_id',\n 'name',\n 'file_id',\n 'nickname',\n 'client_id',\n 'owner_id',\n 'order_number',\n 'distributor_id',\n 'order_date',\n 'product_id',\n 'due_date',\n 'delivery_facility_id',\n 'version_id',\n 'title_year',\n 'content_type_id',\n 'client_coordinator_id',\n );\n }", "private function computeHashes(DifferentialChangeset $changeset) {\n\n $effect_key = DifferentialChangeset::METADATA_EFFECT_HASH;\n\n $effect_hash = $this->newEffectHash($changeset);\n if ($effect_hash !== null) {\n $changeset->setChangesetMetadata($effect_key, $effect_hash);\n }\n }", "public function describeAction()\n\t{\n\t\t$resourceProperties = static::resourceEntityPropertiesDescription($this->objectManager);\n\t\tif ($this->normalizeResourceTypes) {\n\t\t\t$schemas[] = &$resourceProperties;\n\t\t\twhile (count($schemas) > 0) {\n\t\t\t\tforeach ($schemas[0] as &$property) {\n\t\t\t\t\t$property['type'] = ResourceTypeHelper::normalize($property['type']);\n\t\t\t\t\tif (isset($property['elementType']) && $property['elementType'] !== null) {\n\t\t\t\t\t\t$property['elementType'] = ResourceTypeHelper::normalize($property['elementType']);\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($property['schema'])) {\n\t\t\t\t\t\tif (is_array($property['schema'])) {\n\t\t\t\t\t\t\t$schemas[] = &$property['schema'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$property['schema'] = ResourceTypeHelper::normalize($property['schema']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarray_shift($schemas);\n\t\t\t}\n\t\t}\n\t\t//$resourceProperties = array_diff($resourceProperties, array('Persistence_Object_Identifier'));\n\t\t$this->view->assign('description', $resourceProperties);\n\t\tif ($this->view instanceof JsonView) {\n\t\t\t$this->view->setVariablesToRender(['description']);\n\t\t}\n\t}", "public function createLinksFromAttributes(Metadata $operation): array;", "public function createEmptyMetadata();", "public function getMetadataOptions()\n {\n return $this->metadata_options;\n }", "public function analyzeMetadata(): void\n {\n try {\n $favicon = $this->filter('link[rel=\"icon\"]')->first()->attr('href');\n } catch (\\InvalidArgumentException $e) {\n $favicon = '';\n }\n $this->installation->setFavicon($this->getBaseHref().$favicon);\n\n // fetch title when different\n $title = $this->filter('title')->text();\n $this->installation->setTitle($title);\n\n // fetch theme color\n try {\n $themeColor = trim($this->filter('meta[name=\"theme-color\"]')->attr('content')) ?? '';\n\n // white is not visible on white background, fallback is defined in frontend\n if ($themeColor === '#ffffff') {\n $themeColor = '';\n }\n } catch (\\InvalidArgumentException $e) {\n $themeColor = '';\n }\n $this->installation->setThemeColor($themeColor);\n }", "static public function createMetadata(array $inputs)\n\t{\n\t\t$classes = [];\n\t\tforeach($inputs as $input)\n\t\t{\n\t\t\t$classes[static::factoryType($input['identifier'], $input['type'])] = $input['class'];\n\t\t}\n\t\t\n\t\treturn new Metadata(\n\t\t\t'relating', \n\t\t\t$classes,\n\t\t\tarray(\n\t\t\t\t'cache_prefix' => 'relating',\n\t\t\t\t'cache_tag' => 'relating-tag'\n\t\t\t)\n\t\t);\t\n\t}", "abstract protected function requiredOperations1(): void;", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function getOperation() {\n\t\treturn $this->operation;\n\t}", "public function testListMetadata()\n {\n }", "public function getOperationType()\n {\n if (array_key_exists(\"operationType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"operationType\"], \"\\Beta\\Microsoft\\Graph\\Model\\TeamsAsyncOperationType\") || is_null($this->_propDict[\"operationType\"])) {\n return $this->_propDict[\"operationType\"];\n } else {\n $this->_propDict[\"operationType\"] = new TeamsAsyncOperationType($this->_propDict[\"operationType\"]);\n return $this->_propDict[\"operationType\"];\n }\n }\n return null;\n }", "public function getRouteHints()\n {\n return $this->route_hints;\n }", "public function specificMetadata(string $type): BattleNetResponseInterface\n {\n return $this->createRequest('GET', '/hearthstone/metadata/' . $type);\n }", "public function create($newmeta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (is_string ( $newmeta ) && isset ( $_POST ['properties'] ) && is_object ( json_decode ( $_POST ['properties'] ) )) {\n\t\t\t\tif ($this->isCreateable ()) {\n\t\t\t\t\t// @TODO\n\t\t\t\t\t// Need to convert because there is an old structure\n\t\t\t\t\t$aMetavalues = array ();\n\t\t\t\t\tforeach ( json_decode ( $_POST ['properties'] ) as $sName => $sValue ) {\n\t\t\t\t\t\tarray_push ( $aMetavalues, array ('name' => $sName, 'value' => $sValue ) );\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $aMetavalues ) <= 150) {\n\t\t\t\t\t\t$iPrimaryMeta = ( int ) $this->oMetas->insertMeta ( array ('name' => $newmeta, 'accounts_idaccount' => $this->usr, 'namespaces_idnamespace' => $this->req ['request'] ['ns'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (( int ) $iPrimaryMeta > 0 && count ( $aMetavalues ) > 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($this->setUsage ( $this->usr, array ('maxmetas' => 1 ) )) {\n\t\t\t\t\t\t\t\tif ($this->oMetavalue->insertValue ( $aMetavalues, $iPrimaryMeta )) {\n\t\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('message' => 'Metaitem was created', 'meta' => $iPrimaryMeta ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_BUDGET_LIMIT_REACHED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_EXISTS' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'TO_MUCH_PROPERTYS' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "protected function c_parseOperationAttributes() {\n\n //if ($this->clientoutput->status != \"successfull-ok\")\n // return false;\n \n $op = -1;\n for ($i = 0 ; $i < count($this->clientoutput->response) ; $i++) {\n\t\t\n if ($this->clientoutput->response[$i]['attributes'] == \"operation-attributes\")\n $op ++;\n\t\t\t\t\n $k = -1; \n for ($j = 0 ; $j < (count($this->clientoutput->response[$i]) - 1) ; $j ++)\n if (!empty($this->clientoutput->response[$i][$j]['name'])) {\n $k++;\n $l = 0;\n $this->parsed[$op][$k]['range'] = $this->clientoutput->response[$i]['attributes'];\n $this->parsed[$op][$k]['name'] = $this->clientoutput->response[$i][$j]['name'];\n $this->parsed[$op][$k]['type'] = $this->clientoutput->response[$i][$j]['type'];\n $this->parsed[$op][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n } else {\n $l ++;\n $this->parsed[$op][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n }\n }\n \n //$this->clientoutput->response = array();\n\n $this->client_operation_attributes = new stdClass();\n\t\t\n for ($op_nbr = 0 ; $op_nbr <= $op ; $op_nbr ++) {\n\t\t\n $op_index = \"op_\".$op_nbr;\n $this->client_operation_attributes->$op_index = new stdClass();\n\t\t\t\n for ($i = 0 ; $i < count($this->parsed[$op_nbr]) ; $i ++) {\n $name = $this->parsed[$op_nbr][$i]['name'];\n $php_name = str_replace('-','_',$name);\n $type = $this->parsed[$op_nbr][$i]['type'];\n $range = $this->parsed[$op_nbr][$i]['range'];\n $this->client_operation_attributes->$op_index->$php_name = new stdClass();\n $this->client_operation_attributes->$op_index->$php_name->_type = $type;\n $this->client_operation_attributes->$op_index->$php_name->_range = $range;\n for ($j = 0 ; $j < (count($this->parsed[$op_nbr][$i]) - 3) ; $j ++) {\n # This causes incorrect parsing of integer job attributes.\n # 2010-08-16\n # bpkroth\n #$value = self::_interpretAttribute($name,$type,$this->parsed[$job_nbr][$i][$j]);\n $value = $this->parsed[$op_nbr][$i][$j];\n $index = '_value'.$j;\n $this->client_operation_attributes->$op_index->$php_name->$index = $value;\n }\n }\n }\n \n $this->parsed = array();\n }", "function describeService($data)\r\n\r\n\t{\r\n\r\n\t\t$className = $data['label'];\r\n\r\n\t\t//Sanitize path\r\n\r\n\t\t$path = str_replace('..', '', $data['data']);\r\n\r\n\t\t//Generate the method table from this info\r\n\r\n\t\t// Browse the cakePHP controllers folder\t\t\r\n\r\n\t\t$this->_path = CONTROLLERS;\r\n\r\n\t\t\r\n\r\n\t\t$methodTable = CakeMethodTable::create($this->_path . $path . $className . '.php', NULL, $classComment);\r\n\r\n\t\treturn array($methodTable, $classComment);\r\n\r\n\t}", "public function getTTNMeta() {\n\n\t\t$obj = new stdClass();\n\n\t\t$obj->time = $this->time;\n\t\t$obj->frequency = $this->frequency;\n\t\t$obj->modulation = $this->modulation;\n\t\tif ( 'LORA' == $this->modulation ) {\n\t\t\t$obj->data_rate = $this->data_rate;\n\t\t} else {\n\t\t\t$obj->bit_rate = $this->bit_rate;\n\t\t}\n\t\t$obj->coding_rate = $this->coding_rate;\n\t\t$obj->gateways = [];\n\t\tforeach ( $this->gateways as $gate ) {\n\n\t\t\t$obj->gateways[] = $gate->getTTNGateMeta();\n\n\t\t}\n\n\t\tif ( !is_null($this->location) ) {\n\t\t\t$obj->latitude = $this->location->getLatitude();\n\t\t\t$obj->longitude = $this->location->getLongitude();\n\t\t\tif ( !is_null($this->location->getAltitude()) ) {\n\t\t\t\t$obj->altitude = $this->location->getAltitude();\n\t\t\t}\n\t\t}\n\n\t\treturn $obj;\n\n\t}" ]
[ "0.4805241", "0.41680086", "0.41534734", "0.41330716", "0.41056505", "0.40094134", "0.39423403", "0.39165655", "0.39105156", "0.39003325", "0.39003325", "0.3850425", "0.3850425", "0.3850425", "0.3840812", "0.38329694", "0.38173684", "0.37985247", "0.3776517", "0.37754166", "0.37535396", "0.3753352", "0.37497663", "0.37048745", "0.3691842", "0.36798817", "0.36653596", "0.3653514", "0.36316976", "0.36246464", "0.36237139", "0.3614247", "0.3607377", "0.3601743", "0.3598343", "0.3589694", "0.3574126", "0.35721466", "0.35631496", "0.35618582", "0.35555354", "0.35518527", "0.35415858", "0.35405737", "0.3537343", "0.3530144", "0.3530144", "0.35291228", "0.35288027", "0.35065475", "0.3503702", "0.3502163", "0.34989774", "0.349358", "0.34929144", "0.34924814", "0.34879476", "0.34879476", "0.34879476", "0.34879476", "0.34879476", "0.34844553", "0.34789205", "0.34736702", "0.34734583", "0.34680358", "0.34663945", "0.34638673", "0.34594393", "0.34547788", "0.3447128", "0.34465507", "0.34409317", "0.34384018", "0.3431025", "0.3425228", "0.34240466", "0.3411967", "0.34106612", "0.34105372", "0.34093523", "0.34093004", "0.34058475", "0.34050497", "0.33963165", "0.33819297", "0.33816287", "0.33809102", "0.33709955", "0.33699393", "0.3367195", "0.3364629", "0.3359632", "0.3355851", "0.3352714", "0.3350499", "0.33493423", "0.3348624", "0.33434507", "0.33413854" ]
0.6402459
0
The name of the Study that the Trial belongs to. Generated from protobuf field string study = 2;
public function getStudy() { return $this->study; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStudy($var)\n {\n GPBUtil::checkString($var, True);\n $this->study = $var;\n\n return $this;\n }", "public function getStudy() {\n return $this->study;\n }", "public function study($study)\n {\n return $this->setProperty('study', $study);\n }", "public function getStudyNameAttribute() : array\n {\n return array_map(fn (Study $study) : string => $study->study(), $this->studies);\n }", "public function hasStudyName() {\n return $this->_has(9);\n }", "public function getStudyNameList() {\n return $this->_get(9);\n }", "function getId() {\n\t\treturn $this->getData('studyId');\n\t}", "public function addStudyName(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(9, $value);\n }", "public function getConceptName(): string\n {\n return \\ucfirst($this->toString());\n }", "public function get_samples_origin() {\n return 'course';\n }", "function getStudyInfo($connection, $idStudy){\n\t$query = \"SELECT * FROM vStudyWithTypeNames WHERE idStudy =\".$idStudy;\n\treturn fetchRowFromDBOnID($connection, $query, $idStudy, \"study\");\n}", "function study() {\n $this->studied = true;\n $this->_readframe();\n }", "public function get_study_types()\n\t{\n\t\treturn $this->study_types;\n\t}", "private function parseStudyInformation()\n {\n //\"FEEIT B-RK den [term 3, year 3]\"\n //\"ICSM FEEIT, ext FIIT\" //teacher\n\n if (str_contains($this->study_information, 'FEEIT I')) {\n $this->study_level = 2;\n $this->rank = substr($this->study_information, -2, 1) + 3;\n } elseif (str_contains($this->study_information, 'FEEIT B')) {\n $this->study_level = 1;\n $this->rank = substr($this->study_information, -2, 1);\n }\n }", "public function getStudentName()\n {\n return $this->workStudent->first_name . \" \" . $this->workStudent->last_name;\n }", "public function getTestName()\n {\n return $this->getField(5)[1];\n }", "public function addStudy($study) {\n $this->study[] = $study;\n return $this;\n }", "public function get_name()\r\n {\r\n \t$data = $this->get_exercise_data();\r\n \treturn $data['title'];\r\n }", "function track_name($tr) {\n switch ($tr) {\n case 'tr0': return 'Paper Presentation';\n case 'trp': return 'Poster Session';\n case 'trl': return 'Lightning Talk';\n case 'trw': return 'Workshop';\n case 'tri': return 'Installation';\n case 'tro': return 'Miscellaneous';\n case 'trm': return 'Concert';\n case 'trmS': return 'Sound Night';\n default: return '';\n }\n }", "function get_name($substance)\r\n {\r\n $data = $this->get_data($substance->pubchem);\r\n\r\n if(!$data)\r\n {\r\n return false;\r\n }\r\n\r\n return $data->name;\r\n }", "public function hasStudyAcronym() {\n return $this->_has(10);\n }", "public function setTrial($var)\n {\n GPBUtil::checkString($var, True);\n $this->trial = $var;\n\n return $this;\n }", "public function getName(): string {\n\t\treturn $this->lFactory->get('spreed')->t('Talk');\n\t}", "public static function participantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('participant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "public function hasStudyId() {\n return $this->_has(1);\n }", "public function caseStudyID($value = null)\n \t{\n \t\tif ($value != null) $this->caseStudyID = $value;\n \t\telse return $this->caseStudyID;\n \t}", "public function getName() {\n return $this->getTreatmentName();\n }", "public function subtitle()\n {\n return $this->resource->getName();\n }", "public function subject()\n {\n return $this->belongsTo(StudySubject::class, 'subject_id');\n }", "public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }", "public function getStudentId() {\n\t\tpreg_match ( '/\\d{9}/', $this->transcript, $ID ); // this will get the SID of the student\n\n\t\tif (count ( $ID ) > 0) {\n\t\t\t\t\n\t\t\t// $key= mt_rand ( MIN_KEY, MAX_KEY ); // will append a random key to the SI\n\t\t\treturn $ID [0]; // . strval($key);\n\t\t} else\n\t\t\treturn null;\n\t}", "public function hasStudyId() {\n return $this->_has(5);\n }", "public function getName()\n {\n return $this->str_name;\n }", "function getStudentFullName() {\n\t\treturn Locale::translate('plugins.generic.thesis.studentFullName', array('lastName' => $this->getData('studentLastName'), 'firstName' => $this->getData('studentFirstName'), 'middleName' => $this->getData('studentMiddleName')));\n\t}", "function get_title($substance)\r\n {\r\n $data = $this->get_data($substance->pubchem);\r\n\r\n if(!$data)\r\n {\r\n return false;\r\n }\r\n\r\n return $data->name;\r\n }", "public function getStudyByID($uuid)\n {\n $url = $this->url.\"/studies/\".$uuid;\n return $this->getContent2($url);\n }", "public function getSingularName()\n {\n return rtrim($this->name, 's');\n }", "public function getName(){ return $this->getField('name'); }", "function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}", "function getStudentMiddleName() {\n\t\treturn $this->getData('studentMiddleName');\n\t}", "function getSubjectsForStudy($theStudyID, $clientID) {\n global $definitions;\n\n $subjectItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['subject'], $clientID);\n $subjectStudy_PropID = getClientPropertyID_RelatedWith_byName($definitions['subjectStudyID'], $clientID);\n\n //First get the relation associated\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $subjectStudy_PropID, 'value' => $theStudyID);\n\n $subjects = getFilteredItemsIDs($subjectItemTypeID, $clientID, $filters, $returnProperties);\n\n return $subjects;\n\n}", "public function getSubject(): string\n {\n return $this->getPayloadClaim('sub');\n }", "public function message()\n {\n return 'Only 1 unique exercise name per user.';\n }", "public function addStudies(\\obiba\\mica\\StudyDto $value) {\n return $this->_add(2, $value);\n }", "public function getTestKitName1($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$test_kit_name_1_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($test_kit_name_1_)>0 ? $test_kit_name_1_ [0] ['test_kit_name_1'] : null;\n\t}", "public function hasStudies() {\n return $this->_has(2);\n }", "public function addStudyAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(10, $value);\n }", "public function studyPage(StudyInfoPage $page)\n {\n $all = $this->getNavPages();\n $i = array_search($page->id, array_keys($all));\n $prev = ['url'=> url('/study'), 'title'=>'Назад'];\n $next = [];\n if ($i > 1) {\n $prev = ['url' => url('/study/'.($i+1)), 'title'=>$all[$i+1]];\n }\n if ($i+1 < count($all)) {\n $next = ['url' => url('/study/'.($i+3)), 'title'=>$all[$i + 3]];\n }\n return view('pages.projects.study',\n ['page' => $page, 'all' => $all, 'prev' => $prev, 'next' => $next]);\n }", "function surveyCodeToName($surveyCode) {\n\tswitch($surveyCode) {\n\t\tcase HW_PROJECT_VALUE:\n\t\t\treturn HW_PROJECT_NAME;\n\t\tcase CHD_PROJECT_VALUE:\n\t\t\treturn CHD_PROJECT_NAME;\n\t\tcase COMB_PROJECT_VALUE:\n\t\t\treturn COMB_PROJECT_NAME;\n\t}\n}", "function setId($studyId) {\n\t\treturn $this->setData('studyId', $studyId);\n\t}", "public function name(): string\n {\n return $this->pluck('trophyTitleName');\n }", "public function getStNo(){\n return $this->student_no;\n }", "public function hasStudies() {\n return $this->_has(4);\n }", "public static function getTubeName();", "public function getStationName(): string\n {\n return $this->name;\n }", "public function getInsuranceName()\n {\n return \"Sigma\";\n }", "public function getStudyAcronymList() {\n return $this->_get(10);\n }", "function getTitle(&$record){\n $type = array('H' => 'Hydrological Station', 'M'=>'Meteorological Station');\n $title = \"\".$type[$record->val('type_station')].\" - id: \".$record->val('id_station');\n \n return $title;\n }", "function addSensSpec() {\n\t\t$data =&$this->params['form'];\n\t\t// Create the Sensitivity object\n\t\t$this->Sensitivity->create(\n\t\t\tarray(\"study_id\" =>$data['study_id'],\n\t\t\t\t\"sensitivity\"=>$data['sensitivity'],\n\t\t\t\t\"specificity\"=>$data['specificity'],\n\t\t\t\t\"prevalence\" =>$data['prevalence'],\n\t\t\t\t\"specificAssayType\" => $data['specificAssayType'],\n\t\t\t\t\"notes\"=>$data['sensspec_details'])\n\t\t\t);\n\t\t$this->Sensitivity->save();\n\t\t$sensitivity_id = $this->Sensitivity->getLastInsertId();\n\t\t\n\t\t// Create the HABTM link\n\t\t$this->checkSession(\"/biomarkers/organs/{$data['biomarker_id']}/{$data['organ_data_id']}\");\n\t\t$this->StudyData->habtmAdd('Sensitivity',$data['study_data_id'],$sensitivity_id);\n\t\t// Redirect\n\t\t$this->redirect(\"/biomarkers/organs/{$data['biomarker_id']}/{$data['organ_data_id']}\");\n\t}", "public function getSubjectName()\n {\n $subjectName = $this->getCourse()->getName();\n if ($this->getSubject()) {\n $subjectName = $this->getSubject()->getName();\n }\n return $subjectName;\n }", "function getName () {return $this->getFieldValue ('name');}", "public function hasStudySummary() {\n return $this->_has(7);\n }", "function MP3_Id($study = false) {\n if(defined('ID3_SHOW_DEBUG')) $this->debug = true;\n $this->study=($study || defined('ID3_AUTO_STUDY'));\n\n }", "abstract public function getDetailedReportName();", "public function getParticipantLabel()\n\t{\n\t\treturn $this->getContext()->getParticipantLabel();\n\t}", "public function getStudiesList() {\n return $this->_get(2);\n }", "function getStudentLastName() {\n\t\treturn $this->getData('studentLastName');\n\t}", "function getCurTrackName(){\n\n\t}", "public function hasStudyTable() {\n return $this->_has(1);\n }", "public function __toString(): string\n {\n $context = [];\n foreach ($this->solution as $key => $value) {\n $context[] = \"$key=$value\";\n }\n return '[Twilio.Insights.V1.ConferenceParticipantInstance ' . \\implode(' ', $context) . ']';\n }", "public function getQuestion(): string\n {\n return $this->question;\n }", "public function attributeLabels()\n\t{\n return array(\n 'id'=>Yii::t('study','ID'),\n 'chapter_name'=>Yii::t('study','chapter name'),\n 'title_code'=>Yii::t('study','question code'),\n 'title_type'=>Yii::t('study','question type'),\n 'name'=>Yii::t('study','question name'),\n 'display'=>Yii::t('study','display'),\n 'remark'=>Yii::t('study','Interpretation'),\n\n 'answer'=>Yii::t('study','correct answer'),\n 'answer_a'=>Yii::t('study','wrong answer A'),\n 'answer_b'=>Yii::t('study','wrong answer B'),\n 'answer_c'=>Yii::t('study','wrong answer C'),\n );\n\t}", "public function getSliceName() {\n return $this->sliceName;\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "private function getInterstName() {\n\t\t\treturn $this->interest->getName();\n\t\t}", "public function studyDataSave() {\n $id = ConstantFuntion::encryptDecrypt('decrypt', $this->params('id', 0));\n $studyObj = $this->getStudyObj($id);\n $this->form->bind($studyObj);\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $this->form->setData($request->getPost());\n $postData = $request->getPost('study');\n $newCompanyIds = [];\n if ($id != 0) {\n $newCompanyIds = $this->getNewCompanyIds($postData, $studyObj);\n }\n if ($this->form->isValid()) {\n $em = $this->getEntityManager();\n try {\n $em->persist($studyObj);\n $em->flush();\n if ($id == 0) {\n $this->saveMessage($studyObj);\n // $this->saveStudyDocument($studyObj); // this is commented as discussed with devang\n }\n\t\t if($studyObj->getStatus() == '2') {\n\t\t\t$this->updateMessage($studyObj);\n\t\t }\n $this->prepareMailToCompany($postData, $newCompanyIds);\n } catch (\\Exception $ex) {\n throw new \\Exception($ex->getMessage());\n }\n $this->flashMessenger()->addSuccessMessage($postData['protocol'] . ' ' . $this->translate('study details has been saved.'));\n\t\tif ($id == 0) {\n\t\t return $this->redirect()->toRoute('study', array('action' => 'index','id'=>1));\n\t\t}\n\t\treturn $this->redirect()->toRoute('study', array('action' => 'index'));\n }\n }\n }", "public function getSingularName();", "public function setCourseName()\n {\n // Set the font.\n $this->AddFont('MTCORSVA', '', 'MTCORSVA.php');\n $this->SetFont('MTCORSVA', '', 18);\n\n // Line break.\n $this->Ln(12);\n\n $this->Cell(259, 35, 'for having attended the training entitled', 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 27);\n\n // Line break.\n $this->Ln(13);\n\n $this->Cell(259, 35, $this->aScheduleDetails['courseName'], 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 18);\n\n // Line break.\n $this->Ln(11);\n\n if (empty($this->aScheduleDetails['courseDescription']) === false) {\n $this->Cell(259, 35, $this->aScheduleDetails['courseDescription'], 0, 0, 'C');\n }\n }", "public function get_student_id() {\n\t\t\treturn $this->student_id;\n\t\t}", "public function nice_name(){\n return 'Anno scolastico '.$this->first_day_first_semester->year.'-'\n .$this->last_day_second_semester->year;\n }", "public function getTreatmentName() {\n return $this->_treatment_name;\n }", "public function getName()\r\n\t{\r\n\t\tif ($this->def->getField(\"name\"))\r\n\t\t\treturn $this->getValue(\"name\");\r\n\t\tif ($this->def->getField(\"title\"))\r\n\t\t\treturn $this->getValue(\"title\");\r\n\t\tif ($this->def->getField(\"subject\"))\r\n\t\t\treturn $this->getValue(\"subject\");\r\n\t\tif ($this->def->getField(\"full_name\"))\r\n\t\t\treturn $this->getValue(\"full_name\");\r\n\t\tif ($this->def->getField(\"first_name\"))\r\n\t\t\treturn $this->getValue(\"first_name\");\r\n\r\n\t\treturn $this->getId();\r\n\t}", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function name()\n {\n return $this->program->name.' '.$this->year;\n }", "public function getTestKitName2($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$test_kit_name_2_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($test_kit_name_2_)>0 ? $test_kit_name_2_ [0] ['test_kit_name_2'] : null;\n\t}", "public function getStudiesList() {\n return $this->_get(5);\n }", "public function get_student_name($user_id) {\n return Arr::get($this->_students, $user_id);\n }", "function addStudent($name, $institution, $major, $minor, $identification, $passkey, $google, $yahoo, $live, $facebook, $linkedin, $twitter){\n\n\t\t$this->connection->query(\"INSERT INTO students (stud_name, stud_inst, stud_major, stud_minor, stud_identification, stud_passkey, stud_google, stud_yahoo, stud_live, stud_facebook, stud_linkedin, stud_twitter) VALUES ('$name', '$institution', '$major', '$minor', '$identification', '$passkey', '$google', '$yahoo', '$live', '$facebook', '$linkedin', '$twitter' )\",true);\n\t\tif($_SESSION['query']){\n\t\t\treturn \"Student Successfully Added\";\n\t\t}else{\n\t\t\treturn \"Failed to add Student!\";\t\t\n\t\t}\t\n\n\t}", "public static function projectConversationParticipantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('projectConversationParticipant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "protected function getSequenceName(){}", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "public function getTrial()\n {\n return $this->trial;\n }", "public function getTrial()\n {\n return $this->trial;\n }", "public function getScenario()\n\t{\n\t\treturn $this->_se;\n\t}", "public function getSp1name()\n {\n return $this->sp1name;\n }", "function get_course_name($issuedcert) {\n global $DB;\n\n if ($issuedcert->coursename) {\n return $issuedcert->coursename;\n }\n\n $cm = get_coursemodule_from_instance('simplecertificate', $issuedcert->certificateid);\n if ($cm) {\n $course = $DB->get_record('coruse', array('id' => $cm->course));\n if ($course) {\n return $course->fullname;\n }\n }\n\n return get_string('coursenotfound', 'simplecertificate');\n}", "public function getSource()\n {\n return 'baiyang_mom_trial_report';\n }", "public function getEventName()\n {\n return $this->translate->_('Lookup answers in previous survey with the same survey code in track.');\n }", "private function formatSkill(string $skill): string\n {\n // First, remove all whitespace from the skill name.\n // Then, lowercase the entire skill.\n // Lastly, uppercase the first letter, to match the expected Skill key.\n return ucfirst(\n strtolower(\n preg_replace('/\\s/', '', $skill)\n )\n );\n }", "public function getSubjectName()\n {\n if (array_key_exists(\"subjectName\", $this->_propDict)) {\n return $this->_propDict[\"subjectName\"];\n } else {\n return null;\n }\n }" ]
[ "0.6861962", "0.6792853", "0.623606", "0.5847146", "0.5812718", "0.5683688", "0.55522424", "0.5541581", "0.5491312", "0.5356669", "0.5351869", "0.5297596", "0.5206098", "0.5153492", "0.51351804", "0.513271", "0.50789213", "0.5077319", "0.50191617", "0.49935588", "0.48870632", "0.48690754", "0.48672998", "0.48607492", "0.48522422", "0.48219538", "0.47741356", "0.47665668", "0.47356227", "0.4719677", "0.4698384", "0.46882924", "0.46614358", "0.46549585", "0.46534905", "0.46491587", "0.46397838", "0.46328244", "0.46051386", "0.46045813", "0.45859557", "0.4562053", "0.45576885", "0.4557553", "0.4555096", "0.4554534", "0.4552559", "0.45473245", "0.45304233", "0.45156333", "0.4515576", "0.45101467", "0.45073813", "0.45066068", "0.45056918", "0.44958466", "0.44932947", "0.4488654", "0.4487534", "0.4482095", "0.44801047", "0.4475387", "0.44742534", "0.44718468", "0.44669175", "0.44634432", "0.44594294", "0.44542578", "0.445083", "0.44480652", "0.44449404", "0.44411704", "0.44387096", "0.44301572", "0.44124576", "0.44099352", "0.4402974", "0.44024613", "0.43986538", "0.43938082", "0.43862563", "0.4382638", "0.43821314", "0.4375968", "0.43743932", "0.4374137", "0.4373747", "0.43729785", "0.43703082", "0.43676275", "0.4364885", "0.43584827", "0.43584827", "0.43579543", "0.43553218", "0.43550873", "0.43527627", "0.43514547", "0.4342325", "0.43400916" ]
0.6801605
1
The name of the Study that the Trial belongs to. Generated from protobuf field string study = 2;
public function setStudy($var) { GPBUtil::checkString($var, True); $this->study = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStudy()\n {\n return $this->study;\n }", "public function getStudy() {\n return $this->study;\n }", "public function study($study)\n {\n return $this->setProperty('study', $study);\n }", "public function getStudyNameAttribute() : array\n {\n return array_map(fn (Study $study) : string => $study->study(), $this->studies);\n }", "public function hasStudyName() {\n return $this->_has(9);\n }", "public function getStudyNameList() {\n return $this->_get(9);\n }", "function getId() {\n\t\treturn $this->getData('studyId');\n\t}", "public function addStudyName(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(9, $value);\n }", "public function getConceptName(): string\n {\n return \\ucfirst($this->toString());\n }", "public function get_samples_origin() {\n return 'course';\n }", "function getStudyInfo($connection, $idStudy){\n\t$query = \"SELECT * FROM vStudyWithTypeNames WHERE idStudy =\".$idStudy;\n\treturn fetchRowFromDBOnID($connection, $query, $idStudy, \"study\");\n}", "function study() {\n $this->studied = true;\n $this->_readframe();\n }", "public function get_study_types()\n\t{\n\t\treturn $this->study_types;\n\t}", "private function parseStudyInformation()\n {\n //\"FEEIT B-RK den [term 3, year 3]\"\n //\"ICSM FEEIT, ext FIIT\" //teacher\n\n if (str_contains($this->study_information, 'FEEIT I')) {\n $this->study_level = 2;\n $this->rank = substr($this->study_information, -2, 1) + 3;\n } elseif (str_contains($this->study_information, 'FEEIT B')) {\n $this->study_level = 1;\n $this->rank = substr($this->study_information, -2, 1);\n }\n }", "public function getStudentName()\n {\n return $this->workStudent->first_name . \" \" . $this->workStudent->last_name;\n }", "public function getTestName()\n {\n return $this->getField(5)[1];\n }", "public function addStudy($study) {\n $this->study[] = $study;\n return $this;\n }", "public function get_name()\r\n {\r\n \t$data = $this->get_exercise_data();\r\n \treturn $data['title'];\r\n }", "function track_name($tr) {\n switch ($tr) {\n case 'tr0': return 'Paper Presentation';\n case 'trp': return 'Poster Session';\n case 'trl': return 'Lightning Talk';\n case 'trw': return 'Workshop';\n case 'tri': return 'Installation';\n case 'tro': return 'Miscellaneous';\n case 'trm': return 'Concert';\n case 'trmS': return 'Sound Night';\n default: return '';\n }\n }", "function get_name($substance)\r\n {\r\n $data = $this->get_data($substance->pubchem);\r\n\r\n if(!$data)\r\n {\r\n return false;\r\n }\r\n\r\n return $data->name;\r\n }", "public function hasStudyAcronym() {\n return $this->_has(10);\n }", "public function setTrial($var)\n {\n GPBUtil::checkString($var, True);\n $this->trial = $var;\n\n return $this;\n }", "public function getName(): string {\n\t\treturn $this->lFactory->get('spreed')->t('Talk');\n\t}", "public static function participantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('participant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "public function hasStudyId() {\n return $this->_has(1);\n }", "public function caseStudyID($value = null)\n \t{\n \t\tif ($value != null) $this->caseStudyID = $value;\n \t\telse return $this->caseStudyID;\n \t}", "public function getName() {\n return $this->getTreatmentName();\n }", "public function subtitle()\n {\n return $this->resource->getName();\n }", "public function subject()\n {\n return $this->belongsTo(StudySubject::class, 'subject_id');\n }", "public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }", "public function getStudentId() {\n\t\tpreg_match ( '/\\d{9}/', $this->transcript, $ID ); // this will get the SID of the student\n\n\t\tif (count ( $ID ) > 0) {\n\t\t\t\t\n\t\t\t// $key= mt_rand ( MIN_KEY, MAX_KEY ); // will append a random key to the SI\n\t\t\treturn $ID [0]; // . strval($key);\n\t\t} else\n\t\t\treturn null;\n\t}", "public function hasStudyId() {\n return $this->_has(5);\n }", "public function getName()\n {\n return $this->str_name;\n }", "function get_title($substance)\r\n {\r\n $data = $this->get_data($substance->pubchem);\r\n\r\n if(!$data)\r\n {\r\n return false;\r\n }\r\n\r\n return $data->name;\r\n }", "function getStudentFullName() {\n\t\treturn Locale::translate('plugins.generic.thesis.studentFullName', array('lastName' => $this->getData('studentLastName'), 'firstName' => $this->getData('studentFirstName'), 'middleName' => $this->getData('studentMiddleName')));\n\t}", "public function getStudyByID($uuid)\n {\n $url = $this->url.\"/studies/\".$uuid;\n return $this->getContent2($url);\n }", "public function getSingularName()\n {\n return rtrim($this->name, 's');\n }", "public function getName(){ return $this->getField('name'); }", "function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}", "function getStudentMiddleName() {\n\t\treturn $this->getData('studentMiddleName');\n\t}", "function getSubjectsForStudy($theStudyID, $clientID) {\n global $definitions;\n\n $subjectItemTypeID = getClientItemTypeID_RelatedWith_byName($definitions['subject'], $clientID);\n $subjectStudy_PropID = getClientPropertyID_RelatedWith_byName($definitions['subjectStudyID'], $clientID);\n\n //First get the relation associated\n $returnProperties = array();\n\n //build an empty filter\n $filters = array();\n $filters[] = array('ID' => $subjectStudy_PropID, 'value' => $theStudyID);\n\n $subjects = getFilteredItemsIDs($subjectItemTypeID, $clientID, $filters, $returnProperties);\n\n return $subjects;\n\n}", "public function getSubject(): string\n {\n return $this->getPayloadClaim('sub');\n }", "public function addStudies(\\obiba\\mica\\StudyDto $value) {\n return $this->_add(2, $value);\n }", "public function message()\n {\n return 'Only 1 unique exercise name per user.';\n }", "public function hasStudies() {\n return $this->_has(2);\n }", "public function getTestKitName1($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$test_kit_name_1_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($test_kit_name_1_)>0 ? $test_kit_name_1_ [0] ['test_kit_name_1'] : null;\n\t}", "public function addStudyAcronym(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(10, $value);\n }", "public function studyPage(StudyInfoPage $page)\n {\n $all = $this->getNavPages();\n $i = array_search($page->id, array_keys($all));\n $prev = ['url'=> url('/study'), 'title'=>'Назад'];\n $next = [];\n if ($i > 1) {\n $prev = ['url' => url('/study/'.($i+1)), 'title'=>$all[$i+1]];\n }\n if ($i+1 < count($all)) {\n $next = ['url' => url('/study/'.($i+3)), 'title'=>$all[$i + 3]];\n }\n return view('pages.projects.study',\n ['page' => $page, 'all' => $all, 'prev' => $prev, 'next' => $next]);\n }", "function surveyCodeToName($surveyCode) {\n\tswitch($surveyCode) {\n\t\tcase HW_PROJECT_VALUE:\n\t\t\treturn HW_PROJECT_NAME;\n\t\tcase CHD_PROJECT_VALUE:\n\t\t\treturn CHD_PROJECT_NAME;\n\t\tcase COMB_PROJECT_VALUE:\n\t\t\treturn COMB_PROJECT_NAME;\n\t}\n}", "function setId($studyId) {\n\t\treturn $this->setData('studyId', $studyId);\n\t}", "public function name(): string\n {\n return $this->pluck('trophyTitleName');\n }", "public function getStNo(){\n return $this->student_no;\n }", "public function hasStudies() {\n return $this->_has(4);\n }", "public function getStationName(): string\n {\n return $this->name;\n }", "public static function getTubeName();", "public function getInsuranceName()\n {\n return \"Sigma\";\n }", "public function getStudyAcronymList() {\n return $this->_get(10);\n }", "function addSensSpec() {\n\t\t$data =&$this->params['form'];\n\t\t// Create the Sensitivity object\n\t\t$this->Sensitivity->create(\n\t\t\tarray(\"study_id\" =>$data['study_id'],\n\t\t\t\t\"sensitivity\"=>$data['sensitivity'],\n\t\t\t\t\"specificity\"=>$data['specificity'],\n\t\t\t\t\"prevalence\" =>$data['prevalence'],\n\t\t\t\t\"specificAssayType\" => $data['specificAssayType'],\n\t\t\t\t\"notes\"=>$data['sensspec_details'])\n\t\t\t);\n\t\t$this->Sensitivity->save();\n\t\t$sensitivity_id = $this->Sensitivity->getLastInsertId();\n\t\t\n\t\t// Create the HABTM link\n\t\t$this->checkSession(\"/biomarkers/organs/{$data['biomarker_id']}/{$data['organ_data_id']}\");\n\t\t$this->StudyData->habtmAdd('Sensitivity',$data['study_data_id'],$sensitivity_id);\n\t\t// Redirect\n\t\t$this->redirect(\"/biomarkers/organs/{$data['biomarker_id']}/{$data['organ_data_id']}\");\n\t}", "function getTitle(&$record){\n $type = array('H' => 'Hydrological Station', 'M'=>'Meteorological Station');\n $title = \"\".$type[$record->val('type_station')].\" - id: \".$record->val('id_station');\n \n return $title;\n }", "public function getSubjectName()\n {\n $subjectName = $this->getCourse()->getName();\n if ($this->getSubject()) {\n $subjectName = $this->getSubject()->getName();\n }\n return $subjectName;\n }", "function getName () {return $this->getFieldValue ('name');}", "public function hasStudySummary() {\n return $this->_has(7);\n }", "function MP3_Id($study = false) {\n if(defined('ID3_SHOW_DEBUG')) $this->debug = true;\n $this->study=($study || defined('ID3_AUTO_STUDY'));\n\n }", "abstract public function getDetailedReportName();", "public function getParticipantLabel()\n\t{\n\t\treturn $this->getContext()->getParticipantLabel();\n\t}", "public function getStudiesList() {\n return $this->_get(2);\n }", "function getStudentLastName() {\n\t\treturn $this->getData('studentLastName');\n\t}", "function getCurTrackName(){\n\n\t}", "public function hasStudyTable() {\n return $this->_has(1);\n }", "public function __toString(): string\n {\n $context = [];\n foreach ($this->solution as $key => $value) {\n $context[] = \"$key=$value\";\n }\n return '[Twilio.Insights.V1.ConferenceParticipantInstance ' . \\implode(' ', $context) . ']';\n }", "public function getQuestion(): string\n {\n return $this->question;\n }", "public function attributeLabels()\n\t{\n return array(\n 'id'=>Yii::t('study','ID'),\n 'chapter_name'=>Yii::t('study','chapter name'),\n 'title_code'=>Yii::t('study','question code'),\n 'title_type'=>Yii::t('study','question type'),\n 'name'=>Yii::t('study','question name'),\n 'display'=>Yii::t('study','display'),\n 'remark'=>Yii::t('study','Interpretation'),\n\n 'answer'=>Yii::t('study','correct answer'),\n 'answer_a'=>Yii::t('study','wrong answer A'),\n 'answer_b'=>Yii::t('study','wrong answer B'),\n 'answer_c'=>Yii::t('study','wrong answer C'),\n );\n\t}", "public function getSliceName() {\n return $this->sliceName;\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function studyDataSave() {\n $id = ConstantFuntion::encryptDecrypt('decrypt', $this->params('id', 0));\n $studyObj = $this->getStudyObj($id);\n $this->form->bind($studyObj);\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $this->form->setData($request->getPost());\n $postData = $request->getPost('study');\n $newCompanyIds = [];\n if ($id != 0) {\n $newCompanyIds = $this->getNewCompanyIds($postData, $studyObj);\n }\n if ($this->form->isValid()) {\n $em = $this->getEntityManager();\n try {\n $em->persist($studyObj);\n $em->flush();\n if ($id == 0) {\n $this->saveMessage($studyObj);\n // $this->saveStudyDocument($studyObj); // this is commented as discussed with devang\n }\n\t\t if($studyObj->getStatus() == '2') {\n\t\t\t$this->updateMessage($studyObj);\n\t\t }\n $this->prepareMailToCompany($postData, $newCompanyIds);\n } catch (\\Exception $ex) {\n throw new \\Exception($ex->getMessage());\n }\n $this->flashMessenger()->addSuccessMessage($postData['protocol'] . ' ' . $this->translate('study details has been saved.'));\n\t\tif ($id == 0) {\n\t\t return $this->redirect()->toRoute('study', array('action' => 'index','id'=>1));\n\t\t}\n\t\treturn $this->redirect()->toRoute('study', array('action' => 'index'));\n }\n }\n }", "private function getInterstName() {\n\t\t\treturn $this->interest->getName();\n\t\t}", "public function getSingularName();", "public function setCourseName()\n {\n // Set the font.\n $this->AddFont('MTCORSVA', '', 'MTCORSVA.php');\n $this->SetFont('MTCORSVA', '', 18);\n\n // Line break.\n $this->Ln(12);\n\n $this->Cell(259, 35, 'for having attended the training entitled', 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 27);\n\n // Line break.\n $this->Ln(13);\n\n $this->Cell(259, 35, $this->aScheduleDetails['courseName'], 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 18);\n\n // Line break.\n $this->Ln(11);\n\n if (empty($this->aScheduleDetails['courseDescription']) === false) {\n $this->Cell(259, 35, $this->aScheduleDetails['courseDescription'], 0, 0, 'C');\n }\n }", "public function get_student_id() {\n\t\t\treturn $this->student_id;\n\t\t}", "public function nice_name(){\n return 'Anno scolastico '.$this->first_day_first_semester->year.'-'\n .$this->last_day_second_semester->year;\n }", "public function getTreatmentName() {\n return $this->_treatment_name;\n }", "public function getName()\r\n\t{\r\n\t\tif ($this->def->getField(\"name\"))\r\n\t\t\treturn $this->getValue(\"name\");\r\n\t\tif ($this->def->getField(\"title\"))\r\n\t\t\treturn $this->getValue(\"title\");\r\n\t\tif ($this->def->getField(\"subject\"))\r\n\t\t\treturn $this->getValue(\"subject\");\r\n\t\tif ($this->def->getField(\"full_name\"))\r\n\t\t\treturn $this->getValue(\"full_name\");\r\n\t\tif ($this->def->getField(\"first_name\"))\r\n\t\t\treturn $this->getValue(\"first_name\");\r\n\r\n\t\treturn $this->getId();\r\n\t}", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function name()\n {\n return $this->program->name.' '.$this->year;\n }", "public function getStudiesList() {\n return $this->_get(5);\n }", "public function getTestKitName2($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$test_kit_name_2_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($test_kit_name_2_)>0 ? $test_kit_name_2_ [0] ['test_kit_name_2'] : null;\n\t}", "function addStudent($name, $institution, $major, $minor, $identification, $passkey, $google, $yahoo, $live, $facebook, $linkedin, $twitter){\n\n\t\t$this->connection->query(\"INSERT INTO students (stud_name, stud_inst, stud_major, stud_minor, stud_identification, stud_passkey, stud_google, stud_yahoo, stud_live, stud_facebook, stud_linkedin, stud_twitter) VALUES ('$name', '$institution', '$major', '$minor', '$identification', '$passkey', '$google', '$yahoo', '$live', '$facebook', '$linkedin', '$twitter' )\",true);\n\t\tif($_SESSION['query']){\n\t\t\treturn \"Student Successfully Added\";\n\t\t}else{\n\t\t\treturn \"Failed to add Student!\";\t\t\n\t\t}\t\n\n\t}", "public function get_student_name($user_id) {\n return Arr::get($this->_students, $user_id);\n }", "public static function projectConversationParticipantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('projectConversationParticipant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "protected function getSequenceName(){}", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "public function getScenario()\n\t{\n\t\treturn $this->_se;\n\t}", "public function getTrial()\n {\n return $this->trial;\n }", "public function getTrial()\n {\n return $this->trial;\n }", "public function getSp1name()\n {\n return $this->sp1name;\n }", "public function getSource()\n {\n return 'baiyang_mom_trial_report';\n }", "function get_course_name($issuedcert) {\n global $DB;\n\n if ($issuedcert->coursename) {\n return $issuedcert->coursename;\n }\n\n $cm = get_coursemodule_from_instance('simplecertificate', $issuedcert->certificateid);\n if ($cm) {\n $course = $DB->get_record('coruse', array('id' => $cm->course));\n if ($course) {\n return $course->fullname;\n }\n }\n\n return get_string('coursenotfound', 'simplecertificate');\n}", "public function getEventName()\n {\n return $this->translate->_('Lookup answers in previous survey with the same survey code in track.');\n }", "private function formatSkill(string $skill): string\n {\n // First, remove all whitespace from the skill name.\n // Then, lowercase the entire skill.\n // Lastly, uppercase the first letter, to match the expected Skill key.\n return ucfirst(\n strtolower(\n preg_replace('/\\s/', '', $skill)\n )\n );\n }", "public static function participantName($project, $conversation, $participant)\n {\n return self::getParticipantNameTemplate()->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }" ]
[ "0.6801654", "0.67929095", "0.62360054", "0.5846423", "0.58127", "0.56817496", "0.55520034", "0.5541691", "0.54908645", "0.5356461", "0.5350699", "0.52990466", "0.5205343", "0.5152842", "0.5133147", "0.5130118", "0.50790954", "0.50769526", "0.50185114", "0.4992704", "0.48871762", "0.48690242", "0.48662072", "0.48606122", "0.48527884", "0.48218647", "0.47730416", "0.4765997", "0.47351173", "0.47180712", "0.46979314", "0.46886626", "0.46603486", "0.4653872", "0.46532273", "0.4649595", "0.46396065", "0.46310714", "0.4605461", "0.4601847", "0.45851812", "0.45607972", "0.4557887", "0.45568576", "0.45552906", "0.45536157", "0.4552903", "0.45478585", "0.45305187", "0.45155013", "0.45145097", "0.45094797", "0.4508105", "0.45055687", "0.45048144", "0.44953752", "0.44919604", "0.44893909", "0.44888142", "0.44802925", "0.4478305", "0.4476719", "0.44736508", "0.4471721", "0.44667235", "0.4462619", "0.4456822", "0.44542527", "0.44511327", "0.44492102", "0.44446343", "0.44412073", "0.44370782", "0.44287786", "0.44113356", "0.44110882", "0.44031104", "0.4401339", "0.43974578", "0.43933743", "0.43850836", "0.43811682", "0.43810466", "0.4375777", "0.43732935", "0.43725562", "0.43723682", "0.43718436", "0.43702748", "0.43669778", "0.4364306", "0.43586153", "0.4357729", "0.4357729", "0.4355145", "0.43539125", "0.43534994", "0.43516865", "0.43407676", "0.43388996" ]
0.68623024
0
The Trial name. Generated from protobuf field string trial = 3;
public function getTrial() { return $this->trial; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTrial($var)\n {\n GPBUtil::checkString($var, True);\n $this->trial = $var;\n\n return $this;\n }", "public function setTrial($var)\n {\n GPBUtil::checkBool($var);\n $this->trial = $var;\n }", "public function getTestName()\n {\n return $this->getField(5)[1];\n }", "static public function get_name_string() {\n return get_string(self::NAME_CODE_STRING, 'gradereport_progress');\n }", "public static function getTubeName();", "public function getName(){\n return $this->game->get_current_turn()->ReturnName();\n }", "public function getName(): string {\n\t\treturn $this->lFactory->get('spreed')->t('Talk');\n\t}", "public static function participantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('participant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "function track_name($tr) {\n switch ($tr) {\n case 'tr0': return 'Paper Presentation';\n case 'trp': return 'Poster Session';\n case 'trl': return 'Lightning Talk';\n case 'trw': return 'Workshop';\n case 'tri': return 'Installation';\n case 'tro': return 'Miscellaneous';\n case 'trm': return 'Concert';\n case 'trmS': return 'Sound Night';\n default: return '';\n }\n }", "protected function getNewProjectName() {\n\t\tdo {\n\t\t\t$t_name = $this->getName() . '_' . rand();\n\t\t\t$t_id = $this->client->mc_project_get_id_from_name( $this->userName, $this->password, $t_name );\n\t\t} while( $t_id != 0 );\n\t\treturn $t_name;\n\t}", "public function getName()\n {\n return \"The Proving Grounds\";\n }", "public function message()\n {\n return 'Only 1 unique exercise name per user.';\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function getParticipantLabel()\n\t{\n\t\treturn $this->getContext()->getParticipantLabel();\n\t}", "public function getTskName()\n {\n return $this->tsk_name;\n }", "public function getName()\n {\n \treturn \"payfort Check Status\";\n }", "public function getName()\n {\n return 'simplethings_formextra_validation';\n }", "protected function getTypeNameAttribute()\n {\n return trans('action_plan.goals.'.$this->type.'.label');\n }", "public function getName(): string\n {\n return $this->fqsen->getName();\n }", "public function getName()\n {\n return $this->str_name;\n }", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }", "public static function participantName($project, $conversation, $participant)\n {\n return self::getParticipantNameTemplate()->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}", "public function getName()\n \n {\n $letters = range('A', 'Z');\n $number = str_pad(rand(1, 999), 3, '0', STR_PAD_LEFT);\n $name = array_rand($letters, 2);\n $newName = $letters[$name[0]] . $letters[$name[1]] . $number;\n $usedNaes = array_unique(explode( \" \", $newName));\n $newName = array_unique($usedNaes);\n \n\n return (implode($newName));\n }", "public function getNameTran(){\n $qwery = 'name_'.app()->getLocale();\n return $this->$qwery;\n }", "public function getNameT()\n {\n return $this->name_t;\n }", "public function getTrialSignupHostAndScheme(): string\n {\n return $this->getIntegrationSetup()->getTrialSignupHostAndScheme();\n }", "public function getName() {\n\t\t$partyName = current($this->getPartyNames()->toArray());\n\t\treturn (string)$partyName;\n\t}", "function getName () {return $this->getFieldValue ('name');}", "public function get_input_name() {\n\t\treturn 'input_' . md5( 'recaptchav3' . gf_recaptcha()->get_version() . $this->formId );\n\t}", "public function addPassTrialSubscriptionRequest()\n {\n\n $resourcePath = '/subscriptions/paas/trial';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function getSubmittedRealName() {\n\t\treturn $this->data_array['realname'];\n\t}", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "function GetTrialInformation()\n\t{\n\t\t$agency_edition_variables = get_agency_license_variables();\n\t\t$return = array('days_used' => 0, 'days_left' => 0, 'days_total' => 0);\n\n\t\tif (empty($agency_edition_variables['agencyid']) || !$this->trialuser) {\n\t\t\treturn $return;\n\t\t}\n\n\t\t$days_used = intval((time() - $this->createdate) / 86400);\n\t\t$days_remaining = $agency_edition_variables['trial_days'] - $days_used;\n\n\t\t$return['days_used'] = $days_used;\n\t\t$return['days_left'] = $agency_edition_variables['trial_days'] - $days_used;\n\t\t$return['days_total'] = $agency_edition_variables['trial_days'];\n\n\t\treturn $return;\n\t}", "public function getTName()\n {\n return $this->t_name;\n }", "public function getName()\n {\n return $this->fqsen->getName();\n }", "public function getTempName() {}", "public static function chkTrialKey_wp() {\n\t\theader('Content-Type: application/json');\n\t\tglobal $acc;\n\n\t\t$response = array(\n\t\t\t'valid' => false,\n\t\t\t'id' => 0,\n\t\t\t'name' => 'Invalid code',\n\t\t\t'length' => 'Invalid code',\n\t\t\t'payment' => false,\n\t\t\t'amount' => 0,\n\t\t);\n\n\t\ttry {\n\t\t\tif(!isset($_REQUEST[\"rc\"]) || empty($_REQUEST[\"rc\"])) {\n\t\t\t\tthrow new \\Exception( 'Empty input', 0 );\n\t\t\t}\n\n\t\t\t$codes = \\WPSF\\TrialCode::get_code( $_REQUEST['rc'] );\n\n\t\t\tif ( is_wp_error( $codes ) || empty( $codes[0]['Id'] ) ) {\n\t\t\t\tthrow new \\Exception( 'Invalid code', 0 );\n\t\t\t}\n\t\t\t\n\t\t\t$response = array(\n\t\t\t\t'valid' => true,\n\t\t\t\t'id' => $codes[0]['Id'],\n\t\t\t\t'trialname' => $codes[0]['Name'],\n\t\t\t\t'name' => $codes[0]['Membership']['Name'],\n\t\t\t\t'length' => $codes[0]['Period'],\n\t\t\t\t'payment' => ( empty( $codes[0]['Payment'] ) ? false : true ) ,\n\t\t\t\t'amount' => $codes[0]['Amount'],\n\t\t\t\t'pagetext' => $codes[0]['Page_Text__c'],\n\t\t\t);\n\t\t\t\n\t\t} catch( \\Exception $e ) {\n\t\t\t$response = array(\n\t\t\t\t'valid' => false,\n\t\t\t\t'id' => 0,\n\t\t\t\t'name' => $e->getMessage(),\n\t\t\t\t'length' => $e->getMessage(),\n\t\t\t\t'err' => $e->getMessage(),\n\t\t\t\t'payment' => false,\n\t\t\t\t'amount' => 0,\n\t\t\t\t'pagetext' => '',\n\t\t\t);\n\t\t}\n\n\t\tprint json_encode( $response );\n\t\texit();\n\t}", "public function shortName(): String\n {\n return $this->shortNames[$this->suit];\n }", "public function get_name()\r\n {\r\n \t$data = $this->get_exercise_data();\r\n \treturn $data['title'];\r\n }", "public static function identifier()\n\t{\n\t\treturn 'thank-you';\n\t}", "public function getName(): string\n {\n return match ($this) {\n self::Debug => 'DEBUG',\n self::Info => 'INFO',\n self::Notice => 'NOTICE',\n self::Warning => 'WARNING',\n self::Error => 'ERROR',\n self::Critical => 'CRITICAL',\n self::Alert => 'ALERT',\n self::Emergency => 'EMERGENCY',\n };\n }", "public function getName()\n {\n return Craft::t('Charge Subscriber');\n }", "public function getNamaChallenge();", "final public function name():string\n {\n return $this->name;\n }", "public function getQuestWord()\n {\n return $this->quest;\n }", "public function getCheckName(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return 'Tinkoff';\n }", "public function getConceptName(): string\n {\n return \\ucfirst($this->toString());\n }", "public function getName(){ return $this->getField('name'); }", "function getChallengeName($challenge_id) {\n $challenges = challenges();\n return $challenges[$challenge_id]['name'];\n}", "public function getName()\n {\n // TODO: Implement getName() method.\n return 'MyTwExtension';\n }", "public function getName()\r\n {\r\n $name = $this->properties['transmittable_display_name'] ?? $this->properties['display_name'] ?? '';\r\n return preg_replace('/^\\'(.*)\\'/', '\\1', $name);\r\n }", "public function get_name() {\n return get_string('pluginname', 'assignfeedback_helixfeedback');\n }", "public function getTmpName()\n\t{\n\t\treturn $this->tmpName;\n\t}", "public function getLabel() {\n\t\t$label = '';\n\t\tif($this->registration) {\n\t\t\t$label = $this->registration->competition->getFullName().', '.Yii::$app->formatter->asDate($this->registration->competition->start_date);\n\t\t\t$golfer_str = $this->player->name.' ('.$this->player->handicap.')';\n\t\t\t$label .= ' — '.$golfer_str;\n\t\t} else {\n\t\t\t$label = $this->practice->course->getFullName();\n\t\t\t$golfer_str = $this->player->name.' ('.$this->player->handicap.')';\n\t\t\t$label .= ' — '.$golfer_str;\n\t\t}\n\t\treturn $label;\n\t}", "public function get_name() {\n\t\treturn 'team';\n\t}", "private function generateUsername() {\n $name = \"\";\n $name = $this->generator->generateString(4, '2346789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXYZ');\n $table = 'participant_data';\n $conditions = array('passcode' => $name);\n $existing_users = $this->getListFromDB($table, $conditions);\n if (empty($existing_users)) {\n return $name; \n }\n else {\n return $this->generateUsername();\n }\n \n }", "public function getJwtId(): string\n {\n return $this->getPayloadClaim('jti');\n }", "public function randomName() {}", "public function get_trial()\n {\n /*\n * retrieve general ledger to convert into trial balance.\n * loop through ledger data and accumulate debit and credit as normal position.\n */\n $ledger = $this->get_general_ledger();\n $trial = array();\n\n foreach ($ledger as $table) {\n $total_debit = 0;\n $total_credit = 0;\n\n /*\n * loop through general table, accumulate each account table.\n * if normal position is debit then debit transaction will increase the balance.\n * credit transaction will decrease the balance.\n * if normal position is credit then credit transaction will increase the balance.\n * debit transaction will decrease the balance.\n */\n foreach ($table as $row) {\n if ($row[\"position\"] == \"DEBITS\") {\n if ($row[\"debit\"] == \"-\") {\n $total_debit -= $row[\"credit\"];\n } else {\n $total_debit += $row[\"debit\"];\n }\n } else if ($row[\"position\"] == \"CREDITS\") {\n if ($row[\"debit\"] == \"-\") {\n $total_credit += $row[\"credit\"];\n } else {\n $total_credit -= $row[\"debit\"];\n }\n }\n }\n\n // populate data into array and push as trial balance array as balance account\n $account = array(\n \"account_id\" => $table[0][\"account_id\"],\n \"account\" => $table[0][\"account\"],\n \"debit\" => $total_debit,\n \"credit\" => $total_credit,\n \"position\" => $table[0][\"position\"],\n );\n\n array_push($trial, $account);\n }\n\n return $trial;\n }", "public static function featureName()\n\t{\n\t\treturn __( 'Embedded Tweet', 'twitter' );\n\t}", "public function getTimerName()\n\t\t{\n\t\t\treturn \"({$this->today}) \" . $this->timer_name;\n\t\t}", "public function getName()\n {\n return 'test';\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function LiveName()\n {\n return $this->Name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function getTxtRecord()\n {\n $challenge = $this->getDnsChallenge();\n if ($challenge !== false) {\n $hash = hash('sha256', $challenge->getToken() . '.' . $this->digest, true);\n $value = Helper::toSafeString($hash);\n return new Record('_acme-challenge.' . $this->getDomain(), $value);\n }\n\n return false;\n }", "public function get_name() {\n return get_string('circleci', 'assignsubmission_circleci');\n }", "final public function name(): string\n {\n return $this->name;\n }", "public function generateUsername()\n {\n $dir = \"@Give2PeerBundle/Resources/config/\";\n $path = $this->get('kernel')->locateResource($dir . 'game.yml');\n\n $words = Yaml::parse(file_get_contents($path));\n\n $adjectives = array_merge(\n $words['quantity']\n ,$words['quality']\n ,$words['size']\n ,$words['age']\n ,$words['shape']\n ,$words['color']\n ,$words['origin']\n ,$words['material']\n ,$words['qualifier']\n );\n \n $beings = $words['being'];\n\n $a1 = $a2 = '';\n $i = 0; // BAD. pop out of $adjectives instead ?\n while ($a1 == $a2 && $i < 42) {\n $i1 = array_rand($adjectives);\n $i2 = array_rand($adjectives);\n $a1 = $adjectives[min($i1, $i2)];\n $a2 = $adjectives[max($i1, $i2)];\n $i++;\n }\n\n if ($a1 == $a2) { // we have a lottery winner\n $a1 = \"Incredibly\";\n $a2 = \"Unlucky\";\n }\n\n $b = $beings[array_rand($beings)];\n\n $x = random_int(0, 9);\n $y = random_int(0, 9);\n $z = random_int(0, 9);\n \n // About 406 billion right now\n // $nb = count($beings) * (count($adjectives) ** 2) * 1000;\n // print(\"Possibilities : $nb\\n\");\n\n return \"${a1} ${a2} ${b} ${x}${y}${z}\";\n }", "function generateFeatureName($feature_type) {\n\twriteLog(\"generateFeatureName()\");\n\t\n\tsrand();\n\t$syllables = rand(2,4);\n\twriteLog(\"generateFeatureName(): Type: \" . $feature_type);\n\t$name = \"\";\n\t\n\tfor ($s = 0; $s < $syllables; $s++) {\n\t\t\n\t\t$consonant = \"a\";\n\t\twhile ($consonant == \"a\" || $consonant == \"e\"|| $consonant == \"i\" || $consonant == \"o\" || $consonant == \"u\") {\n\t\t\t$consonant = chr(rand(97, 122));\n\t\t}\n\t\twriteLog(\"generateFeatureName(): Consonant: \" . $consonant);\n\t\t\n\t\t$vowel = \"x\";\n\t\twhile ($vowel != \"a\" && $vowel != \"e\" && $vowel != \"i\" && $vowel != \"o\" && $vowel != \"u\") {\n\t\t\t$vowel = chr(rand(97, 122));\n\t\t}\n\t\twriteLog(\"generateFeatureName(): Vowel: \" . $vowel);\n\t\t\n\t\t$name = $name . $consonant . $vowel;\n\t\t$consonant = \"a\";\n\t\t$vowel = \"x\";\n\t\t\n\t}\n\t\n\t$name = $name . \" \" . $feature_type;\n\t\n\twriteLog(\"generateFeatureName(): Name: \" . $name);\n\t\n\treturn ucwords($name);\n\t\n}", "function getStepName()\r\n {\r\n return $this->_currentStep;\r\n }", "public static function name()\n {\n return 'pares';\n }", "public static function GetCallingStepName()\n {\n $sCallingStepName = null;\n if (array_key_exists(self::SESSION_KEY_NAME, $_SESSION)) {\n $sCallingStepName = $_SESSION[self::SESSION_KEY_NAME];\n }\n\n return $sCallingStepName;\n }", "public function get_name() {\n return get_string('pluginname', 'local_whiacohortsync');\n }", "public static function projectConversationParticipantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('projectConversationParticipant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "public function setTrialPeriod($trialPeriod)\n {\n $this->trialPeriod = $this->limitLength($trialPeriod, 10);\n return $this;\n }", "public function getWf_name()\n {\n return $this->wf_name;\n }", "public function _getTestKitName3() {\n\t\treturn $this->_testKitName3;\n\t}", "public function name(): string\n {\n return $this->pluck('trophyTitleName');\n }", "public function message()\n {\n return 'The fields [Team ID, Phone and Sticky Phone Number ID] are required';\n }", "public function getName(): string\n {\n return $this->account->account_name ?? '';\n }", "protected function getGameName( )\n {\n return \"pi\";\n }", "protected function LiveName()\n {\n $finalString = _t('OrderModifier.TAXCOULDNOTBEDETERMINED', 'tax could not be determined');\n $countryCode = $this->LiveCountry();\n $startString = '';\n $name = '';\n $endString = '';\n $taxObjects = $this->currentTaxObjects();\n if ($taxObjects) {\n $objectArray = [];\n foreach ($taxObjects as $object) {\n $objectArray[] = $object->Name;\n }\n if (count($objectArray)) {\n $name = implode(', ', $objectArray);\n }\n if ($this->config()->get('exclusive_explanation') && $this->isExclusive()) {\n $endString = $this->config()->get('exclusive_explanation');\n } elseif ($this->Config()->get('inclusive_explanation') && $this->isInclusive()) {\n $endString = $this->Config()->get('inclusive_explanation');\n }\n if ($name) {\n $finalString = $startString . $name . $endString;\n }\n } else {\n if ($this->hasExceptionTaxes()) {\n $finalString = $this->Config()->get('no_tax_description');\n }\n }\n if ($countryCode && $finalString) {\n $countryName = EcommerceCountry::find_title($countryCode);\n if ($this->Config()->get('based_on_country_note') && $countryName && $countryCode !== self::get_default_country_code_combined()) {\n $finalString .= $this->Config()->get('based_on_country_note') . ' ' . $countryName;\n }\n }\n\n return $finalString;\n }", "public function getQuestion(): string\n {\n return $this->question;\n }", "public function getName():string\n {\n return $this->name;\n }", "public function name() {\n return $this->name;\n }", "public function toString() {\n echo \"<br>\" . $this->getUserName() . \"<br>\" . \"Japanese Skill: \" . \n $this->getJapSkillString() . \"<br>\" . \"English Skill: \" . $this->getEngSkillString() . \"<br>\";\n }", "public function getTmpName()\n {\n return $this->tmpName;\n }", "public function getTrialInfo(Request $request){\n $id = $request->id;\n\n if($request->planned === 'true'){\n $trial = Trials::with('sport')->with('user')->find($id);\n $teams = Teams::where('sports_id','=', $trial->sports_id)->get();\n return response()->json([\n 'trial' => $trial,\n 'teams' => $teams\n ]);\n }else{\n $trial_request = TrialRequests::with('sport')->with('user')->find($id);\n return response()->json($trial_request);\n }\n }", "function getSubmittedRealName() {\n\t\treturn $this->data_array['submitted_realname'];\n\t}", "public function name() { return $this->name; }" ]
[ "0.6959069", "0.60511255", "0.56788844", "0.5525171", "0.54144335", "0.53606683", "0.53512686", "0.53417104", "0.5328052", "0.5311915", "0.517964", "0.5170651", "0.51238775", "0.50966567", "0.5058289", "0.50356996", "0.50350535", "0.50313056", "0.5023662", "0.5021137", "0.5013835", "0.50137633", "0.5010606", "0.50093186", "0.4993524", "0.49844912", "0.49837828", "0.49817443", "0.49515373", "0.49209747", "0.49169248", "0.4904926", "0.49035412", "0.48989514", "0.48930857", "0.48925486", "0.489212", "0.48894197", "0.4888388", "0.48807937", "0.48686004", "0.48673987", "0.486139", "0.48599887", "0.48585397", "0.48579955", "0.48578617", "0.4857436", "0.4857382", "0.4851891", "0.48500788", "0.48480868", "0.48454148", "0.48382983", "0.48324838", "0.48306277", "0.48277414", "0.48265356", "0.48249537", "0.48097688", "0.48086283", "0.4804141", "0.4802932", "0.4794324", "0.47899744", "0.47809386", "0.4776991", "0.4776991", "0.47715557", "0.47683552", "0.47683552", "0.47683552", "0.47683552", "0.47674543", "0.47580856", "0.47537017", "0.47516373", "0.47464967", "0.47459513", "0.47422335", "0.4741526", "0.47401395", "0.4738721", "0.47378263", "0.47339222", "0.4733832", "0.47319287", "0.47274226", "0.47270557", "0.47229996", "0.4722971", "0.47161698", "0.47159046", "0.47149095", "0.47090492", "0.47020045", "0.469937", "0.46966982", "0.46956477" ]
0.6641656
2
The Trial name. Generated from protobuf field string trial = 3;
public function setTrial($var) { GPBUtil::checkString($var, True); $this->trial = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTrial()\n {\n return $this->trial;\n }", "public function getTrial()\n {\n return $this->trial;\n }", "public function setTrial($var)\n {\n GPBUtil::checkBool($var);\n $this->trial = $var;\n }", "public function getTestName()\n {\n return $this->getField(5)[1];\n }", "static public function get_name_string() {\n return get_string(self::NAME_CODE_STRING, 'gradereport_progress');\n }", "public static function getTubeName();", "public function getName(){\n return $this->game->get_current_turn()->ReturnName();\n }", "public function getName(): string {\n\t\treturn $this->lFactory->get('spreed')->t('Talk');\n\t}", "public static function participantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('participant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "function track_name($tr) {\n switch ($tr) {\n case 'tr0': return 'Paper Presentation';\n case 'trp': return 'Poster Session';\n case 'trl': return 'Lightning Talk';\n case 'trw': return 'Workshop';\n case 'tri': return 'Installation';\n case 'tro': return 'Miscellaneous';\n case 'trm': return 'Concert';\n case 'trmS': return 'Sound Night';\n default: return '';\n }\n }", "protected function getNewProjectName() {\n\t\tdo {\n\t\t\t$t_name = $this->getName() . '_' . rand();\n\t\t\t$t_id = $this->client->mc_project_get_id_from_name( $this->userName, $this->password, $t_name );\n\t\t} while( $t_id != 0 );\n\t\treturn $t_name;\n\t}", "public function getName()\n {\n return \"The Proving Grounds\";\n }", "public function message()\n {\n return 'Only 1 unique exercise name per user.';\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function getParticipantLabel()\n\t{\n\t\treturn $this->getContext()->getParticipantLabel();\n\t}", "public function getTskName()\n {\n return $this->tsk_name;\n }", "public function getName()\n {\n \treturn \"payfort Check Status\";\n }", "public function getName()\n {\n return 'simplethings_formextra_validation';\n }", "protected function getTypeNameAttribute()\n {\n return trans('action_plan.goals.'.$this->type.'.label');\n }", "public function getName(): string\n {\n return $this->fqsen->getName();\n }", "public function getName()\n {\n return $this->str_name;\n }", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }", "public static function participantName($project, $conversation, $participant)\n {\n return self::getParticipantNameTemplate()->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}", "public function getName()\n \n {\n $letters = range('A', 'Z');\n $number = str_pad(rand(1, 999), 3, '0', STR_PAD_LEFT);\n $name = array_rand($letters, 2);\n $newName = $letters[$name[0]] . $letters[$name[1]] . $number;\n $usedNaes = array_unique(explode( \" \", $newName));\n $newName = array_unique($usedNaes);\n \n\n return (implode($newName));\n }", "public function getNameTran(){\n $qwery = 'name_'.app()->getLocale();\n return $this->$qwery;\n }", "public function getNameT()\n {\n return $this->name_t;\n }", "public function getTrialSignupHostAndScheme(): string\n {\n return $this->getIntegrationSetup()->getTrialSignupHostAndScheme();\n }", "public function getName() {\n\t\t$partyName = current($this->getPartyNames()->toArray());\n\t\treturn (string)$partyName;\n\t}", "function getName () {return $this->getFieldValue ('name');}", "public function get_input_name() {\n\t\treturn 'input_' . md5( 'recaptchav3' . gf_recaptcha()->get_version() . $this->formId );\n\t}", "public function addPassTrialSubscriptionRequest()\n {\n\n $resourcePath = '/subscriptions/paas/trial';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function getSubmittedRealName() {\n\t\treturn $this->data_array['realname'];\n\t}", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function getTName()\n {\n return $this->t_name;\n }", "public function getName()\n {\n return $this->fqsen->getName();\n }", "function GetTrialInformation()\n\t{\n\t\t$agency_edition_variables = get_agency_license_variables();\n\t\t$return = array('days_used' => 0, 'days_left' => 0, 'days_total' => 0);\n\n\t\tif (empty($agency_edition_variables['agencyid']) || !$this->trialuser) {\n\t\t\treturn $return;\n\t\t}\n\n\t\t$days_used = intval((time() - $this->createdate) / 86400);\n\t\t$days_remaining = $agency_edition_variables['trial_days'] - $days_used;\n\n\t\t$return['days_used'] = $days_used;\n\t\t$return['days_left'] = $agency_edition_variables['trial_days'] - $days_used;\n\t\t$return['days_total'] = $agency_edition_variables['trial_days'];\n\n\t\treturn $return;\n\t}", "public function getTempName() {}", "public static function chkTrialKey_wp() {\n\t\theader('Content-Type: application/json');\n\t\tglobal $acc;\n\n\t\t$response = array(\n\t\t\t'valid' => false,\n\t\t\t'id' => 0,\n\t\t\t'name' => 'Invalid code',\n\t\t\t'length' => 'Invalid code',\n\t\t\t'payment' => false,\n\t\t\t'amount' => 0,\n\t\t);\n\n\t\ttry {\n\t\t\tif(!isset($_REQUEST[\"rc\"]) || empty($_REQUEST[\"rc\"])) {\n\t\t\t\tthrow new \\Exception( 'Empty input', 0 );\n\t\t\t}\n\n\t\t\t$codes = \\WPSF\\TrialCode::get_code( $_REQUEST['rc'] );\n\n\t\t\tif ( is_wp_error( $codes ) || empty( $codes[0]['Id'] ) ) {\n\t\t\t\tthrow new \\Exception( 'Invalid code', 0 );\n\t\t\t}\n\t\t\t\n\t\t\t$response = array(\n\t\t\t\t'valid' => true,\n\t\t\t\t'id' => $codes[0]['Id'],\n\t\t\t\t'trialname' => $codes[0]['Name'],\n\t\t\t\t'name' => $codes[0]['Membership']['Name'],\n\t\t\t\t'length' => $codes[0]['Period'],\n\t\t\t\t'payment' => ( empty( $codes[0]['Payment'] ) ? false : true ) ,\n\t\t\t\t'amount' => $codes[0]['Amount'],\n\t\t\t\t'pagetext' => $codes[0]['Page_Text__c'],\n\t\t\t);\n\t\t\t\n\t\t} catch( \\Exception $e ) {\n\t\t\t$response = array(\n\t\t\t\t'valid' => false,\n\t\t\t\t'id' => 0,\n\t\t\t\t'name' => $e->getMessage(),\n\t\t\t\t'length' => $e->getMessage(),\n\t\t\t\t'err' => $e->getMessage(),\n\t\t\t\t'payment' => false,\n\t\t\t\t'amount' => 0,\n\t\t\t\t'pagetext' => '',\n\t\t\t);\n\t\t}\n\n\t\tprint json_encode( $response );\n\t\texit();\n\t}", "public function shortName(): String\n {\n return $this->shortNames[$this->suit];\n }", "public function get_name()\r\n {\r\n \t$data = $this->get_exercise_data();\r\n \treturn $data['title'];\r\n }", "public function getName(): string\n {\n return match ($this) {\n self::Debug => 'DEBUG',\n self::Info => 'INFO',\n self::Notice => 'NOTICE',\n self::Warning => 'WARNING',\n self::Error => 'ERROR',\n self::Critical => 'CRITICAL',\n self::Alert => 'ALERT',\n self::Emergency => 'EMERGENCY',\n };\n }", "public static function identifier()\n\t{\n\t\treturn 'thank-you';\n\t}", "public function getName()\n {\n return Craft::t('Charge Subscriber');\n }", "final public function name():string\n {\n return $this->name;\n }", "public function getCheckName(): string\n {\n return $this->name;\n }", "public function getNamaChallenge();", "public function getQuestWord()\n {\n return $this->quest;\n }", "public function name(): string\n {\n return 'Tinkoff';\n }", "public function getName(){ return $this->getField('name'); }", "public function getConceptName(): string\n {\n return \\ucfirst($this->toString());\n }", "function getChallengeName($challenge_id) {\n $challenges = challenges();\n return $challenges[$challenge_id]['name'];\n}", "public function getName()\n {\n // TODO: Implement getName() method.\n return 'MyTwExtension';\n }", "public function getName()\r\n {\r\n $name = $this->properties['transmittable_display_name'] ?? $this->properties['display_name'] ?? '';\r\n return preg_replace('/^\\'(.*)\\'/', '\\1', $name);\r\n }", "public function get_name() {\n return get_string('pluginname', 'assignfeedback_helixfeedback');\n }", "public function getTmpName()\n\t{\n\t\treturn $this->tmpName;\n\t}", "public function getLabel() {\n\t\t$label = '';\n\t\tif($this->registration) {\n\t\t\t$label = $this->registration->competition->getFullName().', '.Yii::$app->formatter->asDate($this->registration->competition->start_date);\n\t\t\t$golfer_str = $this->player->name.' ('.$this->player->handicap.')';\n\t\t\t$label .= ' — '.$golfer_str;\n\t\t} else {\n\t\t\t$label = $this->practice->course->getFullName();\n\t\t\t$golfer_str = $this->player->name.' ('.$this->player->handicap.')';\n\t\t\t$label .= ' — '.$golfer_str;\n\t\t}\n\t\treturn $label;\n\t}", "public function get_name() {\n\t\treturn 'team';\n\t}", "private function generateUsername() {\n $name = \"\";\n $name = $this->generator->generateString(4, '2346789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXYZ');\n $table = 'participant_data';\n $conditions = array('passcode' => $name);\n $existing_users = $this->getListFromDB($table, $conditions);\n if (empty($existing_users)) {\n return $name; \n }\n else {\n return $this->generateUsername();\n }\n \n }", "public function getJwtId(): string\n {\n return $this->getPayloadClaim('jti');\n }", "public function randomName() {}", "public function get_trial()\n {\n /*\n * retrieve general ledger to convert into trial balance.\n * loop through ledger data and accumulate debit and credit as normal position.\n */\n $ledger = $this->get_general_ledger();\n $trial = array();\n\n foreach ($ledger as $table) {\n $total_debit = 0;\n $total_credit = 0;\n\n /*\n * loop through general table, accumulate each account table.\n * if normal position is debit then debit transaction will increase the balance.\n * credit transaction will decrease the balance.\n * if normal position is credit then credit transaction will increase the balance.\n * debit transaction will decrease the balance.\n */\n foreach ($table as $row) {\n if ($row[\"position\"] == \"DEBITS\") {\n if ($row[\"debit\"] == \"-\") {\n $total_debit -= $row[\"credit\"];\n } else {\n $total_debit += $row[\"debit\"];\n }\n } else if ($row[\"position\"] == \"CREDITS\") {\n if ($row[\"debit\"] == \"-\") {\n $total_credit += $row[\"credit\"];\n } else {\n $total_credit -= $row[\"debit\"];\n }\n }\n }\n\n // populate data into array and push as trial balance array as balance account\n $account = array(\n \"account_id\" => $table[0][\"account_id\"],\n \"account\" => $table[0][\"account\"],\n \"debit\" => $total_debit,\n \"credit\" => $total_credit,\n \"position\" => $table[0][\"position\"],\n );\n\n array_push($trial, $account);\n }\n\n return $trial;\n }", "public static function featureName()\n\t{\n\t\treturn __( 'Embedded Tweet', 'twitter' );\n\t}", "public function getTimerName()\n\t\t{\n\t\t\treturn \"({$this->today}) \" . $this->timer_name;\n\t\t}", "public function getName()\n {\n return 'test';\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function LiveName()\n {\n return $this->Name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function getTxtRecord()\n {\n $challenge = $this->getDnsChallenge();\n if ($challenge !== false) {\n $hash = hash('sha256', $challenge->getToken() . '.' . $this->digest, true);\n $value = Helper::toSafeString($hash);\n return new Record('_acme-challenge.' . $this->getDomain(), $value);\n }\n\n return false;\n }", "public function get_name() {\n return get_string('circleci', 'assignsubmission_circleci');\n }", "final public function name(): string\n {\n return $this->name;\n }", "public function generateUsername()\n {\n $dir = \"@Give2PeerBundle/Resources/config/\";\n $path = $this->get('kernel')->locateResource($dir . 'game.yml');\n\n $words = Yaml::parse(file_get_contents($path));\n\n $adjectives = array_merge(\n $words['quantity']\n ,$words['quality']\n ,$words['size']\n ,$words['age']\n ,$words['shape']\n ,$words['color']\n ,$words['origin']\n ,$words['material']\n ,$words['qualifier']\n );\n \n $beings = $words['being'];\n\n $a1 = $a2 = '';\n $i = 0; // BAD. pop out of $adjectives instead ?\n while ($a1 == $a2 && $i < 42) {\n $i1 = array_rand($adjectives);\n $i2 = array_rand($adjectives);\n $a1 = $adjectives[min($i1, $i2)];\n $a2 = $adjectives[max($i1, $i2)];\n $i++;\n }\n\n if ($a1 == $a2) { // we have a lottery winner\n $a1 = \"Incredibly\";\n $a2 = \"Unlucky\";\n }\n\n $b = $beings[array_rand($beings)];\n\n $x = random_int(0, 9);\n $y = random_int(0, 9);\n $z = random_int(0, 9);\n \n // About 406 billion right now\n // $nb = count($beings) * (count($adjectives) ** 2) * 1000;\n // print(\"Possibilities : $nb\\n\");\n\n return \"${a1} ${a2} ${b} ${x}${y}${z}\";\n }", "function generateFeatureName($feature_type) {\n\twriteLog(\"generateFeatureName()\");\n\t\n\tsrand();\n\t$syllables = rand(2,4);\n\twriteLog(\"generateFeatureName(): Type: \" . $feature_type);\n\t$name = \"\";\n\t\n\tfor ($s = 0; $s < $syllables; $s++) {\n\t\t\n\t\t$consonant = \"a\";\n\t\twhile ($consonant == \"a\" || $consonant == \"e\"|| $consonant == \"i\" || $consonant == \"o\" || $consonant == \"u\") {\n\t\t\t$consonant = chr(rand(97, 122));\n\t\t}\n\t\twriteLog(\"generateFeatureName(): Consonant: \" . $consonant);\n\t\t\n\t\t$vowel = \"x\";\n\t\twhile ($vowel != \"a\" && $vowel != \"e\" && $vowel != \"i\" && $vowel != \"o\" && $vowel != \"u\") {\n\t\t\t$vowel = chr(rand(97, 122));\n\t\t}\n\t\twriteLog(\"generateFeatureName(): Vowel: \" . $vowel);\n\t\t\n\t\t$name = $name . $consonant . $vowel;\n\t\t$consonant = \"a\";\n\t\t$vowel = \"x\";\n\t\t\n\t}\n\t\n\t$name = $name . \" \" . $feature_type;\n\t\n\twriteLog(\"generateFeatureName(): Name: \" . $name);\n\t\n\treturn ucwords($name);\n\t\n}", "function getStepName()\r\n {\r\n return $this->_currentStep;\r\n }", "public static function GetCallingStepName()\n {\n $sCallingStepName = null;\n if (array_key_exists(self::SESSION_KEY_NAME, $_SESSION)) {\n $sCallingStepName = $_SESSION[self::SESSION_KEY_NAME];\n }\n\n return $sCallingStepName;\n }", "public static function name()\n {\n return 'pares';\n }", "public function get_name() {\n return get_string('pluginname', 'local_whiacohortsync');\n }", "public static function projectConversationParticipantName(string $project, string $conversation, string $participant): string\n {\n return self::getPathTemplate('projectConversationParticipant')->render([\n 'project' => $project,\n 'conversation' => $conversation,\n 'participant' => $participant,\n ]);\n }", "public function setTrialPeriod($trialPeriod)\n {\n $this->trialPeriod = $this->limitLength($trialPeriod, 10);\n return $this;\n }", "public function getWf_name()\n {\n return $this->wf_name;\n }", "public function _getTestKitName3() {\n\t\treturn $this->_testKitName3;\n\t}", "public function name(): string\n {\n return $this->pluck('trophyTitleName');\n }", "public function getName(): string\n {\n return $this->account->account_name ?? '';\n }", "public function message()\n {\n return 'The fields [Team ID, Phone and Sticky Phone Number ID] are required';\n }", "protected function LiveName()\n {\n $finalString = _t('OrderModifier.TAXCOULDNOTBEDETERMINED', 'tax could not be determined');\n $countryCode = $this->LiveCountry();\n $startString = '';\n $name = '';\n $endString = '';\n $taxObjects = $this->currentTaxObjects();\n if ($taxObjects) {\n $objectArray = [];\n foreach ($taxObjects as $object) {\n $objectArray[] = $object->Name;\n }\n if (count($objectArray)) {\n $name = implode(', ', $objectArray);\n }\n if ($this->config()->get('exclusive_explanation') && $this->isExclusive()) {\n $endString = $this->config()->get('exclusive_explanation');\n } elseif ($this->Config()->get('inclusive_explanation') && $this->isInclusive()) {\n $endString = $this->Config()->get('inclusive_explanation');\n }\n if ($name) {\n $finalString = $startString . $name . $endString;\n }\n } else {\n if ($this->hasExceptionTaxes()) {\n $finalString = $this->Config()->get('no_tax_description');\n }\n }\n if ($countryCode && $finalString) {\n $countryName = EcommerceCountry::find_title($countryCode);\n if ($this->Config()->get('based_on_country_note') && $countryName && $countryCode !== self::get_default_country_code_combined()) {\n $finalString .= $this->Config()->get('based_on_country_note') . ' ' . $countryName;\n }\n }\n\n return $finalString;\n }", "protected function getGameName( )\n {\n return \"pi\";\n }", "public function getName():string\n {\n return $this->name;\n }", "public function name() {\n return $this->name;\n }", "public function getQuestion(): string\n {\n return $this->question;\n }", "public function toString() {\n echo \"<br>\" . $this->getUserName() . \"<br>\" . \"Japanese Skill: \" . \n $this->getJapSkillString() . \"<br>\" . \"English Skill: \" . $this->getEngSkillString() . \"<br>\";\n }", "public function getTmpName()\n {\n return $this->tmpName;\n }", "public function getTrialInfo(Request $request){\n $id = $request->id;\n\n if($request->planned === 'true'){\n $trial = Trials::with('sport')->with('user')->find($id);\n $teams = Teams::where('sports_id','=', $trial->sports_id)->get();\n return response()->json([\n 'trial' => $trial,\n 'teams' => $teams\n ]);\n }else{\n $trial_request = TrialRequests::with('sport')->with('user')->find($id);\n return response()->json($trial_request);\n }\n }", "public function name() { return $this->name; }", "function getSubmittedRealName() {\n\t\treturn $this->data_array['submitted_realname'];\n\t}" ]
[ "0.6639841", "0.6639841", "0.6050458", "0.5678793", "0.5526156", "0.54142904", "0.53614044", "0.5352728", "0.5341378", "0.532781", "0.5312134", "0.5179343", "0.5170307", "0.51256025", "0.509686", "0.50585043", "0.5036341", "0.50358063", "0.50311935", "0.5025439", "0.5022599", "0.5015472", "0.50150985", "0.5011198", "0.5010554", "0.49917504", "0.49860337", "0.49846134", "0.49827743", "0.49510872", "0.49220407", "0.49179485", "0.4905854", "0.4902708", "0.4898192", "0.48935235", "0.4892604", "0.4890957", "0.48903632", "0.48888463", "0.48791704", "0.4868722", "0.4866195", "0.48617837", "0.48615092", "0.48604572", "0.48592043", "0.48583594", "0.48556218", "0.48545498", "0.48528326", "0.4848844", "0.48488358", "0.48437157", "0.48405087", "0.4834316", "0.4831801", "0.4828569", "0.4825935", "0.4825429", "0.48112285", "0.48087597", "0.48051628", "0.48020104", "0.47940272", "0.4791011", "0.47824296", "0.47781408", "0.47781408", "0.47721818", "0.47695765", "0.47695765", "0.47695765", "0.47695765", "0.4766679", "0.47579178", "0.47549966", "0.47521475", "0.47468808", "0.47450498", "0.474192", "0.47414583", "0.474064", "0.47381297", "0.47370818", "0.47343385", "0.4733839", "0.47314152", "0.47287932", "0.47278094", "0.47235066", "0.4722894", "0.4717307", "0.47156507", "0.47139078", "0.47076645", "0.47027737", "0.46986434", "0.4696183", "0.4695971" ]
0.69583505
0
Display a listing of the resource.
public function index() { $empleados = Empleado::all(); $tipos = TipoAusencia::all(); return view('tiposausencia.list', ['tipos' => $tipos,'empleados'=>$empleados]); }
{ "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() { $empleados = Empleado::all(); return view('tiposausencia.add',['empleados'=>$empleados]); }
{ "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) { $empleados = Empleado::all(); if ($request->has(['remunerada'])) { $tipoAusencia = TipoAusencia::create($request->all()); $tipos = TipoAusencia::all(); return view('tiposausencia.list', ['tipos' => $tipos,'empleados'=>$empleados]); } else { $request['remunerada'] = 0; $tipoAusencia = TipoAusencia::create($request->all()); $tipos = TipoAusencia::all(); return view('tiposausencia.list', ['tipos' => $tipos,'empleados'=>$empleados]); } }
{ "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(TipoAusencia $tipoAusencia) { // }
{ "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(TipoAusencia $tipoAusencia) { // }
{ "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 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 edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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() {\n return view('routes::edit');\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($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 $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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 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($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 \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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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() \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 }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, TipoAusencia $tipoAusencia) { // }
{ "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(TipoAusencia $tipoAusencia) { // }
{ "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
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8399528", "0.83755803", "0.83755803", "0.8342532", "0.8252005", "0.8246491", "0.82114965", "0.81451535", "0.81095713", "0.80819905", "0.799094", "0.79885143", "0.79823685", "0.7959513", "0.7950321", "0.7947592", "0.7925319", "0.7914417", "0.7899287", "0.7892423", "0.788904", "0.7888573", "0.7859566", "0.7840388", "0.7840388", "0.7837057", "0.7822922", "0.78116244", "0.7807664", "0.7791735", "0.7785959", "0.77811456", "0.77799726", "0.7762375", "0.7753727", "0.7719034", "0.7719034", "0.771513", "0.77119666", "0.77024996", "0.7692876", "0.76920134", "0.76908916", "0.7689253", "0.7672893", "0.7666128", "0.7665256", "0.76551706", "0.76500374", "0.76414853", "0.7641037", "0.7640742", "0.763345", "0.7629214", "0.7628391", "0.76269794", "0.76197463", "0.76197463", "0.76123273", "0.7602711", "0.7602425", "0.76015925", "0.76015925", "0.76007396", "0.7597639", "0.75951606", "0.7587452", "0.7584679", "0.7579657", "0.7562462", "0.7552138", "0.7551783", "0.75504583", "0.754368", "0.7541822", "0.75382096", "0.75371224", "0.75285393", "0.75156033", "0.7512623", "0.7499459", "0.74951875", "0.7494698", "0.74913925", "0.74869126", "0.7486122", "0.74787915", "0.7476152", "0.7471878", "0.7470218", "0.7464096", "0.74636215", "0.7463019", "0.74618673", "0.74608135", "0.7448682", "0.74387354", "0.743482", "0.74337745", "0.74311817", "0.7422809" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'bank_code'=>'required|between:16,23', 'account_name'=>'required|max:20', 'bank_name'=>'required|max:20', 'bank_addr'=>'required|max:30', 'start_use_status'=>'required|numeric', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function getValidationRules() : array;", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8343512", "0.8012754", "0.79354686", "0.7924697", "0.7923019", "0.79037243", "0.78584236", "0.77891105", "0.7782752", "0.77622926", "0.7736263", "0.7731162", "0.77092546", "0.76918215", "0.76851976", "0.7681545", "0.7681545", "0.7681545", "0.7681545", "0.7681545", "0.7681545", "0.76754904", "0.7674305", "0.76640165", "0.7656936", "0.7641597", "0.76294625", "0.7629167", "0.76167446", "0.7608225", "0.7607308", "0.76022136", "0.75988954", "0.7597147", "0.7592162", "0.75889975", "0.75866675", "0.75800025", "0.7554983", "0.7554252", "0.7549994", "0.75455016", "0.7539668", "0.7536159", "0.753589", "0.7529065", "0.7518091", "0.7514192", "0.7507015", "0.75053996", "0.75051916", "0.7498286", "0.7494572", "0.74944127", "0.7492929", "0.7489895", "0.74888384", "0.7488566", "0.7486081", "0.7484714", "0.747831", "0.7478238", "0.74688125", "0.74633926", "0.7462076", "0.74608266", "0.74596477", "0.7454783", "0.74532837", "0.74529666", "0.7449867", "0.74482346", "0.7440549", "0.74405295", "0.7434703", "0.743443", "0.74328333", "0.7428964", "0.74287784", "0.74231017", "0.7419106", "0.74145913", "0.74133223", "0.741316", "0.74116135", "0.7410196", "0.74056154", "0.7403792", "0.74020565", "0.7400722", "0.7389655", "0.73833704", "0.7371956", "0.73707443", "0.73684174", "0.7361227", "0.7355161", "0.73459715", "0.73436266", "0.734274", "0.7334779" ]
0.0
-1
Creates the storage for the EventSearch.
public function createStorage(array $context = []): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createStorage();", "protected function initStorageObjects()\n {\n $this->event = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function storeEvent(){\n \t$eventStore = new Event_Store();\n\n\t\t$eventStore->command = $this->command; \t\n\t\t$eventStore->event = $this->event;\n\t\t$eventStore->status = \"published\";\n\t\t$eventStore->created_at = now();\n\t\t$eventStore->updated_at = now();\n\n\n\t\t$eventStore->save();\n }", "protected function initStorageObjects()\n {\n $this->events = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->eventCategories = new ObjectStorage();\n //$this->images = new ObjectStorage();\n //$this->documents = new ObjectStorage();\n }", "private function _createSearchIndexTable()\n\t{\n\t\tCraft::log('Creating the searchindex table.');\n\n\t\t// Taking the scenic route here so we can get to MysqlSchema's $engine argument\n\t\t$table = craft()->db->addTablePrefix('searchindex');\n\n\t\t$columns = array(\n\t\t\t'elementId' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Int, 'null' => false)),\n\t\t\t'attribute' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Varchar, 'maxLength' => 25, 'null' => false)),\n\t\t\t'fieldId' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Int, 'null' => false)),\n\t\t\t'locale' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Locale, 'null' => false)),\n\t\t\t'keywords' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Text, 'null' => false)),\n\t\t);\n\n\t\tcraft()->db->createCommand()->setText(craft()->db->getSchema()->createTable($table, $columns, null, 'MyISAM'))->execute();\n\n\t\t// Give it a composite primary key\n\t\tcraft()->db->createCommand()->addPrimaryKey('searchindex', 'elementId,attribute,fieldId,locale');\n\n\t\t// Add the FULLTEXT index on `keywords`\n\t\tcraft()->db->createCommand()->setText('CREATE FULLTEXT INDEX ' .\n\t\t\tcraft()->db->quoteTableName(craft()->db->getIndexName('searchindex', 'keywords')).' ON ' .\n\t\t\tcraft()->db->quoteTableName($table).' ' .\n\t\t\t'('.craft()->db->quoteColumnName('keywords').')'\n\t\t)->execute();\n\n\t\tCraft::log('Finished creating the searchindex table.');\n\t}", "public function initStorage() {}", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->artist = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->media = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "public function persistEvents()\n {\n $eventsGoogle = $this->getGoogleEvents();\n\n foreach ($eventsGoogle as $eventGoogle){\n $event = new Event();\n $event->setName($eventGoogle->getSummary());\n\n //If it's not existing\n if (!$eventGoogle->getStart()->getDateTime()){\n $start = new \\DateTime($eventGoogle->getStart()->getDate());\n $end = new \\DateTime($eventGoogle->getEnd()->getDate());\n\n $end->sub(new \\DateInterval('PT1S'));\n $event->setStartAt($start);\n $event->setEndAt($end);\n } else {\n $event->setStartAt(new \\DateTime($eventGoogle->getStart()->getDateTime()));\n $event->setEndAt(new \\DateTime($eventGoogle->getEnd()->getDateTime()));\n }\n $event->setIdGoogle($eventGoogle->getId());\n\n //Event with same ID\n\n if (!$this->em->getRepository(Event::class)->findOneBy(['idGoogle' => $event->getIdGoogle()])){\n\n $this->em->persist($event);\n $this->em->flush();\n }\n\n }\n\n }", "public function store()\n\t{\n\t\t// Create New Event\n\n\t\t$evnt = new Events;\n\t\t$evnt->user_id = Auth::id();\n\t\t$evnt->name = Input::get('name');\n\t\t$evnt->size = Input::get('size');\n\t\t$evnt->time_start = Input::get('start');\n\t\t$evnt->time_end = Input::get('end');\n\t\t$evnt->detail = Input::get('detail');\n\t\t$evnt->location = Input::get('loca');\n\t\t$evnt->category = Input::get('cate');\n\t\t$evnt->save();\n\n\t\t$eid = DB::select('select event_id from event where event_id = (select max(event_id) from event)');\n\t\t$join = new JoinEvent;\n\t\t$join->event_id = $eid[0]->event_id;\n\t\t$join->user_id = Auth::id();\n\t\t$join->active = 1;\n\t\t$join->status = 'owner';\n\t\t$join->save();\t\t\n\n\n\t\treturn Redirect::to('/myevent/create');\n\t\t// return $join;\n\t}", "protected function initStorageObjects()\n {\n \t$this->language = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n \t$this->travel = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n \t$this->col = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n \t$this->categories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "private function createSearchesTable() {\n $fields = array(\n 'id'\t\t => array('type' => 'int', 'constraint' => '10', 'unsigned' => TRUE, 'auto_increment' => TRUE),\n 'site_id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => TRUE),\n 'searched_at'\t => array('type' => 'datetime', 'null' => true),\n 'params' => array('type' => 'text', 'null' => true),\n 'short_code' => array('type' => 'varchar', 'constraint' => '250', 'null' => TRUE),\n 'all_servers' => array('type' => 'varchar', 'constraint' => '3', 'null' => TRUE),\n );\n\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', TRUE);\n\n ee()->dbforge->create_table('rets_rabbit_v2_searches');\n }", "public function initStorage()\n {\n $dbMasterConfig = C(self::$dbKey);\n $this->storage = $this->getDbInstance($dbMasterConfig);\n $this->setTableName($dbMasterConfig);\n\n return $this->storage;\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->teacher = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->students = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t\n\t\t$this->media = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->albums = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->socialNetworks = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function store(EventRequest $request)\n {\n\n return $this->projentStore($request);\n\n }", "public function store()\n\t{\n $data \t\t= $this->inputAll();\n $rules = $this->events->getRules();\n\n\n $properties = array();\n unset($data['storage_events_id']);\n if(isset($data['properties_id']) && count($data['properties_id']))\n {\n $properties = (is_array($data['properties_id'])) ? $data['properties_id'] : [];\n unset($data['properties_id']);\n }\n\n $data['is_arifmetic'] = (isset($data['is_arifmetic'])) ? $data['is_arifmetic'] : 0;\n\n $validator \t= $this->validator->make($data, $rules);\n if ($validator->fails())\n {\n return $this->redirect->back()->withErrors($validator)->withInput();\n }\n\n $eventCreated = $this->events->create($data);\n if($eventCreated)\n {\n if(count($properties))\n foreach($properties as $num => $id)\n StorageEventsHasEventsProperties::create(array(\"storage_events_id\" => $eventCreated->id, \"event_prop_id\" => $id));\n }\n\n return $this->redirect('events.index');\n\t}", "protected function initStorageObjects()\n {\n $this->multipleTimes = new ObjectStorage();\n $this->differentTimes = new ObjectStorage();\n $this->exceptions = new ObjectStorage();\n $this->categories = new ObjectStorage();\n $this->days = new ObjectStorage();\n $this->images = new ObjectStorage();\n $this->downloadLinks = new ObjectStorage();\n }", "public function initStorage() {\n if(empty($this -> _db)) {\n $db = new SQLite3('./prices.db');\n $this -> _db = $db;\n }\n \n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->categories = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "public function __construct()\n {\n\t$dibiConfig= dibi::getConnection()->getConfig();\n\t$dbname= isset($dibiConfig['dbname']) ? $dibiConfig['dbname'] : $dibiConfig['database'];\n\t$config= array(\n\t 'driver' => 'sqlite',\n\t 'profiler' => Environment::getConfig('perform')->storage_profiler,\n\t 'database' => realpath(Environment::getConfig('perform')->modelCache) . '/'. $dbname .'-storage.sdb',\n\t);\n\tparent::__construct($config, 'storage');\n\n\tif ( !$this->getDatabaseInfo()->hasTable('fields'))\n\t{\n\t $this->query('CREATE TABLE [fields] ([id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL, [table] VARCHAR(50) NOT NULL,\n\t\t[hash] VARCHAR(32) NOT NULL, [type] VARCHAR(50));\n\t\tCREATE UNIQUE INDEX [fields_idx] on [fields] ( [name], [table]);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('tables'))\n\t{\n\t $this->query('CREATE TABLE [tables] ( [id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL UNIQUE, [hash] VARCHAR(32) NOT NULL);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('views'))\n\t{\n\t $this->query('CREATE TABLE [views] ( [id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL UNIQUE, [hash] VARCHAR(32) NOT NULL);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('indexes'))\n\t{\n\t $this->query('CREATE TABLE [indexes] ([id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL, [table] VARCHAR(50) NOT NULL,\n\t\t[hash] VARCHAR(32) NOT NULL, [unique] BOOLEAN);\n\t\tCREATE UNIQUE INDEX [indexes_idx] on [indexes] ( [name], [table]);');\n\t}\n }", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "protected function initStorageObjects() {}", "protected function initStorageObjects()\n {\n $this->sellerDetail = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->subForums = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->threads = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groupsWithReadAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groupsWithWriteAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->groupsWithModificationAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->usersWithReadAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->usersWithWriteAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->usersWithModificationAccess = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->pointsDeVente = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->marchant = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->spieler = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "public function __construct()\n {\n $this->storage = array();\n }", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }", "protected static function initStorages()\n {\n $modelName = ClassFinder::getClassBasename(static::class);\n\n static::$storages = [];\n\n foreach (static::$storagesConf as $name => &$storageConf) {\n if (!isset($storageConf['type'])) {\n $storageConf['type'] = $name;\n }\n if (!isset($storageConf['primaryKey'])) {\n $storageConf['primaryKey'] = static::$primaryKey;\n }\n $storageConf['modelClass'] = static::class;\n $storageConf['modelName'] = $modelName;\n\n $class = Storages\\Generic::class;\n $class = substr($class, 0, strrpos($class, '\\\\'))\n . '\\\\' . $storageConf['type'];\n static::$storages[$name] = new $class($storageConf);\n }\n }", "function create_storage(){\n\t\t\n\t\t$query =\n\t\t\t\"CREATE TABLE IF NOT EXISTS `$this->table_name` (\" .\n\t\t\t\" `{$this->element_name}_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'value identifier',\" .\n\t\t\t' `parent_node_id` int(10) unsigned NOT NULL COMMENT \\'parent node identifier\\',' .\n\t\t\t' `order` int(11) unsigned NOT NULL COMMENT \\'order of values within node\\',' .\n\t\t\t\" `$this->element_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'value text',\" .\n\t\t\t\" PRIMARY KEY (`{$this->element_name}_id`),\" .\n\t\t\t' KEY `parent_node_id` (`parent_node_id`),' .\n\t\t\t\" KEY `$this->element_name` (`$this->element_name`)\" .\n\t\t\t') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin' . \n\t\t\t';';\n\t\t$result = $this->database->execute($query);\n\t\t\n\t\treturn $result;\n\t}", "protected function initStorageObjects()\n {\n $this->newsletter = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->offer = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->randomContents = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\n\t\t$this->randomPages = new Tx_Extbase_Persistence_ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n /**\n * Do not modify this method!\n * It will be rewritten on each save in the extension builder\n * You may modify the constructor of this class instead\n */\n $this->attributeSets = new ObjectStorage();\n $this->subCategories = new ObjectStorage();\n }", "private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }", "protected function initStorageObjects()\n {\n $this->states = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects() {\n\t\t$this->konzerts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->singers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "public function store() {\n \n }", "protected function initStorageObjects()\n {\n \n }", "protected function initStorageObjects()\n {\n $this->category = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initializeStorageObjects() {}", "protected function initStorageObjects()\n {\n $this->images = new ObjectStorage();\n $this->categories = new ObjectStorage();\n $this->details = new ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->images = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->categories = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function __construct()\n {\n $this->initStorageObjects();\n }", "protected function initStorageObjects() {\n\t\t$this->categoryRel = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n }", "function __construct(){\n $this->sId = Base::getId();\n \n $this->setMostraBarraPerspectivas(true);\n $this->setMostraPerspectivaDia(true);\n $this->setMostraPerspectivaSemana(true);\n $this->setMostraPerspectivaMes(true);\n $this->setMostraHora(true);\n $this->setMostraCabecalhoMes(true);\n $this->setMostraLinksSemana(true);\n $this->setMostraNumerosSemana(false);\n \n $this->oStoreTipoEvento = new Store($this->getId().'-tipo-evento');\n $this->oStoreEvento = new Store($this->getId().'-evento');\n \n $this->aListener = array();\n $this->aAgenda = array();\n }", "public function __construct() {\n\t\t@mkdir($this->storage, 0777, true);\n\t}", "protected function initStorageObjects() {\n\t\t\n\t}", "protected function initStorageObjects() {\n\t\t\n\t}", "public function __construct(){\n $this->db = new SQLite3(':memory:');\n //create table in db if it does now exist\n $this->db->exec('CREATE TABLE IF NOT EXISTS storage (name STRING, value INT);');\n }", "public function store()\n {\n $this->storeKeys();\n }", "protected function initStorageObjects() {\n\t\t$this->category = new ObjectStorage();\n\t}", "protected function initStorageObjects()\n {\n $this->posts = new ObjectStorage();\n $this->subscribers = new ObjectStorage();\n $this->readers = new ObjectStorage();\n }", "protected function initStorageObjects() {\n $this->fileReferences = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "function storeForReading($title, $partOf, $location, $calendarEventId, $startTime, $masterEventId) {\n\t$simpleEvent['title'] = $title;\n\t$simpleEvent['partOf'] = $partOf;\n\t$simpleEvent['location'] = $location;\n\t$simpleEvent['calendarEventId'] = $calendarEventId;\n\t$simpleEvent['startTime'] = $startTime;\n\t$simpleEvent['masterEventId'] = $masterEventId;\n\treturn $simpleEvent;\n}", "protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t}", "protected function initStorageObjects()\n {\n $this->photos = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "protected function initStorageObjects() {\n\t\t$this->durationtiming = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "private function initializeStorage(): void\n\t{\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tclient_id TEXT NOT NULL,\n\t\t\t\tcreated TEXT,\n\t\t\t\tdeposit TEXT,\n\t\t\t\trate TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket_item (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tticket_id INTEGER NOT NULL,\n\t\t\t\tname TEXT,\n\t\t\t\ttip TEXT,\n\t\t\t\tstatus TEXT,\n\t\t\t\trate TEXT,\t\t\n\t\t\t\tdate_time TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\t}", "public function store() {\n //\n }", "protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\n\t\t//throw new Exception(\"Not yet implemented!\");\n\t\t\t\t//---------------------\n\n $domDoc = new DOMDocument;\n $rootElt = $domDoc->createElement('items');\n $rootNode = $domDoc->appendChild($rootElt);\n\n foreach($this->_data AS $row) {\n $rowElement = $domDoc->createElement('item');\n\n foreach($row AS $key => $value) {\n\n $element = $domDoc->createElement($key);\n $element->appendChild($domDoc->createTextNode($value));\n\n $rowElement->appendChild($element);\n }\n $rootNode->appendChild($rowElement);\n\n }\n\n $data = $domDoc->saveXML();\n\n //var_dump($data);\n\n file_put_contents($this->_origin, $data);\n\n\t\t// --------------------\n\t}", "protected function initEvent()\n {\n $locales = $this->container->getParameter('event.locales');\n $event = $this->getRepository('EventEventBundle:Event')->getEvent();\n $now = new \\DateTime();\n\n if (!$event) {\n $event = new Event();\n $event\n ->setTitle('My Event')\n ->setDescription('My another awesome event!')\n ->setStartDate($now)\n ->setEndDate($now->modify('+1 day'))\n ->setVenue('Burj Khalifa Tower')\n ->setEmail('[email protected]')\n ;\n\n $speaker = new Speaker();\n $speaker\n ->setFirstName('Phill')\n ->setLastName('Pilow')\n ->setCompany('Reseach Supplier')\n ;\n\n if ($locales) {\n foreach ($locales as $locale => $title) {\n $eventTranslation = new EventTranslation();\n $eventTranslation->setEvent($event);\n $eventTranslation->setlocale($locale);\n\n $this->getManager()->persist($eventTranslation);\n\n $speakerTranslation = new SpeakerTranslation();\n $speakerTranslation->setSpeaker($speaker);\n $speakerTranslation->setlocale($locale);\n\n $this->getManager()->persist($speakerTranslation);\n }\n }\n\n $this->getManager()->persist($event);\n $this->getManager()->persist($speaker);\n $this->getManager()->flush();\n }\n }", "public function __construct()\n {\n $this->_storage = new \\SplObjectStorage();\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "public function store() {\n //\n }", "protected function initStorageObjects()\n {\n $this->allowedParties = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->ignoringCommunityUsers = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function storeData($request)\n {\n if (!auth()->user()->can('create-estate')) {\n if (auth()->user()->remaining_registered_count > 0 && (!auth()->user()->validity_end_at || !auth()->user()->validity_end_at->isPast()))\n auth()->user()->decrement('remaining_registered_count');\n\n else {\n die(json_encode([\n 'status' => 400,\n 'true' => 'متاسفانه اعتبار شما برای ثبت ملک کافی نیست',\n ]));\n }\n }\n\n $estate = $this->createNewModel(\n array_merge($this->getRequest($request), [\n 'role_id' => auth()->user()->roles()->first()->id ?? null,\n 'office_id' => auth()->user()->workplace->id ?? null,\n ])\n );\n\n if ($request->get('photos')) {\n foreach ($request->get('photos') as $item)\n $estate->addMedia($item)->toMediaCollection('photos');\n }\n\n auth()->user()->increment('registered_estate_count');\n\n return $estate;\n }", "protected function initStorageObjects()\n {\n $this->images = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $this->children = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n $this->item = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "protected function initStorageObjects()\n {\n /**\n * Do not modify this method!\n * It will be rewritten on each save in the extension builder\n * You may modify the constructor of this class instead\n */\n $this->metaVotingProposals = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function create()\n {\n //\n// $this->store();\n\n }", "private function create_storage(callable $factory): Storage\n\t{\n\t\tassert($this instanceof Application);\n\n\t\treturn $factory($this);\n\t}", "public function store() {\n\t}", "protected function initStorageObjects()\n {\n $this->sysCategory = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function store(StoreRequest $request): EventResource\n {\n return new EventResource(\n auth()\n ->guard('api')\n ->user()\n ->events()\n ->create(array_filter($request->only(self::ALLOWED_FIELDS)))\n );\n }", "public function initStorage()\n {\n $this->open();\n }", "public function store();", "public function store();", "public function store();", "public function store(Request $request)\n {\n return Storageplace::create($request->only(['storageplace']));\n }", "public function stores();", "protected static function buildEventMaps()\n {\n \\Log::info('Building event cache');\n\n // Build event mapping from services in database\n\n //\tInitialize the event map\n $processEventMap = [];\n $broadcastEventMap = [];\n\n // Pull any custom swagger docs\n $result = ServiceModel::with(\n [\n 'serviceDocs' => function ($query){\n $query->where('format', ApiDocFormatTypes::SWAGGER);\n }\n ]\n )->get();\n\n //\tSpin through services and pull the events\n foreach ($result as $service) {\n $apiName = $service->name;\n try {\n if (empty($content = ServiceModel::getStoredContentForService($service))) {\n throw new \\Exception(' * No event content found for service.');\n continue;\n }\n\n $serviceEvents = static::parseSwaggerEvents($apiName, $content);\n\n //\tParse the events while we get the chance...\n $processEventMap[$apiName] = ArrayUtils::get($serviceEvents, 'process', []);\n $broadcastEventMap[$apiName] = ArrayUtils::get($serviceEvents, 'broadcast', []);\n\n unset($content, $service, $serviceEvents);\n } catch (\\Exception $ex) {\n \\Log::error(\" * System error building event map for service '$apiName'.\\n{$ex->getMessage()}\");\n }\n }\n\n static::$eventMap = ['process' => $processEventMap, 'broadcast' => $broadcastEventMap];\n\n //\tWrite event cache file\n \\Cache::forever(static::EVENT_CACHE_KEY, static::$eventMap);\n\n \\Log::info('Event cache build process complete');\n }", "public function store()\n {\n $request = request();\n\n //make sure the end date is in the future or equal to the start date,\n //but don't allow for an end date to be less than the start date.\n $validator = Validator::make($request->all(), [\n 'end' => 'required|date|after_or_equal:start'\n ]);\n\n if ($validator->fails()) {\n // set error message\n session()->flash('alert-danger', 'You can not make an event that has an end date before the start date!');\n\n return redirect()->back()->withInput();\n }\n\n $item = EventFacade::create($request->except('tags', 'image', 'gallery'));\n\n // deal with event tags\n if ($request->has('tags')) {\n $tags = $request->input('tags');\n $item->addTags($tags);\n }\n\n $data = $request->only('image', 'gallery');\n\n // call media manager file handler\n call_user_func_array($this->fileHandler, [&$item, &$data, 'image']);\n call_user_func_array($this->fileHandler, [&$item, &$data, 'gallery', false]);\n\n // set success message\n session()->flash('alert-success', 'Event saved successfully!');\n\n return redirect()->route('admin.event.index');\n }", "public static function createInstance()\n {\n return new GridSearchManager('ISerializable');\n }", "public function store()\n {\n }", "protected function init() {\n\t\tif (usingGae()) {\n\t\t\tlogger(LL_DBG, \"DataStore::init(): Using GAE\");\n\t\t\t$this->obj_store = new GDS\\Store($this->obj_schema, $this->obj_gateway);\n\t\t} else {\n\t\t\tlogger(LL_DBG, \"DataStore::init(): Using MySQL\");\n\t\t\t$sql = \"CREATE TABLE IF NOT EXISTS \" . $this->kind . \" (\\n\";\n\t\t\t$type = $this->field_types[$this->key_field];\n\t\t\tif ($type == \"STRING\") {\n\t\t\t\t$type = \"KEYSTRING\";\n\t\t\t}\n\t\t\t$sql .= \" \" . $this->key_field . \" \" . $this->type_map[$type] . \" NOT NULL,\\n\";\n\t\t\tforeach ($this->non_key_fields as $field) {\n\t\t\t\t$sql .= \" \" . $field . \" \" . $this->type_map[$this->field_types[$field]];\n\t\t\t\tif ($this->field_indexes[$field] ?? false) {\n\t\t\t\t\t$sql .= \" NOT NULL\";\n\t\t\t\t}\n\t\t\t\t$sql .= \",\\n\";\n\t\t\t}\n\t\t\t$sql .= \" PRIMARY KEY (\" . $this->key_field . \"),\\n\";\n\n\t\t\tforeach ($this->non_key_fields as $field) {\n\t\t\t\tif ($this->field_indexes[$field] ?? false) {\n\t\t\t\t\t$sql .= \" KEY (\" . $field . \"),\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sql = rtrim(trim($sql), \",\");\n\t\t\t$sql .= \"\\n)\\n\";\n\n\t\t\t// logger ( LL_INF, \"SQL: \" . $sql );\n\t\t\tMysqlDb::query($sql);\n\t\t}\n\t}", "protected function manageEvent()\n {\n // Manage the incoming session\n $this->manageSession();\n\n // Get the event data from the incoming request\n $eventData = $this->eventRequest->getEvent();\n\n // Get the entity data from the event\n $entityData = $eventData->get('entity');\n\n if (!is_array($entityData)) $entityData = [];\n\n // Hydrate the event entity\n $this->eventEntity = $this->hydrateEntity($entityData);\n\n // Create the event object\n $this->event = new WebsiteEvent();\n\n // Format the action\n $action = $eventData->get('action');\n $this->setDefaultAction($action);\n\n $this->event->setAction($action);\n $this->event->setEntity($this->eventEntity);\n $this->event->setCreatedAt(time());\n\n if (!is_null($eventData->get('data'))) {\n $this->event->setData($eventData->get('data'));\n }\n\n // Set any related entities to the event\n $relatedEntityData = $eventData->get('relatedEntities');\n if (is_array($relatedEntityData) && !empty($relatedEntityData)) {\n foreach ($relatedEntityData as $relatedEntity) {\n $relEntityObj = $this->hydrateEntity($relatedEntity);\n $this->event->addRelatedEntity($relEntityObj);\n\n }\n }\n // Set the session to the event\n $this->event->setSession($this->session);\n }", "public static function createIndex()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->createIndex(static::index(), [\n // Empty php arrays are converted to JSON arrays. Elasticsearch expects JSON object literals.\n // Epmty arrays leads to Java exception: \"elasticsearch java.util.ArrayList cannot be cast to java.util.Map\".\n// 'settings' => [ /* ... */ ],\n 'mappings' => static::mapping(),\n //'warmers' => [ /* ... */ ],\n //'aliases' => [ /* ... */ ],\n 'creation_date' => date('Y-m-d H:i:s'),\n ]);\n }", "private function set_storage() {\r\n if (!is_array($this->cache_handler) && !empty($this->cache_handler)) {\r\n $this->cache_handler = array($this->cache_handler);\r\n }\r\n\r\n foreach ($this->cache_handler as $handler) {\r\n if ((extension_loaded($handler) || $handler == 'File') && class_exists('TS3ViewerStorage' . $handler)) {\r\n $handler = 'TS3ViewerStorage' . $handler;\r\n $this->cache = new $handler;\r\n break;\r\n }\r\n }\r\n\r\n if ($this->cache === null && class_exists('TS3ViewerStorageFile')) {\r\n $this->cache = new TS3ViewerStorageFile;\r\n }\r\n elseif ($this->cache === null) {\r\n $this->errors[] = 'no cache handler found..';\r\n return;\r\n }\r\n $this->cache_handler = get_class($this->cache);\r\n if ($this->cache_handler == 'TS3ViewerStorageFile') {\r\n $this->cache->path = $this->cache_path;\r\n }\r\n\r\n $this->cache->timeout = $this->cache_timeout;\r\n }" ]
[ "0.6347352", "0.5975185", "0.59709096", "0.59670013", "0.58810544", "0.567084", "0.56659204", "0.56463516", "0.56438327", "0.5629136", "0.5459358", "0.5458202", "0.54375243", "0.5434793", "0.54336023", "0.5427059", "0.54206926", "0.5412159", "0.5399811", "0.5398859", "0.5391581", "0.5387215", "0.5387215", "0.5386767", "0.5384701", "0.5366388", "0.5360338", "0.5348797", "0.53394276", "0.533659", "0.5321881", "0.5315172", "0.5301157", "0.52917415", "0.52891266", "0.5284484", "0.52728176", "0.5266383", "0.52584124", "0.52558905", "0.52354556", "0.5221048", "0.52198946", "0.5204262", "0.5193201", "0.5191428", "0.5183276", "0.5172555", "0.51722276", "0.51501733", "0.51501733", "0.5149493", "0.5141843", "0.51380193", "0.513115", "0.5127481", "0.51270795", "0.51067585", "0.5104873", "0.5096306", "0.5096306", "0.5096306", "0.5095614", "0.50955975", "0.50955", "0.50918204", "0.50893867", "0.5086262", "0.50851893", "0.50851893", "0.50851893", "0.50851893", "0.50851893", "0.50851893", "0.50851893", "0.50851893", "0.5072134", "0.50661", "0.50636894", "0.5060706", "0.5054602", "0.5028755", "0.5026416", "0.50195193", "0.50194925", "0.5015604", "0.5013982", "0.50040466", "0.50040466", "0.50040466", "0.5003419", "0.50021416", "0.49918297", "0.49870345", "0.49858117", "0.4970827", "0.49703947", "0.49678668", "0.49652633", "0.49618587" ]
0.5265691
38
Returns debugging information about the storage for the EventSearch.
public function describeStorage(array $context = []): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __debugInfo()\n {\n return [\n 'bucketName' => $this->collectionWrapper->getBucketName(),\n 'databaseName' => $this->collectionWrapper->getDatabaseName(),\n 'file' => $this->file,\n ];\n }", "protected function getStorageInfo() {\n\t\t$dirInfo = \\OC\\Files\\Filesystem::getFileInfo('/', false);\n\t\treturn \\OC_Helper::getStorageInfo('/', $dirInfo);\n\t}", "public function getStorageInfo()\n\t{\n\t\treturn 'table=`'.$this->getTable().'\\'';\n\t}", "public function openSearchDebug(): string\n {\n return config('scout.opensearch.debug');\n }", "public function __debugInfo()\n {\n return $this->all();\n }", "public function __debugInfo()\n {\n return [\n 'registryAlias' => $this->getRegistryAlias(),\n 'alias' => $this->getAlias(),\n 'endpoint' => $this->getName(),\n 'resourceClass' => $this->getResourceClass(),\n 'defaultConnection' => $this->defaultConnectionName(),\n 'connectionName' => $this->getConnection()->configName(),\n 'inflector' => $this->getInflectionMethod(),\n ];\n }", "public function __debugInfo()\r\n {\r\n return $this->toArray();\r\n }", "public function __debugInfo()\n {\n return [\n 'databaseName' => $this->databaseName,\n 'manager' => $this->manager,\n 'readConcern' => $this->readConcern,\n 'readPreference' => $this->readPreference,\n 'typeMap' => $this->typeMap,\n 'writeConcern' => $this->writeConcern,\n ];\n }", "public function getInfo()\n {\n return array(\n 'store' => array_keys($this->_store)\n );\n }", "public function dump()\n {\n $this->composeQuery();\n $result = $this->connection->client()->search($this->queryBody);\n\n dd($result);\n }", "public function __debugInfo() {\n return $this->data;\n }", "public function __debugInfo(): array\n\t{\n\t\treturn [\n\t\t\t'count' => $this->count(),\n\t\t\t'items' => $this->items,\n\t\t\t'context' => is_null($this->context) ? null : '[context]',\n\t\t];\n\t}", "public function get_information() {\n $informationsources = ['name' => 'dbdetails', 'displayname' => get_string(\"dbdetails\", \"local_reportgen\")];\n\n return $informationsources;\n }", "public function __debugInfo()\n {\n return [\n 'name' => $this->name,\n 'projectId' => $this->projectId,\n 'info' => $this->info,\n 'connection' => get_class($this->connection)\n ];\n }", "public function __debugInfo() {\n\t\t$info = parent::__debugInfo();\n\t\t$info['get'] = $this->getVars ? $this->getVars->getArray() : null;\n\t\t$info['post'] = $this->postVars ? $this->postVars->getArray() : null;\n\t\t$info['cookie'] = $this->cookieVars ? $this->cookieVars->getArray() : null;\n\t\t$info['whitelist'] = $this->whitelist ? $this->whitelist->getArray() : null;\n\t\t$info['urlSegments'] = $this->urlSegments;\n\t\t$info['pageNum'] = $this->pageNum;\n\t\treturn $info;\n\t}", "public function __debugInfo() {\n\t\t$info = parent::__debugInfo();\n\t\tif(count($this->data)) $info['data'] = $this->data; \n\t\treturn $info; \n\t}", "public function __debugInfo()\n {\n return [\n '(help)' => 'This is a Query object, to get the results execute or iterate it.',\n 'action' => $this->clause('action'),\n 'formatters' => $this->_formatters,\n 'offset' => $this->clause('offset'),\n 'page' => $this->clause('page'),\n 'limit' => $this->clause('limit'),\n 'set' => $this->set(),\n 'sort' => $this->clause('order'),\n 'extraOptions' => $this->getOptions(),\n 'conditions' => $this->where(),\n 'repository' => $this->getEndpoint(),\n 'webservice' => $this->getWebservice(),\n ];\n }", "public function debug(){\n $debug = [\n 'ID' => $this->ID,\n 'slug' => $this->slug,\n 'options' => $this->options,\n 'items' => $this->items,\n ];\n \"<pre>\".var_dump($debug).\"</pre>\";\n }", "public function debug() {\n\t\tvar_dump(array(\n\t\t\t'config' => $this->config,\n\t\t\t'prices' => $this->prices\n\t\t));\n\t}", "public function __debugInfo(): array\n {\n return $this->toArray();\n }", "public function __debugInfo(): array\n {\n return $this->toArray(false);\n }", "public static function debug_data()\n {\n }", "public function get_debug_info() {\n\t\treturn $this->debug_enabled ? $this->debug_log : null;\n\t}", "public function __debugInfo()\n {\n return $this->_properties + [\n '[new]' => $this->isNew(),\n ];\n }", "public function __debugInfo()\n {\n return $this->getAttributes();\n }", "public function getDebugInfo()\n {\n // TODO: Implement getDebugInfo() method.\n }", "public function storeInfo() {\r\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\r\n\t\t$storeManager = $objectManager->create(\"\\Magento\\Store\\Model\\StoreManagerInterface\");\r\n\t\t$stores = $storeManager->getStores(true, false);\r\n\t\tforeach ($stores as $store) {\r\n\t\t\t$storeDetails[$store->getId()] = $store->getCode();\r\n\t\t}\r\n\r\n\t\treturn $storeDetails;\r\n\t}", "public function __debugInfo() {\n\t\t/** @var WireDebugInfo $debugInfo */\n\t\t$debugInfo = $this->wire(new WireDebugInfo());\n\t\treturn $debugInfo->getDebugInfo($this, true);\n\t}", "public function __debugInfo()\n {\n return [\n 'seed' => '*',\n 'attention' => 'A seed value cannot be dumped in any form. Call getSeed explicitly to get the seed value.',\n ];\n }", "public function getDebug_info()\n\t{\n\t\treturn $this->getParser()->debug_info;\n\t}", "public static function getInfos()\n {\n $xDebugEnabled = self::isXdebugEnabled();\n $debugInfos = array();\n\n $debugInfos['app']['path'] = APP_PATH;\n $debugInfos['app']['cache'] = Agl::app()->isCacheEnabled();\n\n if ($xDebugEnabled) {\n $debugInfos['time'] = xdebug_time_index();\n $debugInfos['memory'] = xdebug_peak_memory_usage();\n }\n\n if (Agl::app()->getDb() !== NULL) {\n $debugInfos['db']['db_engine'] = Agl::app()->getConfig('main/db/engine');\n $debugInfos['db']['queries'] = Agl::app()->getDb()->countQueries();\n }\n\n $debugInfos['opcache'] = (ini_get('opcache.enable')) ? true : false;\n $debugInfos['apcu'] = (ini_get('apc.enabled')) ? true : false;\n $debugInfos['xdebug'] = $xDebugEnabled;\n $debugInfos['more_modules'] = Agl::getLoadedModules();\n $debugInfos['request'] = Agl::getRequest();\n\n return $debugInfos;\n }", "public function __debugInfo(): array\n {\n try {\n $count = $this->count();\n } catch (Exception $e) {\n $count = 'An exception occurred while getting count';\n }\n\n return [\n 'count' => $count,\n ];\n }", "public function __debugInfo()\n {\n return DebugInfoUtility::debugInfo(\n $this,\n [\n Caster::PREFIX_PROTECTED.'formFactory',\n Caster::PREFIX_PROTECTED.'contextSelectorForm',\n Caster::PREFIX_PROTECTED.'session',\n Caster::PREFIX_PROTECTED.'logger',\n ]\n );\n }", "public function __debugInfo()\n {\n return $this->attributes;\n }", "public function getDebug();", "public function debugInfoSmall() {\n\t\t/** @var WireDebugInfo $debugInfo */\n\t\t$debugInfo = $this->wire(new WireDebugInfo());\n\t\treturn $debugInfo->getDebugInfo($this, true);\n\t}", "public function getDebugInfo()\n\t{\n\t\treturn $this->debugInfo;\n\t}", "public function __debugInfo()\n {}", "public function __debugInfo(): array\n {\n return [\n 'value' => $this->toString(),\n 'scale' => $this->scale,\n ];\n }", "public function dump()\n {\n return [\n 'id' => $this->id,\n 'index' => $this->index,\n '_source' => $this->all(),\n ];\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 __debugInfo()\n {\n return array_merge(parent::__debugInfo(), [\n 'consumer_tag' => $this->consumerTag,\n 'delivery_tag' => $this->deliveryTag,\n 'redeliver' => $this->redeliver,\n 'exchange' => $this->exchange,\n 'routing_key' => $this->routingKey,\n 'channel_object_hash' => spl_object_hash($this->channel),\n ]);\n }", "public function getDebug()\n {\n return $this->result->getDebug();\n }", "public function dump(){\r\n print_r($this->_registry);\r\n }", "public function __debugInfo()\n {\n return [\n 'privateKey' => '**protected**',\n 'publicKey' => '**protected**'\n ];\n }", "public function __debugInfo(): array\n {\n return [\n 'key' => 'private',\n ];\n }", "public function __debugInfo(): array\n {\n return [\n 'key' => 'private',\n ];\n }", "public function __debugInfo()\n {\n return [\n 'standard' => 'RSA',\n 'type' => 'asymmetrical encryption or public-key cipher',\n 'key size in bits' => static::KEY_SIZE,\n 'maximum input in bits' => static::KEY_SIZE - (($this->padding === OPENSSL_PKCS1_PADDING) ? 88 : 336),\n 'is chunk processing enabled' => $this->useChunks,\n 'padding standard' => $this->padding === self::OAEP_PADDING ? 'OAEP' : 'PKCS1',\n 'private key' => $this->privateKey,\n 'public key' => $this->publicKey,\n ];\n }", "public function dump(): array {\n return $this->store->dump();\n }", "public function get()\n\t{\n\t\tglobal $dreamcoil_debug;\n\n\t\treturn $dreamcoil_debug;\n\n\t}", "function info()\n\t{\n\t\treturn array();\n\t}", "public function __debugInfo() {\n \n \t$reflect\t= new \\ReflectionObject($this);\n \t$varArray\t= array();\n \n \tforeach ($reflect->getProperties(\\ReflectionProperty::IS_PUBLIC) as $prop) {\n \t\t$propName = $prop->getName();\n \t\t \n \t\tif($propName !== 'DI') {\n \t\t\t//print '--> '.$propName.'<br />';\n \t\t\t$varArray[$propName] = $this->$propName;\n \t\t}\n \t}\n \n \treturn $varArray;\n }", "public function debug() {\r\n\t\treturn EcommerceTaskDebugCart::debug_object($this);\r\n\t}", "public function debug()\n {\n return $this->container->debug();\n }", "public static function getStorage() {}", "public function getStorage() {}", "public function getStorage() {}", "public function getStorage() {}", "public function __debugInfo() : array\n {\n return get_object_vars($this);\n }", "public function __debugInfo() {\n\t\t$vars = parent::__debugInfo();\n\t\tunset($vars['_director']);\n\t\treturn $vars;\n\t}", "public function dump(): array\n {\n return $this->store->dump();\n }", "public function dump() {}", "public function info()\n {\n $info = [\n 'id' => $this->id,\n 'action' => $this->action,\n 'condition' => $this->condition,\n 'expressions' => $this->expressions,\n 'logMessageFormat' => $this->logMessageFormat,\n 'logLevel' => $this->logLevel,\n 'isFinalState' => $this->isFinalState,\n 'createTime' => $this->createTime,\n 'finalTime' => $this->finalTime,\n 'stackFrames' => array_map(function ($sf) {\n return $sf->info();\n }, $this->stackFrames),\n 'evaluatedExpressions' => array_map(function ($exp) {\n return $exp->info();\n }, $this->evaluatedExpressions),\n ];\n if ($this->labels) {\n $info['labels'] = $this->labels;\n }\n if ($this->userEmail) {\n $info['userEmail'] = $this->userEmail;\n }\n if ($this->location) {\n $info['location'] = $this->location->info();\n }\n if ($this->status) {\n $info['status'] = $this->status->info();\n }\n if ($this->variableTable) {\n $info['variableTable'] = $this->variableTable->info();\n }\n return $info;\n }", "public function __debugInfo() {\n\t\t$vars = parent::__debugInfo();\n\t\tunset($vars['model']);\n\t\treturn $vars;\n\t}", "public function getDebug()\n {\n return $this->scopeConfig->isSetFlag(self::XML_PATH_DEBUG, ScopeInterface::SCOPE_STORE);\n }", "public function getInfo ()\n {\n return $this->epcQuery->getInfo ();\n }", "public function getInfo()\n\t{\n\t\treturn array();\n\t}", "public function getRecordInformation() {}", "public function eventLog() {\n\t\treturn $this->_eventLog;\n\t}", "public function info(){\n return $this->getAdapter()->info();\n }", "function getDebugInfo()\n {\n return $this->getUserInfo();\n }", "protected function getStorageDetails($identifier) {\n $storage = $this->_config->get('storage');\n\n if (isset($storage[$identifier])) {\n return $storage[$identifier];\n }\n\n throw new \\Exception('Storage identifier ' . $identifier . ' was not found');\n }", "public function getAttachEvent():array{\r\n return array_keys($this->storage);\r\n }", "public function getStorage();", "public function getStorage();", "public function __debugInfo() : array\n {\n return [\n 'time' => $this->format('Y-m-d H:i:s.u'),\n ] + get_object_vars($this);\n }", "public function dump();", "public function dump();", "public function __debugInfo()\n {\n $reflect = new \\ReflectionObject($this);\n $varArray = array();\n \n foreach ($reflect->getProperties(\\ReflectionProperty::IS_PUBLIC) as $prop) {\n $propName = $prop->getName();\n \n if ($propName !== 'DI') {\n // print '--> '.$propName.'<br />';\n $varArray[$propName] = $this->$propName;\n }\n }\n \n return $varArray;\n }", "protected function getDebugKey()\n {\n return 'fitch.manager.report';\n }", "public function getInformation();", "public function getConfigData() {\n\t\treturn array(\n\t\t\t'storageType' => StorageFactory::TYPE_DUMMY,\n\t\t\t'debuggerDisabled' => $this->debuggerDisabled,\n\t\t);\n\t}", "public function debug();", "public function debug();", "public function info()\n {\n return $this->type('info');\n }", "public function info()\n {\n return $this->info;\n }", "public function info()\n {\n return $this->info;\n }", "public function debug()\n {\n return $this -> debug;\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function __debugInfo()\n {\n $properties = $this->_properties;\n foreach ($this->_virtual as $field) {\n $properties[$field] = $this->$field;\n }\n\n return $properties;\n }", "public function dprint()\n\t{\n\t\tprint_r( $this->debug );\n\t}", "function getLoggedScaffolderInfo() {\n return Utils::getConfig($this->getConfigDir() . '/' . $this::LOG_FILENAME);\n }", "public static function getDevInfo()\n {\n return self::$devInfo;\n }", "public function getDescription() {\n\t\treturn 'storage which writes the rows';\n\t}", "public function getDataWithTypeDebugData() {}", "public function dump() {\n @var_dump($this->get, $this->post, $this->server, $this->files);\n }" ]
[ "0.67927533", "0.6444579", "0.6097631", "0.6096465", "0.6049517", "0.6048571", "0.6039329", "0.60364914", "0.6006205", "0.59229577", "0.5883546", "0.58581346", "0.5849392", "0.57603025", "0.5732927", "0.573185", "0.57182527", "0.57088715", "0.56939936", "0.5657948", "0.5644235", "0.56385154", "0.56377983", "0.56049293", "0.55922", "0.5569054", "0.5562302", "0.5553418", "0.5552763", "0.5547208", "0.55368614", "0.5506232", "0.55045545", "0.5504081", "0.5486619", "0.54798394", "0.54573923", "0.54530656", "0.53981596", "0.5390074", "0.53818125", "0.5373538", "0.5369824", "0.5369154", "0.53406173", "0.5336019", "0.5336019", "0.532752", "0.53271705", "0.53206885", "0.53091264", "0.5302731", "0.5300126", "0.52801216", "0.5275665", "0.52746934", "0.5274649", "0.5273941", "0.526664", "0.52658576", "0.525857", "0.5244882", "0.52343947", "0.5229437", "0.521825", "0.52123404", "0.51966995", "0.5194048", "0.51816607", "0.51794386", "0.51793337", "0.51781505", "0.5170268", "0.51352674", "0.51352674", "0.51325524", "0.51310426", "0.51310426", "0.51274484", "0.51274264", "0.51261735", "0.51160896", "0.51136047", "0.51136047", "0.51106304", "0.5109947", "0.5109947", "0.5098464", "0.5092819", "0.5092819", "0.5092819", "0.5092819", "0.5092819", "0.5076092", "0.507166", "0.50697035", "0.5061513", "0.5059538", "0.5054566", "0.5048293" ]
0.5552894
28
Adds an array of events to the search index.
public function indexEvents(array $events, array $context = []): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_event(array $event) {\n if (empty($event['type']) or\n empty($event['name']) or\n empty($event['data'])) {\n return (false);\n }\n $this->__results[] =\n array('type' => $event['type'],\n 'name' => $event['name'],\n 'data' => $event['data']);\n return (true);\n }", "public function addEvent($event){\n $this->events[]=$event;\n }", "function theme_intranet_haarlem_search_events($options = array()){\n\t$defaults = array(\t'past_events' \t\t=> false,\n\t\t\t\t\t\t'count' \t\t\t=> false,\n\t\t\t\t\t\t'offset' \t\t\t=> 0,\n\t\t\t\t\t\t'limit'\t\t\t\t=> EVENT_MANAGER_SEARCH_LIST_LIMIT,\n\t\t\t\t\t\t'container_guid'\t=> null,\n\t\t\t\t\t\t'query'\t\t\t\t=> false,\n\t\t\t\t\t\t'meattending'\t\t=> false,\n\t\t\t\t\t\t'owning'\t\t\t=> false,\n\t\t\t\t\t\t'friendsattending' \t=> false,\n\t\t\t\t\t\t'region'\t\t\t=> null,\n\t\t\t\t\t\t'latitude'\t\t\t=> null,\n\t\t\t\t\t\t'longitude'\t\t\t=> null,\n\t\t\t\t\t\t'distance'\t\t\t=> null,\n\t\t\t\t\t\t'event_type'\t\t=> false,\n\t\t\t\t\t\t'past_events'\t\t=> false,\n\t\t\t\t\t\t'search_type'\t\t=> \"list\"\n\t\t\t\t\t\t\n\t);\n\t\n\t$options = array_merge($defaults, $options);\n\t\n\t$entities_options = array(\n\t\t'type' \t\t\t=> 'object',\n\t\t'subtype' \t\t=> 'event',\n\t\t'offset' \t\t=> $options['offset'],\n\t\t'limit' \t\t=> $options['limit'],\n\t\t'joins' => array(),\n\t\t'wheres' => array(),\n\t\t'order_by_metadata' => array(\"name\" => 'start_day', \"direction\" => 'ASC', \"as\" => \"integer\")\n\t);\n\t\n\tif (isset($options['entities_options'])) {\n\t\t$entities_options = array_merge($entities_options, $options['entities_options']);\n\t}\n\t\n\tif($options[\"container_guid\"]){\n\t\t// limit for a group\n\t\t$entities_options['container_guid'] = $options['container_guid'];\n\t}\n\t\n\tif($options['query']) {\n\t\t$entities_options[\"joins\"][] = \"JOIN \" . elgg_get_config(\"dbprefix\") . \"objects_entity oe ON e.guid = oe.guid\";\n\t\t$entities_options['wheres'][] = event_manager_search_get_where_sql('oe', array('title', 'description'), $options, false);\n\t}\n\t\t\t\t\n\tif(!empty($options['start_day'])) {\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_day', 'value' => $options['start_day'], 'operand' => '>=');\n\t}\n\t\n\tif(!empty($options['end_day'])) {\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_day', 'value' => $options['end_day'], 'operand' => '<=');\n\t}\n\t\n\tif(!$options['past_events']) {\n\t\t// only show from current day or newer\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_day', 'value' => mktime(0, 0, 1), 'operand' => '>=');\n\t}\n\t\n\tif($options['meattending']) {\n\t\t$entities_options['joins'][] = \"JOIN \" . elgg_get_config(\"dbprefix\") . \"entity_relationships e_r ON e.guid = e_r.guid_one\";\n\t\t\n\t\t$entities_options['wheres'][] = \"e_r.guid_two = \" . elgg_get_logged_in_user_guid();\n\t\t$entities_options['wheres'][] = \"e_r.relationship = '\" . EVENT_MANAGER_RELATION_ATTENDING . \"'\";\n\t}\n\t\n\tif($options['owning']) {\n\t\t$entities_options['owner_guids'] = array(elgg_get_logged_in_user_guid());\n\t}\n\t\n\tif($options[\"region\"]){\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'region', 'value' => $options[\"region\"]);\n\t}\n\t\n\tif($options[\"event_type\"]){\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'event_type', 'value' => $options[\"event_type\"]);\n\t}\n\t\n\tif($options['friendsattending']){\n\t\t$friends_guids = array();\n\t\t\n\t\tif($friends = elgg_get_logged_in_user_entity()->getFriends(\"\", false)) {\n\t\t\tforeach($friends as $user) {\n\t\t\t\t$friends_guids[] = $user->getGUID();\n\t\t\t}\n\t\t\t$entities_options['joins'][] = \"JOIN \" . elgg_get_config(\"dbprefix\") . \"entity_relationships e_ra ON e.guid = e_ra.guid_one\";\n\t\t\t$entities_options['wheres'][] = \"(e_ra.guid_two IN (\" . implode(\", \", $friends_guids) . \"))\";\n\t\t} else\t{\n\t\t\t// return no result\n\t\t\t$entities_options['joins'] = array();\n\t\t\t$entities_options['wheres'] = array(\"(1=0)\");\n\t\t}\n\t}\n\t\n\tif(($options[\"search_type\"] == \"onthemap\") && !empty($options['latitude']) && !empty($options['longitude']) && !empty($options['distance'])){\n\t\t$entities_options[\"latitude\"] = $options['latitude'];\n\t\t$entities_options[\"longitude\"] = $options['longitude'];\n\t\t$entities_options[\"distance\"] = $options['distance'];\n\t\t$entities = elgg_get_entities_from_location($entities_options);\n\t\t\t\n\t\t$entities_options['count'] = true;\n\t\t$count_entities = elgg_get_entities_from_location($entities_options);\n\t\t\n\t} else {\n\t\t\n\t\t$entities = elgg_get_entities_from_metadata($entities_options);\n\t\t\n\t\t$entities_options['count'] = true;\n\t\t$count_entities = elgg_get_entities_from_metadata($entities_options);\n\t}\n\t\n\t$result = array(\n\t\t\"entities\" \t=> $entities,\n\t\t\"count\" \t=> $count_entities\n\t\t);\n\t\t\n\treturn $result;\n}", "protected function _registerEvent(Mage_Index_Model_Event $event)\n {\n $event->addNewData(self::EVENT_MATCH_RESULT_KEY, TRUE);\n switch ($event->getEntity()) {\n case Mage_Catalog_Model_Product::ENTITY:\n $this->_registerCatalogProductEvent($event);\n break;\n case Mage_Catalog_Model_Category::ENTITY:\n $this->_registerCatalogCategoryEvent($event);\n break;\n case Mage_Catalog_Model_Convert_Adapter_Product::ENTITY:\n $event->addNewData('algoliasearch_reindex_all', TRUE);\n break;\n case Mage_Core_Model_Config_Data::ENTITY:\n $stores = TRUE;\n if ($event->getDataObject()->getScope() == 'stores') {\n $stores = array($event->getDataObject()->getScopeId());\n } else if ($event->getDataObject()->getScope() == 'websites') {\n $stores = Mage::app()->getWebsite($event->getDataObject()->getScopeId())->getStoreIds();\n }\n if (in_array($event->getDataObject()->getPath(), $this->_relatedConfigSettingsUpdate)) {\n $event->addNewData('algoliasearch_update_settings', $stores);\n } else if (in_array($event->getDataObject()->getPath(), $this->_relatedConfigSettingsReindex)) {\n $event->addNewData('algoliasearch_reindex_all', $stores);\n }\n break;\n case Mage_Core_Model_Store::ENTITY:\n case Mage_Catalog_Model_Resource_Eav_Attribute::ENTITY:\n case Mage_Core_Model_Store_Group::ENTITY:\n $event->addNewData('algoliasearch_reindex_all', TRUE);\n break;\n }\n }", "private function add_events()\r\n {\r\n $events = $this->events;\r\n foreach ($events as $time => $items)\r\n {\r\n $column = date('H', $time) / $this->hour_step + 1;\r\n foreach ($items as $item)\r\n {\r\n $content = $item['content'];\r\n $row = $item['index'] + 1;\r\n \r\n $cell_content = $this->getCellContents($row, $column);\r\n $cell_content .= $content;\r\n $this->setCellContents($row, $column, $cell_content);\r\n }\r\n }\r\n \r\n }", "public function register(SearchEvent $event)\n {\n $this->searchEvent = $event;\n $event->addModule($this, static::$elasticType);\n }", "public function indexAction() {\n\t\t// TODO Auto-generated IndexController::indexAction() default action\n\t\t\n\t\t\n\t\t$data = $this->table->fetchAllEvents($paginated = true, $page = $this->_request->page, $countPerPage = 3, $asArray = false);\n\t\t$this->view->data = $data;\n\t\t\n\t\t$this->view->form = new Events_Form_Search();\n\t}", "function add_eventoni_to_search()\n{\n\tif(is_search())\n\t{\n\t\t$results = eventoni_fetch('&wt='.urlencode(get_search_query()));\n\t\tif( $results['total'] <= 0 )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\techo '<div class=\"events-container\">';\n\t\techo '<img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/logo.png\" />';\n\t\t$counter = 0;\n\t\tforeach($results['xml'] as $event)\n\t\t{\n\t\t\t$counter++;\n\t\t\t$datetime = strtotime($event->start_date.' '.$event->start_time);\n\t\t\t$hours = getdate($datetime);\n\t\t\t$hour = $hours['hours'];\n\t\t\t$tageszeit = '';\n\t\t\tif( $hour < 6 ){\n\t\t\t\t$tageszeit = 'nachts';\n\t\t\t} else if( $hour < 12 ){\n\t\t\t\t$tageszeit = 'morgens';\n\t\t\t} else if( $hour < 14 ){\n\t\t\t\t$tageszeit = 'mittags';\n\t\t\t} else if( $hour < 18 ){\n\t\t\t\t$tageszeit = 'nachmittags';\n\t\t\t} else if( $hour < 22 ){\n\t\t\t\t$tageszeit = 'abends';\n\t\t\t} else {\n\t\t\t\t$tageszeit = 'nachts';\n\t\t\t}\n\t\t\techo ' <div class=\"event-item\">';\n\t\t\techo '<a class=\"event-item-link\" href=\"'.$event->permalink.'\">';\n\t\t\tif(isset($event->media_list->media->thumbnail_url)) {\n\t\t\t\techo '<img width=\"60px\" height\"60px\" align=\"left\" src=\"'.$event->media_list->media->thumbnail_url.'\"/>';\n\t\t\t} else {\n\t\t\t\techo '<img width=\"60px\" height\"60px\" align=\"left\" src=\"http://static.eventoni.com/images/image-blank.png\"/>';\n\t\t\t}\n\t\t\techo '</a>';\n\t\t\techo '\t <div class=\"event-item-content\">';\n\t\t\techo '\t\t<div class=\"event-item-content-date\">'.date( \"d.m.Y\", $datetime ).', '.date( \"H:i \\U\\h\\\\r\", $datetime ).'</div>';\n\t\t\techo '\t\t<div class=\"event-item-content-city\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/my_location.png\"/> '.$event->location->city.'</div>';\n\t\t\techo '\t </div>';\n\t\t\techo '\t <div class=\"event-item-content-name\"><b><a class=\"event-item-link\" href=\"'.$event->permalink.'\">'.$event->title.'</a></b></div>';\n\t\t\techo '\t <div style=\"float:right;\"><a class=\"facebook_link\" href=\"http://www.facebook.com/sharer.php?u='.$event->permalink.'&t=Dieses Event musst Du gesehen haben: \" target=\"_blank\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/facebook.png\" /></a></div>';\n\t\t\techo '\t <div style=\"float:right;\"><a class=\"twitter_link\" href=\"http://twitter.com/home?status=Dieses Event musst Du gesehen haben: '.$event->permalink.'\" target=\"_blank\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/twitter.png\" /></a></div>';\n\t\t\techo ' </div>';\n\t\t\tif( $counter >= 3 ){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\techo '</div>';\n\t}\n}", "public function searchEvents(Message $request, ParsedQuery $parsedQuery, Message $response, array $curies = [], array $context = []): void;", "public function setEvents(array $events)\n\t{\n\t\t$this->events = $events;\n\t}", "public function setEvents(array $events)\n {\n $this->events = $events;\n return $this;\n }", "public function setEvents(array $events)\n {\n $this->events = $events;\n return $this;\n }", "public function setEvents(array $events) {\n $this->_events = $events;\n return $this;\n }", "public function actionIndex()\n {\n Yii::$app->cache->gc(true);\n $searchModel = new EventSearchForm();\n\n $query = Event::find()->where(['>=', 'UNIX_TIMESTAMP(end_date)', time()]);\n\n $query = $query->joinWith('user');\n\n $pagination = new Pagination([\n 'defaultPageSize' => 10,\n 'totalCount' => $query->count(),\n ]);\n\n $goa = new GoaBaseApi();\n\n if (Yii::$app->cache->get('goabase') == NULL) { //if not in cache load from api\n //list of goa parties, Type: ArrayList with Events\n $goaParties = $goa->getParties();\n Yii::$app->cache->set('goabase', $goaParties, 300);\n } else { //load from cache\n $goaParties = Yii::$app->cache->get('goabase');\n }\n // Event List ordered by date\n $eventList = $query->orderBy('start_date')->all();\n\n // Daten für die Autovervollständiung\n foreach($eventList as $eventName)\n array_push($searchModel->eventNameList, $eventName->name);\n\n //-----Add GoaParties to eventList--------\n $goaId = $query->count();\n\n //append goaparties to eventList (intern parties)\n for ($i=0 ; $i < count($goaParties) ; $i++) {\n $eventList[$goaId] = $goaParties[$i];\n ++$goaId;\n }\n\n // Sort Event List\n $eventList = $this->sortEventList($eventList);\n\n // Top Events\n $topList = $query->orderBy(['clicks' => SORT_DESC])->limit(3)->all();\n\n // New Events\n $newList = $query->orderBy(['creation_date' => SORT_DESC])->limit(3)->all();\n\n return $this->render('index', ['searchModel' => $searchModel,\n 'eventList' => $eventList,\n 'pagination' => $pagination, 'topList' => $topList, 'newList' => $newList]);\n }", "public function addInstructorsToEvents(array $events);", "public function searchEventLogs($request)\n {\n return $this->start()->uri(\"/api/system/event-log/search\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function indexSolrDocs(){\n\t\t$solrDocArray = $this->solrDocArray;\n\t\tif(is_array($solrDocArray)){\n\t\t\t$solr = new Apache_Solr_Service('localhost', 8983, '/solr');\n\t\t\t\n\t\t\tif ($solr->ping()) { // if we can ping the solr server...\n\t\t\t\ttry{\n\t\t\t\t\t$updateResponse = $solr->addDocuments($solrDocArray);\n\t\t\t\t\t$solr->commit();\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t$errors = $this->errors;\n\t\t\t\t\t$errors[] = $e->getMessage(); \n\t\t\t\t\t$this->errors = $errors;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t$errors = $this->errors;\n\t\t\t$errors[] = $this->errors = \"Solr Down: failed to respond to ping.\"; \n\t\t\t$this->errors = $errors;\n\t\t\t}\n\t\t\t\n\t\t}//yes, we do have docs to add\n\t\t\n }", "public function run()\n {\n $events = [\n [\n \"Bitcorn Harvest #3\",\n \"2,625,000 Bitcorn - What a lovely day in Autumn it will be!\",\n \"https://bitcorn.org/storage/events/fNg2Fz6NmAPe2JCr7f15ikr3ADJJsozGny0moJqC.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2018-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #4\",\n \"2,625,000 Bitcorn - Last harvest at this level. Halvening soon!\",\n \"https://bitcorn.org/storage/events/EGcAKsTaubN9nFqsCTUQOvSuSQPDAvt4vC4VkuOF.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-01-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #5\",\n \"1,312,500 Bitcorn - Harvesting has become back breaking work...\",\n \"https://bitcorn.org/storage/events/Wjmuakz7IvVHce4jBUbvIviG4ObTqWv4sR6TfN6Q.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-04-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #6\",\n \"1,312,500 Bitcorn - Remember 2018? Pepperidge Farms remembers...\",\n \"https://bitcorn.org/storage/events/ABZtytBwKBj0YvmqcvORZ9iZsIe9MUSuTXWd6CKC.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-07-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #7\",\n \"1,312,500 Bitcorn - Spooktacular harvest everyone! See you soon in 2020...\",\n \"https://bitcorn.org/storage/events/a9JmkLquKviuAC7emrkfe9IY0PUtZuVeu0Uzycld.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2019-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #8\",\n \"1,312,500 Bitcorn - BURRRR... I thought the future would be warmer!\",\n \"https://bitcorn.org/storage/events/14xL5Ta2roxBRtFi0uis9Qzzy3gHsktnx56lzk3o.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-01-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #9\",\n \"787,500 Bitcorn - Ooph! Someone check the BITCORNSILO we're running low!?\",\n \"https://bitcorn.org/storage/events/uAJ2L3c6azRYyTyI5FANZj4Nl4JiTrGmGrx8QRZo.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-04-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #10\",\n \"787,500 Bitcorn - If this keeps up we're going to run out of corn!\",\n \"https://bitcorn.org/storage/events/ksxx5ho2VLUYtZZjTbhmvB0ufYbnWVMnVI2VULrI.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-07-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #11\",\n \"787,500 Bitcorn - Autumn corn tastes better with 11 herbs and spices.\",\n \"https://bitcorn.org/storage/events/ka3t2sCKOMCmWQMgd891dXxd83Ket5If8tpJF6fN.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2020-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #12\",\n \"787,500 Bitcorn - Final halvening is now on the horizon. This is fine...\",\n \"https://bitcorn.org/storage/events/3wRU6wNaUqVP6proNvYwqAMVL70cPSyn0w34rN1n.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-01-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #13\",\n \"525,000 Bitcorn - It's a good thing that my coop is alpha... #SQUADGOALS\",\n \"https://bitcorn.org/storage/events/eh3evSat3inAoQ4dSRnba0ffUoIVR8Au24xwY4Cj.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-04-10 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #14\",\n \"525,000 Bitcorn - Extreme heat and over-farming is taking its toll...\",\n \"https://bitcorn.org/storage/events/qgGOigYkbkjOMR5kGVpytXZGE0blXddsHd18wIV5.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-07-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #15\",\n \"525,000 Bitcorn - Denial begins to set in about who will win #BRAGGING rights.\",\n \"https://bitcorn.org/storage/events/7CyP2gfcWq1Lr37IxLnD2xEQAN5Jv9VjmyPtViVa.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2021-10-01 00:00:00\"\n ],\n [\n \"Bitcorn Harvest #16\",\n \"525,000 Bitcorn - The roots of all BITCORN CROPS are tapped dry. Sad!\",\n \"https://bitcorn.org/storage/events/knIRPINIE4RZyr0DEIx46q5y5nvyaEZNgX6rPkf0.jpeg\",\n \"https://bitcorns.com/almanac\",\n \"2022-01-01 00:00:00\"\n ]\n ];\n\n foreach($events as $event)\n {\n Event::create([\n 'name' => $event[0],\n 'description' => $event[1],\n 'image_url' => $event[2],\n 'event_url' => $event[3],\n 'scheduled_at' => $event[4],\n ]);\n }\n }", "public function get_events($args = [])\n {\n global $db, $system;\n /* initialize arguments */\n $user_id = !isset($args['user_id']) ? null : $args['user_id'];\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n $get_all = !isset($args['get_all']) ? false : true;\n $suggested = !isset($args['suggested']) ? false : true;\n $random = !isset($args['random']) ? false : true;\n $managed = !isset($args['managed']) ? false : true;\n $filter = !isset($args['filter']) ? \"admin\" : $args['filter'];\n $results = !isset($args['results']) ? $system['max_results_even'] : $args['results'];\n /* initialize vars */\n $events = [];\n $offset *= $results;\n /* get suggested events */\n if ($suggested) {\n $where_statement = \"\";\n /* make a list from joined events */\n $events_ids = $this->get_events_ids();\n if ($events_ids) {\n $events_list = implode(',', $events_ids);\n $where_statement .= \"AND event_id NOT IN (\" . $events_list . \") \";\n }\n $sort_statement = ($random) ? \" ORDER BY RAND() \" : \" ORDER BY event_id DESC \";\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n $get_events = $db->query(\"SELECT * FROM `events` WHERE event_privacy != 'secret' \" . $where_statement . $sort_statement . $limit_statement) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"taget\" all events who admin */\n } elseif ($managed) {\n $get_events = $db->query(sprintf(\"SELECT * FROM `events` WHERE event_admin = %s ORDER BY event_id DESC\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"viewer\" events who (going|interested|invited|admin) */\n } elseif ($user_id == null) {\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n switch ($filter) {\n case 'going':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_going = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n case 'interested':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_interested = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n case 'invited':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_invited = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n default:\n $get_events = $db->query(sprintf(\"SELECT * FROM `events` WHERE event_admin = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n }\n /* get the \"target\" events */\n } else {\n /* get the target user's privacy */\n $get_privacy = $db->query(sprintf(\"SELECT user_privacy_events FROM users WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n $privacy = $get_privacy->fetch_assoc();\n /* check the target user's privacy */\n if (!$this->check_privacy($privacy['user_privacy_events'], $user_id)) {\n return $events;\n }\n /* if the viewer not the target exclude secret groups */\n $where_statement = ($this->_data['user_id'] == $user_id) ? \"\" : \"AND `events`.event_privacy != 'secret'\";\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE (events_members.is_going = '1' OR events_members.is_interested = '1') AND events_members.user_id = %s \" . $where_statement . \" ORDER BY event_id DESC \" . $limit_statement, secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n }\n if ($get_events->num_rows > 0) {\n while ($event = $get_events->fetch_assoc()) {\n $event['event_picture'] = get_picture($event['event_cover'], 'event');\n /* check if the viewer joined the event */\n $event['i_joined'] = $this->check_event_membership($this->_data['user_id'], $event['event_id']);;\n $events[] = $event;\n }\n }\n return $events;\n }", "public function add(array $entry);", "public function addCriteria(array $criteria);", "protected function addIndex()\n {\n $sitemapIndexHeader = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'\n . ($this->includeGeneratorInfo ? $this::$generatorInfo : '')\n . '<sitemapindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"'\n . ' xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9'\n . ' http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd\"'\n . ' xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">'\n . '</sitemapindex>';\n $this->indexes[] = [\n 'xml' => new \\SimpleXMLElement($sitemapIndexHeader),\n 'filename' => '',\n ];\n }", "public function listAction()\r\n\t{\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\t\t$this -> view -> business = $business = Engine_Api::_() -> core() -> getSubject();\r\n\t\t$this -> view -> form = $form = new Ynbusinesspages_Form_Event_Search;\r\n\t\t$val = $this -> _getAllParams();\r\n\t\t// Populate form data\r\n\t\tif (!$form -> isValid($val))\r\n\t\t{\r\n\t\t\t$form -> populate($defaultValues);\r\n\t\t\t$this -> view -> formValues = $values = array();\r\n\t\t\t$this -> view -> message = \"The search value is not valid !\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$values = $form -> getValues();\r\n\t\t$values['business_id'] = $business -> getIdentity();\r\n\t\t// Prepare data\r\n\t\t$this -> view -> formValues = $values = array_merge($values, $_GET);\r\n\t\t\r\n\t\t// Check create event authorization\r\n\t\t$this -> view -> canCreate = $business -> isAllowed('event_create');\r\n\t\t//Get data\r\n\t\t$this -> view -> paginator = $paginator = Engine_Api::_()->getDbTable('mappings', 'ynbusinesspages') -> getEventsPaginator($values);\r\n\t\t$paginator -> setCurrentPageNumber($this -> _getParam('page'));\r\n\t}", "public function addSearchIndex($key, SearchIndex $value)\n {\n return parent::add($key, $value);\n }", "public function getEvents(array $filters = array());", "public function add($sportevents)\n {\n $count = 0;\n\n $sportevents = Collection::wrap($sportevents)->map(function ($sportevent) use (&$count) {\n $sportevent = $sportevent instanceof Closure ? CallQueuedClosure::create($sportevent) : $sportevent;\n\n if (is_array($sportevent)) {\n $count += count($sportevent);\n\n return with($this->prepareBatchedChain($sportevent), function ($chain) {\n return $chain->first()->chain($chain->slice(1)->values()->all());\n });\n } else {\n $sportevent->withBatchId($this->id);\n\n $count++;\n }\n\n return $sportevent;\n });\n\n $this->repository->transaction(function () use ($sportevents, $count) {\n $this->repository->incrementTotalsportevents($this->id, $count);\n\n $this->queue->connection($this->options['connection'] ?? null)->bulk(\n $sportevents->all(),\n $data = '',\n $this->options['queue'] ?? null\n );\n });\n\n return $this->fresh();\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 }", "function addEvent($event) {\n Event::addEvent($event);\n }", "public function AddEventHandler(&$array, $evt, $code)\n {\n if(isset($array[$evt]))\n $array[$evt] .= ';' . $code;\n else\n $array[$evt] = $code;\n }", "public function index() {\n\t\tSearch::index($this->table)->insert(\n\t\t\t$this['slug'],\n\t\t\t[\n\t\t\t\t'title'\t\t=> $this['title'],\n\t\t\t\t'text'\t\t=> $this['text'],\n\t\t\t\t'category'\t=> $this->category->name,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'_type'\t\t=> $this->table,\n\t\t\t]\n\t\t);\n\t}", "public function registerSearch(array $models): self\n {\n static::$options['search'] = array_merge($models, static::$options['search'] ?? []);\n\n return $this;\n }", "public function test_courses_searched_event() {\n\n // Trigger an event: courses searched.\n $search = 'mysearch';\n $eventparams = array(\n 'context' => context_system::instance(),\n 'other' => array('query' => $search)\n );\n\n $event = \\core\\event\\courses_searched::create($eventparams);\n // Trigger and capture the event.\n $sink = $this->redirectEvents();\n $event->trigger();\n $events = $sink->get_events();\n $event = reset($events);\n\n // Check that the event data is valid.\n $this->assertInstanceOf('\\core\\event\\courses_searched', $event);\n $this->assertEquals($search, $event->other['query']);\n $this->assertDebuggingNotCalled();\n $sink->close();\n\n }", "public function searchEvents($searchString)\n {\n $qb = $this->entityManager->getRepository(Event::class)->createQueryBuilder('e');\n $orX = $qb->expr()->orX();\n $orX->add($qb->expr()->like('e.title', $qb->expr()->literal(\"%$searchString%\")));\n $orX->add($qb->expr()->like('e.labelText', $qb->expr()->literal(\"%$searchString%\")));\n $orX->add($qb->expr()->like('e.text', $qb->expr()->literal(\"%$searchString%\")));\n $qb->where($orX);\n $qb->orderBy('e.eventStartDate', 'DESC');\n return $qb->getQuery();\n }", "public function addEvents($events)\n\t{\n\t\t$this->_validateEventsArray($events);\n\t\tforeach ($events as $type => $handler)\n\t\t{\n\t\t\t$this->addEvent($type, $handler);\n\t\t}\n\t\treturn $this;\n\t}", "function ap_search_results($data){\n $args = array(\n 'post_status'=>'publish',\n 'post_type'=> array('post', 'page'),\n 's' => sanitize_text_field($data['term'])\n);\n\t$main_query = new \\WP_Query($args);\n\t$event_query = tribe_get_events(array(\n\t\t\t\t\t'start_date' => date( 'Y-m-d H:i:s' ),\n\t\t\t\t\t's' => sanitize_text_field($data['term']),\n\n\t));\n\n\t $results = array(\n\t\t'pages' => array(),\n\t\t'posts' => array(),\n\t\t'events' => array()\n\t );\n\n\tforeach ($event_query as $event){\n\t\tarray_push($results['events'], array(\n\t\t\t\t'title' => $event->post_title,\n\t\t\t\t'permalink' => get_permalink($event->ID),\n\t\t\t\t'day' => tribe_get_start_date($event->ID, false, 'j'),\n\t\t\t\t'month' => tribe_get_start_date($event->ID, false, 'M')\n\t\t\t));\n\t}\n\n\twhile($main_query ->have_posts()) {\n\t\t$main_query -> the_post();\n\n\t\tif(get_post_type() == 'page'){\n\t\t\tarray_push($results['pages'], array(\n\t\t\t\t'title' => get_the_title(),\n\t\t\t\t'permalink' => get_the_permalink()\n\t\t\t));\n\t\t }\n\t\tif(get_post_type() == 'post'){\n\t\t\tarray_push($results['posts'], array(\n\t\t\t\t'title' => get_the_title(),\n\t\t\t\t'permalink' => get_the_permalink(),\n\t\t\t\t'postType' => get_post_type(),\n\t\t\t\t'publishDate' => get_the_date()\n\t\t\t));\n\t\t }\n\t }\n\n\t return $results;\n }", "protected function setEvents()\n {\n foreach ($this->preloadList as $preload) {\n include_once XOOPS_ROOT_PATH . '/modules/' . $preload['module'] . '/preloads/' . $preload['file']. '.php';\n $class_name = ucfirst($preload['module'])\n . ($preload['file'] == 'preload' ? '' : ucfirst($preload['file']) )\n . 'Preload';\n if (!class_exists($class_name)) {\n continue;\n }\n $class_methods = get_class_methods($class_name);\n foreach ($class_methods as $method) {\n if (strpos($method, 'event') === 0) {\n $event_name = strtolower(str_replace('event', '', $method));\n $event= array($class_name, $method);\n $this->eventListeners[$event_name][] = $event;\n }\n }\n }\n }", "protected function scanEvents()\n {\n $scans = $this->eventScans();\n\n if (empty($scans)) {\n return;\n }\n\n $scanner = $this->app->make('annotations.event.scanner');\n\n $scanner->setClassesToScan($scans);\n\n file_put_contents(\n $this->finder->getScannedEventsPath(), '<?php '.$scanner->getEventDefinitions()\n );\n }", "public function _add_incident_filters()\n\t{\n\t\t$params = Event::$data;\n\t\t$params = array_merge($params, $this->params);\n\t\tEvent::$data = $params;\n\t}", "public function postCreate() {\n if ($this->enabled) {\n $this->queueItems();\n }\n $server = $this->server();\n if ($server) {\n // Tell the server about the new index.\n if ($server->enabled) {\n $server->addIndex($this);\n }\n else {\n $tasks = variable_get('search_api_tasks', array());\n // When we add or remove an index, we can ignore all other tasks.\n $tasks[$server->machine_name][$this->machine_name] = array('add');\n variable_set('search_api_tasks', $tasks);\n }\n }\n }", "function admin_index() {\n\t\t$this->Event->recursive = 0;\n\t\t$this->set('events',$this->paginate());\n\t}", "public function listeners($event);", "function onSearch($text, $phrase = '', $ordering = '', $areas = null)\n\t{\n\n\t\t$db = Factory::getDbo();\n\t\t$user = Factory::getUser();\n\t\t$app = Factory::getApplication();\n\t\t$groups = implode(',', $user->getAuthorisedViewLevels());\n\n\t\t$limit = $this->params->get('search_limit', 50);\n\t\t$dateformat = $this->params->get('date_format', \"%d %B %Y\");\n\t\t$allLanguages = $this->params->get('all_language_search', true);\n\n\t\t$limit = \"\\n LIMIT $limit\";\n\n\t\t$text = trim($text);\n\t\tif ($text == '')\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tif (is_array($areas))\n\t\t{\n\t\t\t$test = array_keys(plgSearchEventsSearchAreas());\n\t\t\tif (!array_intersect($areas, array_keys(plgSearchEventsSearchAreas())))\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t\t}\n\n\t\t$params = ComponentHelper::getParams(\"com_jevents\");\n\n\t\t// See http://www.php.net/manual/en/timezones.php\n\t\t$tz = $params->get(\"icaltimezonelive\", \"\");\n\t\tif ($tz != \"\" && is_callable(\"date_default_timezone_set\"))\n\t\t{\n\t\t\t$timezone = date_default_timezone_get();\n\t\t\tdate_default_timezone_set($tz);\n\t\t\t$this->jeventstimezone = $timezone;\n\t\t}\n\n\t\t$search_ical_attributes = array('det.summary', 'det.description', 'det.location', 'det.contact', 'det.extra_info');\n\n\t\t// process the new plugins\n\t\t// get extra data and conditionality from plugins\n\t\t$extrawhere = array();\n\t\t$extrajoin = array();\n\t\t$needsgroup = false;\n\n\t\t$filterarray = array(\"published\");\n\n\t\t$dataModel = new JEventsDataModel();\n\t\t$compparams = ComponentHelper::getParams(\"com_jevents\");\n\t\tif ($compparams->get(\"multicategory\", 0))\n\t\t{\n\t\t\t$catwhere = \"\\n AND catmap.catid IN(\" . $dataModel->accessibleCategoryList(null, null, null, $allLanguages) . \")\";\n\t\t\t$catjoin = \"\\n LEFT JOIN #__jevents_catmap as catmap ON catmap.evid = rpt.eventid\";\n\t\t\t$catjoin .= \"\\n LEFT JOIN #__categories AS b ON catmap.catid = b.id\";\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$catwhere = \"\\n AND ev.catid IN(\" . $dataModel->accessibleCategoryList(null, null, null, $allLanguages) . \")\";\n\t\t\t$catjoin = \"\\n INNER JOIN #__categories AS b ON b.id = ev.catid\";\n\t\t}\n\n\t\t// If there are extra filters from the module then apply them now\n\t\t$reg = Factory::getConfig();\n\t\t$modparams = $reg->get(\"jev.modparams\", false);\n\t\tif ($modparams && $modparams->get(\"extrafilters\", false))\n\t\t{\n\t\t\t$filterarray = array_merge($filterarray, explode(\",\", $modparams->get(\"extrafilters\", false)));\n\t\t}\n\n\t\t$filters = jevFilterProcessing::getInstance($filterarray);\n\t\t$filters->setWhereJoin($extrawhere, $extrajoin);\n\t\t$needsgroup = $filters->needsGroupBy();\n\n\t\tPluginHelper::importPlugin('jevents');\n\t\t$extrafields = \"\"; // must have comma prefix\n\t\t$extratables = \"\"; // must have comma prefix\n\t\t$app->triggerEvent('onListIcalEvents', array(& $extrafields, & $extratables, & $extrawhere, & $extrajoin, & $needsgroup));\n\t\t$extrajoin = (count($extrajoin) ? \" \\n LEFT JOIN \" . implode(\" \\n LEFT JOIN \", $extrajoin) : '');\n\t\t$extrawhere = (count($extrawhere) ? ' AND ' . implode(' AND ', $extrawhere) : '');\n\n\t\t$extrasearchfields = array();\n\t\t// NB extrajoin is a string from now on\n\t\t$app->triggerEvent('onSearchEvents', array(& $extrasearchfields, & $extrajoin, & $needsgroup));\n\n\t\t$wheres = array();\n\t\t$wheres_ical = array();\n\t\tswitch ($phrase)\n\t\t{\n\t\t\tcase 'exact':\n\t\t\t\t$text = $db->Quote('%' . $db->escape($text, true) . '%', false);\n\t\t\t\t// ical\n\t\t\t\t$wheres2 = array();\n\t\t\t\tforeach ($search_ical_attributes as $search_item)\n\t\t\t\t{\n\t\t\t\t\t$wheres2[] = \"LOWER($search_item) LIKE \" . $text;\n\t\t\t\t}\n\t\t\t\t$where_ical = '(' . implode(') OR (', $wheres2) . ')';\n\t\t\t\tbreak;\n\t\t\tcase 'all':\n\t\t\tcase 'any':\n\t\t\tdefault:\n\t\t\t\t$words = explode(' ', $text);\n\t\t\t\t$text = $db->Quote('%' . $db->escape($text, true) . '%', false);\n\n\t\t\t\t// ical\n\t\t\t\t$wheres = array();\n\t\t\t\tforeach ($words as $word)\n\t\t\t\t{\n\t\t\t\t\t$word = $db->Quote('%' . $db->escape($word) . '%', false);\n\t\t\t\t\t$wheres2 = array();\n\t\t\t\t\tforeach ($search_ical_attributes as $search_item)\n\t\t\t\t\t{\n\t\t\t\t\t\t$wheres2[] = \"LOWER($search_item) LIKE \" . $word;\n\t\t\t\t\t}\n\t\t\t\t\t$wheres[] = implode(' OR ', $wheres2);\n\t\t\t\t}\n\t\t\t\t$where_ical = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (count($extrasearchfields) > 0)\n\t\t{\n\t\t\t$extraor = implode(\" OR \", $extrasearchfields);\n\t\t\t$extraor = \" OR \" . $extraor;\n\t\t\t// replace the ### placeholder with the keyword\n\t\t\t// $text is already exscaped above\n\t\t\t$extraor = str_replace(\"###\", $text, $extraor);\n\n\t\t\t$where_ical .= $extraor;\n\t\t}\n\t\t// some of the where statements may already be escaped \n\t\t$where_ical = str_replace(\"%'%'\", \"%'\", $where_ical);\n\t\t$where_ical = str_replace(\"''\", \"'\", $where_ical);\n\t\t$where_ical = str_replace(\"'%'%\", \"'%\", $where_ical);\n\n\t\t$morder = '';\n\t\t$morder_ical = '';\n\t\tswitch ($ordering)\n\t\t{\n\t\t\tcase 'oldest':\n\t\t\t\t$order = 'a.created ASC';\n\t\t\t\t$order_ical = 'det.created ASC';\n\t\t\t\tbreak;\n\n\t\t\tcase 'popular':\n\t\t\t\t$order = 'a.hits DESC';\n\t\t\t\t$order_ical = 'det.created ASC'; // no hit field available\n\t\t\t\tbreak;\n\n\t\t\tcase 'alpha':\n\t\t\t\t$order = 'a.title ASC';\n\t\t\t\t$order_ical = 'det.summary ASC';\n\t\t\t\tbreak;\n\n\t\t\tcase 'category':\n\t\t\t\t$order = 'b.title ASC, a.title ASC';\n\t\t\t\t$morder = 'a.title ASC';\n\t\t\t\t$order_ical = 'b.title ASC, det.summary ASC';\n\t\t\t\t$morder_ical = 'det.summary ASC';\n\t\t\t\tbreak;\n\n\t\t\tcase 'newest':\n\t\t\tdefault:\n\t\t\t\t$order = 'a.created DESC';\n\t\t\t\t$order_ical = 'det.created DESC';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$eventstitle = $db->escape(Text::_(\"JEV_EVENT_CALENDAR\"));\n\t\t// Now Search Icals\n\t\t$display2 = array();\n\t\tforeach ($search_ical_attributes as $search_ical_attribute)\n\t\t{\n\t\t\t$display2[] = \"$search_ical_attribute\";\n\t\t}\n\t\t$display = 'CONCAT(' . implode(\", ' ', \", $display2) . ')';\n\t\t$query = \"SELECT det.evdet_id, det.summary as title,\"\n\t\t\t. \"\\n ev.created as created,\"\n\t\t\t. \"\\n $display as text,\"\n\t\t\t. \"\\n CONCAT('$eventstitle','/', det.summary) AS section,\"\n\t\t\t. \"\\n CONCAT('index.php?option=com_jevents&task=icalrepeat.detail&evid=',min(rpt.rp_id)) AS href,\"\n\t\t\t. \"\\n '2' AS browsernav ,\"\n\t\t\t. \"\\n rpt.startrepeat, rpt.rp_id \"\n\t\t\t. \"\\n FROM #__jevents_vevent as ev\"\n\t\t\t. \"\\n LEFT JOIN #__jevents_repetition as rpt ON rpt.eventid = ev.ev_id\"\n\t\t\t. $catjoin\n\t\t\t. \"\\n LEFT JOIN #__jevents_vevdetail as det ON det.evdet_id = rpt.eventdetail_id\"\n\t\t\t. \"\\n LEFT JOIN #__jevents_icsfile as icsf ON icsf.ics_id = ev.icsid\"\n\t\t\t. $extrajoin\n\t\t\t. \"\\n WHERE ($where_ical)\"\n\t\t\t. \"\\n AND icsf.state = 1\"\n\t\t\t. \"\\n AND icsf.access IN ( $groups )\"\n\t\t\t. \"\\n AND ev.state = 1\"\n\t\t\t. \"\\n AND ev.access IN ( $groups )\"\n\t\t\t. \"\\n AND b.access IN ( $groups )\"\n\t\t\t. \"\\n AND b.published = '1'\"\n\t\t\t. $extrawhere\n\t\t\t. $catwhere\n\t\t\t. \"\\n GROUP BY det.evdet_id\"\n\t\t\t. \"\\n ORDER BY \" . ($morder_ical ? $morder_ical : $order_ical)\n\t\t\t. $limit;\n\n\t\t$db->setQuery($query);\n\n\t\t$list_ical = $db->loadObjectList('evdet_id');\n\n\t\tjimport('joomla.utilities.date');\n\t\tif ($list_ical)\n\t\t{\n\t\t\tforeach ($list_ical as $id => $item)\n\t\t\t{\n\n\t\t\t\t$user = Factory::getUser();\n\t\t\t\t$query = \"SELECT ev.*, ev.state as published, rpt.*, rr.*, det.*, ev.created as created, ex_id, exception_type \"\n\t\t\t\t\t. \"\\n , YEAR(rpt.startrepeat) as yup, MONTH(rpt.startrepeat ) as mup, DAYOFMONTH(rpt.startrepeat ) as dup\"\n\t\t\t\t\t. \"\\n , YEAR(rpt.endrepeat ) as ydn, MONTH(rpt.endrepeat ) as mdn, DAYOFMONTH(rpt.endrepeat ) as ddn\"\n\t\t\t\t\t. \"\\n , HOUR(rpt.startrepeat) as hup, MINUTE(rpt.startrepeat ) as minup, SECOND(rpt.startrepeat ) as sup\"\n\t\t\t\t\t. \"\\n , HOUR(rpt.endrepeat ) as hdn, MINUTE(rpt.endrepeat ) as mindn, SECOND(rpt.endrepeat ) as sdn\"\n\t\t\t\t\t. \"\\n FROM #__jevents_vevent as ev\"\n\t\t\t\t\t. \"\\n LEFT JOIN #__jevents_repetition as rpt ON rpt.eventid = ev.ev_id\"\n\t\t\t\t\t. \"\\n LEFT JOIN #__jevents_vevdetail as det ON det.evdet_id = rpt.eventdetail_id\"\n\t\t\t\t\t. \"\\n LEFT JOIN #__jevents_rrule as rr ON rr.eventid = ev.ev_id\"\n\t\t\t\t\t. \"\\n LEFT JOIN #__jevents_exception as ex ON det.evdet_id = ex.eventdetail_id\"\n\t\t\t\t\t. \"\\n WHERE ev.access IN ('\" . $groups . \"')\"\n\t\t\t\t\t. \"\\n AND det.evdet_id = $id\"\n\t\t\t\t\t. \"\\n ORDER BY rpt.startrepeat ASC limit 1\";\n\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$row = $db->loadObject();\n\t\t\t\tif (!$row)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$event = new jIcalEventRepeat($row);\n\t\t\t\t// only get the next repeat IF its not an exception\n\t\t\t\tif (is_null($row->ex_id))\n\t\t\t\t{\n\t\t\t\t\t$event = $event->getNextRepeat();\n\t\t\t\t}\n\n\t\t\t\t$startdate = new JevDate(strtotime($event->_startrepeat));\n\t\t\t\t$item->title = $item->title . \" (\" . $startdate->toFormat($dateformat) . \")\";\n\t\t\t\t$item->startrepeat = $event->_startrepeat;\n\n\t\t\t\t$myitemid = $this->params->get(\"target_itemid\", 0);\n\t\t\t\tif ($myitemid == 0)\n\t\t\t\t{\n\t\t\t\t\t// I must find the itemid that allows this event to be shown\n\t\t\t\t\t$catidsOut = $modcatids = $catidList = $modparams = $showall = \"\";\n\t\t\t\t\t// Use the plugin params to ensure menu item is picked up\n\t\t\t\t\t//$modparams = new JevRegistry($this->_plugin->params);\n\t\t\t\t\t$modparams = new JevRegistry(null);\n\t\t\t\t\t// pretend to have category restriction\n\t\t\t\t\t$modparams->set(\"catid0\", $row->catid);\n\t\t\t\t\t$modparams->set(\"ignorecatfilter\", 1);\n\n\t\t\t\t\t$myitemid = findAppropriateMenuID($catidsOut, $modcatids, $catidList, $modparams->toObject(), $showall);\n\t\t\t\t}\n\t\t\t\t$item->href = $event->viewDetailLink($event->yup(), $event->mup(), $event->dup(), false, $myitemid);\n\t\t\t\t$link = $item->href;\n\n\t\t\t\t$list_ical[$id] = $item;\n\t\t\t}\n\t\t}\n\n\t\t// Must reset the timezone back!!\n\t\tif ($tz && is_callable(\"date_default_timezone_set\"))\n\t\t{\n\t\t\tdate_default_timezone_set($timezone);\n\t\t}\n\n\t\treturn $list_ical;\n\n\t}", "protected static function events()\n {\n foreach (self::fetch('app/events', false) as $file) {\n Bus::need($file);\n }\n //\n Event::register();\n }", "protected function _insertOrUpdateSearchIndex()\r\n {\r\n $dataHandler = new ThemeHouse_ConvSearch_Search_DataHandler_ConversationMessage();\r\n\r\n $indexer = new XenForo_Search_Indexer();\r\n $dataHandler->insertIntoIndex($indexer, $this->getMergedData());\r\n }", "public function setEvents(array $events)\n {\n foreach ($events as $event) {\n $event->ensureStopped();\n }\n\n $this->data['events'] = $events;\n }", "public function define($events) {\n if(!is_array($events)) {\n $events = [$events];\n }\n\n array_walk($events, function($value) {\n $value = $this->formatEventName($value);\n });\n\n $this->definitions = array_unique(\n array_merge($this->definitions, $events)\n );\n }", "private function initEvents() : void {\n\n $arenas = MineceitCore::getArenas()->getEventArenas();\n\n foreach($arenas as $arena) {\n $this->createEvent($arena);\n }\n }", "public function add(array $elements);", "public function getSearchArray();", "protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }", "public function viewAllEvents();", "public function testContainsEventUsesCachedAddEvent()\n\t{\n\t\t$application_id = 1;\n\t\t$event_name = \"containsEventEvent\";\n\t\t$new_event = \"NEW EVENT\";\n\t\t$stat_name_id = 1000;\n\t\t$new_stat_name_id = 1001;\n\t\t$now = \"String for date\";\n\t\t$data_rows = new ArrayIterator();\n\t\t$row = new stdClass();\n\t\t$row->stat_name_id = $stat_name_id;\n\t\t$data_rows->append($row);\n\t\t\n\t\t$history_model = $this->getMock(\n\t\t\t\t\"DB_Models_WritableModel_1\", array(), array(), \"\", FALSE);\n\t\t$history_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"loadAllBy\")\n\t\t\t->with($this->equalTo(array(\"application_id\" => $application_id)))\n\t\t\t->will($this->returnValue($data_rows));\n\t\t\n\t\t$name_model = $this->getMock(\n\t\t\t\t\"DB_Models_WritableModel_1\", array(), array(), \"\", FALSE);\n\t\t$name_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"loadByKey\")\n\t\t\t->with(array($stat_name_id))\n\t\t\t->will($this->returnValue(TRUE));\n\t\t$name_model\n\t\t\t->expects($this->exactly(2))\n\t\t\t->method(\"__get\")\n\t\t\t->will(\n\t\t\t\t$this->returnValue(strtolower($event_name)),\n\t\t\t\t$this->returnValue($stat_name_id),\n\t\t\t\t$this->returnValue($new_stat_name_id));\n\t\t$name_model\n\t\t\t->expects($this->once())\n\t\t\t->method(\"loadBy\")\n\t\t\t->will($this->returnValue(TRUE));\n\t\t\t\n\t\t$event_history = $this->getMock(\n\t\t\t\"VendorAPI_StatPro_Unique_ApplicationEventHistory\",\n\t\t\tarray(\"getNowString\", \"getEventHistoryModel\", \"getEventNameModel\"),\n\t\t\tarray(),\n\t\t\t\"\",\n\t\t\tFALSE);\n\t\t$event_history\n\t\t\t->expects($this->once())\n\t\t\t->method(\"getNowString\")\n\t\t\t->will($this->returnValue($now));\n\t\t$event_history\n\t\t\t->expects($this->exactly(2))\n\t\t\t->method(\"getEventHistoryModel\")\n\t\t\t->will($this->returnValue($history_model));\n\t\t$event_history\n\t\t\t->expects($this->exactly(2))\n\t\t\t->method(\"getEventNameModel\")\n\t\t\t->will($this->returnValue($name_model));\n\n\t\t$this->assertTrue(\n\t\t\t$event_history->containsEvent($event_name, $application_id));\n\t\t$this->assertFalse(\n\t\t\t$event_history->containsEvent($new_event, $application_id));\n\t\t$event_history->addEvent($new_event, $application_id);\n\t\t$this->assertTrue(\n\t\t\t$event_history->containsEvent($new_event, $application_id));\n\t}", "public function setEvents(array $events)\n {\n $this->loadEvents($events);\n\n return $this;\n }", "public function add()\n {\n foreach ($this->filters as $filter) {\n call_user_func_array($this->addCallback, $filter);\n }\n }", "public function index()\n {\n Event::all();\n }", "protected function addEventSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('event')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->end()\n ->scalarNode('prefix_javascript_variable')->end()\n ->end()\n ->end()\n ->end();\n }", "public function searchEvent(string $eventId, bool $reset = FALSE);", "public function setEvents(?array $value): void {\n $this->getBackingStore()->set('events', $value);\n }", "function event_PreSearchResults(&$data)\n\t{\n\t\tglobal $blog, $manager;\n\t\t$blogs = $data['blogs'];\n\t\t$query = $data['query'];\n\t\t$items =& $data['items'];\n\t\t$searchclass =& new SEARCH($query);\n\n\t\t$sqlquery = 'SELECT i.inumber as itemid FROM ';\n\t\t$tables = sql_table('item') . ' as i ';\n\t\t$where_str = '';\n\t\tif ($this->getOption('commentsearch') == 'yes') {\n\t\t \t$tables .= ' left join ' . sql_table('comment') . ' as cm'\n\t\t \t\t\t \t. ' on i.inumber = cm.citem ';\n\t\t \t$where_str .= 'xxx.cm.cbody';\n\t\t}\n\t\t\n\t\tif ($this->getOption('tagsearch') == 'yes' &&\n\t\t\t$manager->pluginInstalled('NP_TagEX')) {\n\t\t\t\t$tables .= ' left join ' . sql_table('plug_tagex') . ' as tag'\n\t\t\t\t\t\t\t. ' on i.inumber = tag.inum';\n\t\t\t\t$where_str .= ',xxx.tag.itags';\n\t\t}\n\t\tif ($this->getOption('trackbacksearch') == 'yes' &&\n\t\t\t$manager->pluginInstalled('NP_TrackBack')) {\n\t\t\t\t$tables .= ' left join ' . sql_table('plugin_tb') . ' as t'\n\t\t\t\t\t\t\t. ' on i.inumber = t.tb_id';\n\t\t\t\t$where_str .= ',xxx.t.title,xxx.t.excerpt';\n\t\t}\n\t\t$sqlquery .= $tables;\n\t\t$where = $searchclass->boolean_sql_where($where_str);\n\t\t$where = strtr($where, array('i.xxx.' => ''));\n\t\t$sqlquery .= ' WHERE i.idraft = 0'\n\t\t\t\t . ' and i.itime <= ' . mysqldate($blog -> getCorrectTime())\n\t\t\t\t . ' and i.iblog in (' . implode(',', $blogs) . ') '\n\t\t\t\t . ' and ' . $where;\n\t\t$res = sql_query($sqlquery);\n\t\t$array = array();\n\t\twhile ($itemid = mysql_fetch_row($res)) {\n\t\t\tarray_push($array, $itemid[0]);\n\t\t}\n\t\t$data['items'] = array_unique(array_merge($items,$array));\n\t}", "public function addItems(array $items);", "public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.fetch_incidents_set_params', array($this, '_fetch_incidents_set_params'));\n\t\tEvent::add('ushahidi_filter.json_index_features', array($this, '_json_index_features'));\n\n\t\t// Add a Sub-Nav Link\n\t\tEvent::add('ushahidi_action.nav_admin_reports', array($this, '_report_link'));\n\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'reports')\n\t\t{\n\t\t\n\t\t\tEvent::add('ushahidi_action.report_filters_ui', array($this, '_reports_filters'));\n\t\t\tEvent::add('ushahidi_action.report_js_filterReportsAction', array($this, '_reports_filters_js'));\n\n\t\t\n\t\t\tswitch (Router::$method)\n\t\t\t{\n\t\t\t\t// Hook into the Report Add/Edit Form in Admin\n\t\t\t\tcase 'edit':\n\t\t\t\t\t// Hook into the form itself\n\t\t\t\t\tEvent::add('ushahidi_action.report_form_admin', array($this, '_report_form'));\n\t\t\t\t\t// Hook into the report_submit_admin (post_POST) event right before saving\n\t\t\t\t\t// Event::add('ushahidi_action.report_submit_admin', array($this, '_report_validate'));\n\t\t\t\t\t// Hook into the report_edit (post_SAVE) event\n\t\t\t\t\tEvent::add('ushahidi_action.report_edit', array($this, '_report_form_submit'));\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Hook into the Report view (front end)\n\t\t\t\tcase 'view':\n\t\t\t\t\tplugin::add_stylesheet('actionable/css/actionable');\n\t\t\t\t\tEvent::add('ushahidi_action.report_meta', array($this, '_report_view'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telseif (Router::$controller == 'feed')\n\t\t{\n\t\t\t// Add Actionable Tag to RSS Feed\n\t\t\tEvent::add('ushahidi_action.feed_rss_item', array($this, '_feed_rss'));\n\t\t}\n\t\telseif (Router::$controller == 'main')\n\t\t{\t\n\t\t\tplugin::add_stylesheet('actionable/css/actionable_filter');\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_map_main_filters'));\n\t\t}\n\t\telseif (Router::$controller == 'json' OR Router::$controller == 'bigmap_json')\n\t\t{\t\t\t\n\t\t\t// Never cluster actionable json\n\t\t\tif (Router::$method == 'cluster' AND $this->_check_media_type())\n\t\t\t{\n/* \t\t\t\tRouter::$method = 'index'; */\n\t\t\t}\n\t\t}\n\t}", "public function test_insert_event_entries(array $events, Container $deps) {\n if (!PHPUNIT_TEST) {\n throw new \\coding_exception('Public test method can only be invoked by PHPUnit');\n }\n return $this->insert_event_entries($events, $deps);\n }", "function searchesAddSearch($text){\n array_push($text, array('key' => 'PARENT_SEARCHES_ADD_SEARCH',\n 'parent' => '',\n 'text' => 'Search - Add search'));\n \n array_push($text, array('key' => 'SEARCHES_ADD_SEARCH_NAME',\n 'parent' => 'PARENT_SEARCHES_ADD_SEARCH',\n 'text' => 'New search'));\n \n array_push($text, array('key' => 'SEARCHES_ADD_SEARCH_SUBMIT',\n 'parent' => 'PARENT_SEARCHES_ADD_SEARCH',\n 'text' => 'Add search'));\n array_push($text, array('key' => 'SEARCHES_ADD_SEARCH_ADDING',\n 'parent' => 'PARENT_SEARCHES_ADD_SEARCH',\n 'text' => 'Adding a new search ...'));\n array_push($text, array('key' => 'SEARCHES_ADD_SEARCH_SUCCESS',\n 'parent' => 'PARENT_SEARCHES_ADD_SEARCH',\n 'text' => 'You have succesfully added a new search.'));\n \n return $text;\n }", "public function setEventTypes(?array $eventTypes): void\n {\n $this->eventTypes['value'] = $eventTypes;\n }", "public function events()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC'),\n 'condition' => array('type' => 'Event')\n ));\n \n $this->set('events', $eventdata);\n \n $this->assignUserToView($this->Auth->user('id'));\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Info');\n }", "public function logEvents(array $auditLogs);", "public function getEventadd($messages = \"\");", "public function index()\n {\n return Happening_event::all()\n ->toArray();\n }", "public function loadMultipleByEvent($event, $type = 'outgoing');", "function getEvents() {\n return [];\n }", "public function setEvents($events, $format = false)\n {\n $this->_events = $events;\n if ($format !== false)\n $this->_format = $format;\n ksort($this->_events);\n }", "public function addHandler(...$handlers)\n {\n array_push($this->handlers, ...$handlers);\n }", "public function run()\n {\n $keywords = ['服装', '电脑', '手机', '鞋', '袜子'];\n foreach ($keywords as $keyword) {\n $datas[] = [\n 'keyword' => $keyword,\n 'keyword_count' => 1,\n 'sort' => 1,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ];\n }\n DB::table('searches')->insert($datas);\n }", "public function add_additional_index() {\n\t\t$table_name = $this->db->prefix . self::BASE_TABLE;\n\n\t\t$sql = 'ALTER TABLE ' . $table_name . ' ADD `index_8` VARCHAR(127)';\n\n\t\t$this->db->query( $sql );\n\t}", "public function multipleAdd(array $users);", "public function listeners($eventName);", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "public function addToInsertSQLArray();", "public function testIndexEvents()\n {\n \t$caldendarEvents = CalendarEvent::factory()->count(5)->create();\n \t$user = User::find($caldendarEvents[0]->user_id );\n\n\t\t/*\n\t\t * Confirm the visibility of all of a user's calendar events.\n\t\t */\n \t$response = $this->actingAs( $user )\n \t->get( route( 'event-planner.events.index' ) );\n \tforeach( $caldendarEvents as $calendarEvent ){\n \t\t$response->assertSee( $calendarEvent->location )\n \t\t->assertSee( $calendarEvent->type )\n \t\t->assertSee( $calendarEvent->showStartDate() );\n \t}\n\n }", "public function addAll(array $uris);", "public static function events();", "public function events()\n {\n //search query\n $query = Input::get('query');\n\n if ($query == 'latest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n elseif ($query == 'oldest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'asc')->paginate(5);\n }\n else\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n return View::make('/events', ['exhibitions' => $exhibitions]);\n }", "public function add(array $data)\n {\n $this->data = array_merge($this->data, $data);\n }", "private function pushEvents ($e)\n\t\t{\n\t\t\t if ( self::chkOrgId () ) { /* Check main Id */\n\t\t\t\t $dbs = new DB ( $this->config['database'] );\n\t\t\t\t $c = $dbs->query (\"SELECT COUNT(*) AS C FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t\t if ( ! $c[0]['C'] ) { /* Event not found in events table , Insert */ \n\t\t\t\t\t$db_ins = new DB ( $this->config['database'] ) ;\n \t \t$e_ins = $db_ins->query (\"INSERT INTO tbl_events_record \n\t\t\t\t\t\tVALUES('\" . $this->c . \"','\" . $e . \"','\". date('Y-m-d H:i:s').\"');\");\n\t\t\t\t\t$db_ins->CloseConnection ();\n\t\t\t\t\treturn true;\n\t\t\t\t } else { /* Event found in events table , Update events by Id */\n\t\t\t\t\t$db_upd = new DB ( $this->config['database'] ) ;\n\t\t\t\t\t$e_upd = $db_upd->query (\"UPDATE tbl_events_record \n\t\t\t\t\t\tSET events = '\".$e.\"', date_rec = '\". date('Y-m-d H:i:s') . \n\t\t\t\t\t\t\"' WHERE org_id = '\" . $this->c .\"'\");\n\t\t\t\t\t$db_upd->CloseConnection ();\n\t\t\t\t}\n\t\t\t\t$dbs->CloseConnection ();\n\t\t\t\t$this->result['data']['id'] = $this->c;\n\t\t\t\t$this->result['data']['result'] = \"Push event: \" . $e; /* Events status */\n\t\t\t } else /* Id not found */\n\t\t\t\t$this->result['data']['result'] = \"Id not found [error code:100:101]\";\n\n\t\t\treturn false;\n\t\t}", "public function addSearch(string $domain): void {}", "public function index()\n {\n $events = Event::latest()->when(request()->q, function ($events) {\n $events = $events->where('title', 'like', '%' . request()->q . '%');\n })->paginate(10);\n\n return view('admin.event.index', compact('events'));\n }", "public function index(Request $request)\n {\n\n $events = LoveEvent::where('id','!=','');\n if($request->get('keyword') != ''){\n $events = $events->where('title','LIKE','%'.$request->get('keyword').'%');\n }\n if($request->get('term') != ''){\n $event_ids = TermLink::where('term_id',$request->get('term'))->pluck('event_id')->toArray();\n $events = $events->whereIn('id',$event_ids);\n }\n if($request->get('date_start') != ''){\n $events = $events->where('created_at','>=',$request->get('date_start').' 00:00:00');\n }\n if($request->get('date_end') != ''){\n $events = $events->where('created_at','<=',$request->get('date_end').' 23:59:59');\n }\n\n $terms = EventTerm::where('up_id','3')\n ->orderBy('sort','DESC')\n ->get();\n\n $events = $events->orderBy('sort','DESC')\n ->orderBy('created_at','DESC')\n ->paginate(10);\n\n return view('backend.love_event.index', [\n 'events' => $events,\n 'terms' => $terms,\n ]);\n }", "protected function indexEntries()\n {\n if ($this->getType() == Reader\\Reader::TYPE_YML) {\n $entries = $this->xpath->evaluate('//offer');\n }\n\n foreach ($entries as $index => $entry) {\n $this->entries[$index] = $entry;\n }\n\n }", "private function genSearchIndex()\n\t{\n\t\t/*\n\t\t * The big array we want to fill ;)\n\t\t */\n\t\t$index = array();\n\t\t\n\t\t/*\n\t\t * Buddies Load persons in the index array that connected with the user\n\t\t */\n\t\t\n\t\t$model = loadModel('buddy');\n\t\tif($buddies = $model->listBuddies())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($buddies as $b)\n\t\t\t{\n\t\t\t\t$img = '/img/avatar-mini.png';\n\t\t\t\t\n\t\t\t\tif(!empty($b['photo']))\n\t\t\t\t{\n\t\t\t\t\t$img = img($b['photo']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result[] = array(\n\t\t\t\t\t'name' => $b['name'].' '.$b['nachname'],\n\t\t\t\t\t'teaser' => '',\n\t\t\t\t\t'img' => $img,\n\t\t\t\t\t'click' => 'chat(\\''.$b['id'].'\\');',\n\t\t\t\t\t'id' => $b['id'],\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t$b['name'],$b['nachname']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t'title' => 'Menschen die Du kennst',\n\t\t\t\t'key' => 'buddies',\n\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Groups load Groups connected to the user in the array\n\t\t*/\n\t\t$model = loadModel('groups');\n\t\tif($groups = $model->listMyGroups())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($groups as $b)\n\t\t\t{\n\t\t\t\t$img = '/img/groups.png';\n\t\t\t\tif(!empty($b['photo']))\n\t\t\t\t{\n\t\t\t\t\t$img = 'images/' . str_replace('photo/','photo/thumb_',$b['photo']);\n\t\t\t\t}\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => tt($b['teaser'],65),\n\t\t\t\t\t\t'img' => $img,\n\t\t\t\t\t\t'href' => '/?page=bezirk&bid='.$b['id'].'&sub=forum',\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t$b['name']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Gruppen',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Betriebe load food stores connected to the user in the array\n\t\t */\n\t\t$model = loadModel('betrieb');\n\t\tif($betriebe = $model->listMyBetriebe())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($betriebe as $b)\n\t\t\t{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => $b['str'].' '.$b['hsnr'].', '.$b['plz'].' '.$b['stadt'],\n\t\t\t\t\t\t'href' => '/?page=fsbetrieb&id='.$b['id'],\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t$b['name'],$b['str']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Betriebe',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Bezirke load Bezirke connected to the user in the array\n\t\t*/\n\t\t$model = loadModel('bezirk');\n\t\tif($bezirke = $model->listMyBezirke())\n\t\t{\n\t\t\t$result = array();\n\t\t\tforeach ($bezirke as $b)\n\t\t\t{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'name' => $b['name'],\n\t\t\t\t\t\t'teaser' => '',\n\t\t\t\t\t\t'img' => false,\n\t\t\t\t\t\t'href' => '/?page=bezirk&bid='.$b['id'].'&sub=forum',\n\t\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t\t\t$b['name']\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$index[] = array(\n\t\t\t\t\t'title' => 'Deine Bezirke',\n\t\t\t\t\t'result' => $result\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Get or set an individual token as filename for the public json file\n\t\t*/\n\t\tif($token = S::user('token'))\n\t\t{\n Storage::disk('searchindex')->put($token . '.json', json_encode($index));\n\t\t\treturn $token;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "public function setEvents($id,$date,$text,$desc,$cat=null,$catcolor=null,$stdurl=false,$url=null)\n\t{\n\t\t$events = array(\n\t\t\t'id' => $id,\n\t\t\t'date' => $date,\n\t\t\t'text' => $text,\n\t\t\t'desc' => $desc,\n\t\t\t'cat' => $cat,\n\t\t\t'catcolor' => $catcolor,\n\t\t\t'stdurl' => $stdurl,\n\t\t\t'url' => $url\n\t\t);\n\t\tarray_push($this->eventItems, $events);\n\t}", "public function index(Request $request)\n {\n if((isset($request->service) && $request->service == 'index') || $request->q == 'all'){\n $user = Auth::user();\n\n $events = Event::with(['interest' => function($q){\n $q->selectRaw('interest_id, interest_name');\n }])\n ->withCount(['going' => function($q) use ($user){\n $q->where('member_id', $user->member_id);\n }])\n ->orderBy('event_id', 'desc')->get();\n\n return $events;\n }\n\n if(isset($request->q)){\n $user = Auth::user();\n\n $events = Event::where('event_name', 'like', '%'. $request->q .'%')\n ->with(['interest' => function($q){\n $q->selectRaw('interest_id, interest_name');\n }])\n ->withCount(['going' => function($q) use ($user){\n $q->where('member_id', $user->member_id);\n }])\n ->orderBy('event_id', 'desc')->get();\n\n return $events;\n }\n\n return view('findevent');\n }", "public function run()\n {\n DB::table('events')->insert([\n \t[\n\t 'name' => 'Premium Trade Cars BMW MINI Event',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-21',\n\t 'dealership_id' => 11,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Ribble Valley FCA Group Event',\n\t 'start_date' => '2019-07-26',\n\t 'end_date' => '2019-07-28',\n\t 'dealership_id' => 16,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Blackburn BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 14,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Blackburn BMW VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 14,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Independent UK Dealership FCA Event',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-28',\n\t 'dealership_id' => 30,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Southport BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 1,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Southport BMW Q2 VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 1,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Wilmslow BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 5,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Wilmslow BMW VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 5,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Preston BMW VIP Event 2018',\n\t 'start_date' => '2018-07-26',\n\t 'end_date' => '2018-07-29',\n\t 'dealership_id' => 12,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Bowker Preston BMW VIP Event 2019',\n\t 'start_date' => '2019-07-19',\n\t 'end_date' => '2019-07-22',\n\t 'dealership_id' => 12,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Birmingham Central Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 17,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Erdington Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 18,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Solihull Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 22,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Tamworth Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 24,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Macclesfield Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 19,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Manchester Central Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 20,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Manchester Used Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 21,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Stockport Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 23,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'LSH Mercedes-Benz Whitefield Golden Ticket Event',\n\t 'start_date' => '2019-06-01',\n\t 'end_date' => '2019-06-02',\n\t 'dealership_id' => 25,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Gex Showroom VIP Event',\n\t 'start_date' => '2019-04-10',\n\t 'end_date' => '2019-04-13',\n\t 'dealership_id' => 31,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Le Cannet Platinum Event',\n\t 'start_date' => '2019-04-24',\n\t 'end_date' => '2019-04-27',\n\t 'dealership_id' => 32,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Salon de Provence Premium Event',\n\t 'start_date' => '2019-05-15',\n\t 'end_date' => '2019-05-18',\n\t 'dealership_id' => 33,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Rochefort Platinum Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 34,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Lille Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 35,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Dunkerque Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 36,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Saint-Quentin Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 37,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Fontaine-Les-Vervins Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 38,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Tourcoing Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 39,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Valenciennes Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 40,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Villeneuve d\\'Ascq Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 41,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Laon Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 42,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Frejus Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 45,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Soissons Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 47,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Orléans Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 49,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Opel Tours Showroom VIP Event',\n\t 'start_date' => '2019-05-23',\n\t 'end_date' => '2019-05-25',\n\t 'dealership_id' => 50,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'MC Motors Avignon VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 52,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'L.Warsemann Auto 37 Tours VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 53,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Nouvelle Excel Auto Rennes VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 54,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Espace 3000 Besançon VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 55,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Europe Garage Services Bourg en Bresse VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 56,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Skoda Paris Est Villemonble VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 57,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'NDS City Car Saint-Ouen l\\'Aumone VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 58,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Excel Motors Nancy VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 59,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Premium Picardie Amiens VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 60,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'WelcomCar Orléans VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 61,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Carlier Automobiles Douai VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 62,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Nice Car SA Nice VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 63,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Riviera Technic Cannes VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 64,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Peyo Automobiles Bayonne VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 65,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'L.G.A. La Rochelle VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 66,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Saphir Automobiles Montpellier VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 67,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Vega Automobile Brétigny sur Orge VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 68,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Espace Automobiles Nîmois Nîmes VIP Event',\n\t 'start_date' => '2019-01-18',\n\t 'end_date' => '2019-01-20',\n\t 'dealership_id' => 69,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Feyaerts VIP Event',\n\t 'start_date' => '2018-05-30',\n\t 'end_date' => '2018-06-02',\n\t 'dealership_id' => 70,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Ciac VIP Event',\n\t 'start_date' => '2018-06-06',\n\t 'end_date' => '2018-06-09',\n\t 'dealership_id' => 71,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Morren St Truiden VIP Event',\n\t 'start_date' => '2018-10-10',\n\t 'end_date' => '2018-10-13',\n\t 'dealership_id' => 72,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Morren Diest VIP Event',\n\t 'start_date' => '2018-10-24',\n\t 'end_date' => '2018-10-27',\n\t 'dealership_id' => 73,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'AB Automotive VIP Event',\n\t 'start_date' => '2018-10-10',\n\t 'end_date' => '2018-10-13',\n\t 'dealership_id' => 74,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Driessen VIP Event',\n\t 'start_date' => '2018-12-06',\n\t 'end_date' => '2018-12-09',\n\t 'dealership_id' => 75,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Hasselt Motor VIP Event',\n\t 'start_date' => '2018-12-13',\n\t 'end_date' => '2018-12-16',\n\t 'dealership_id' => 76,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Van Hoye VIP Event',\n\t 'start_date' => '2018-12-20',\n\t 'end_date' => '2018-12-23',\n\t 'dealership_id' => 77,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Matel Motors VIP Event',\n\t 'start_date' => '2018-05-23',\n\t 'end_date' => '2018-05-26',\n\t 'dealership_id' => 78,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'De Doncker VIP Event',\n\t 'start_date' => '2018-06-06',\n\t 'end_date' => '2018-06-09',\n\t 'dealership_id' => 79,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'SPIRLET Auto VIP Event',\n\t 'start_date' => '2018-06-06',\n\t 'end_date' => '2018-06-09',\n\t 'dealership_id' => 80,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Centre Motor VIP Event',\n\t 'start_date' => '2018-12-06',\n\t 'end_date' => '2018-12-08',\n\t 'dealership_id' => 81,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Colson VIP Event',\n\t 'start_date' => '2018-11-28',\n\t 'end_date' => '2018-12-01',\n\t 'dealership_id' => 82,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Vanspringel VIP Event',\n\t 'start_date' => '2018-12-05',\n\t 'end_date' => '2018-12-08',\n\t 'dealership_id' => 83,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Premium Trade Cars All Brand Event',\n\t 'start_date' => '2019-07-26',\n\t 'end_date' => '2019-07-28',\n\t 'dealership_id' => 11,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n \t[\n\t 'name' => 'Halliwell Jones Southport BMW Q3 VIP Event 2019',\n\t 'start_date' => '2019-10-31',\n\t 'end_date' => '2019-11-02',\n\t 'dealership_id' => 1,\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now()\n\t ],\n\t ]);\n }", "public function advancedSearch(Event $event)\n {\n $partials = $event->getParams()['partials'];\n $partials[] = 'teams/partial/advanced-search';\n $event->setParam('partials', $partials);\n }", "function searchEvent(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateSearchSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectSearchSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->searchEventHelper($formvars)){\r\n\t\t\t//$this->HandleError(\"Did not Find any Results by 2 \" . $formvars['eventSearch']);\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t$result = $this->searchEventHelper($formvars);\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "public function Events($eventmask);", "public function addToActions($actionArray)\n {\n $this->_actions[] = $actionArray;\n }", "public function setEvent(array $event = array())\n {\n foreach ($event as $get_request_history_responseEventItem) {\n // validation for constraint: itemType\n if (!$get_request_history_responseEventItem instanceof \\Signicat\\DocumentServiceV3_API\\StructType\\Event) {\n throw new \\InvalidArgumentException(sprintf('The event property can only contain items of \\Signicat\\DocumentServiceV3_API\\StructType\\Event, \"%s\" given', is_object($get_request_history_responseEventItem) ? get_class($get_request_history_responseEventItem) : gettype($get_request_history_responseEventItem)), __LINE__);\n }\n }\n if (is_null($event) || (is_array($event) && empty($event))) {\n unset($this->event);\n } else {\n $this->event = $event;\n }\n return $this;\n }", "public function dispatchEvent(array $eventTags, array $subjects = []);", "function get_new_events( $options=array() ){\n\t\t\n\t\tglobal $gamo, $dbh;\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'start' => 0,\n\t\t\t\t'number' => 1\n\t\t\t),\n\t\t$options);\n\t\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC LIMIT \".$options['start'].\",\".$options['number'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tarray_push($vevents, $row);\n\n\t\t}\n\n\t\treturn $vevents;\n\t\t\n\t}", "public function __construct(array $event = array())\n {\n $this\n ->setEvent($event);\n }" ]
[ "0.6150777", "0.5819724", "0.56906074", "0.5678503", "0.56622005", "0.5488365", "0.5414868", "0.5350852", "0.53371793", "0.52402157", "0.5176392", "0.5176392", "0.51722205", "0.51677614", "0.51594925", "0.51197886", "0.5102104", "0.5085425", "0.5073141", "0.506427", "0.50496644", "0.5033039", "0.5009517", "0.50078434", "0.5001113", "0.49916083", "0.4973717", "0.49644884", "0.49449292", "0.49415436", "0.49405953", "0.4940101", "0.49199238", "0.490502", "0.49040765", "0.48968145", "0.4895464", "0.4884036", "0.48740384", "0.48718682", "0.48680934", "0.48650166", "0.48618588", "0.48543364", "0.48421964", "0.4832267", "0.48262203", "0.4819817", "0.48101068", "0.4801821", "0.47981516", "0.47941285", "0.4790317", "0.47894803", "0.4784818", "0.4779343", "0.47729656", "0.47592086", "0.47590908", "0.4736807", "0.473535", "0.4729691", "0.4729208", "0.47272366", "0.47262457", "0.47241318", "0.4723045", "0.47127217", "0.47115067", "0.47096217", "0.47069806", "0.4705383", "0.4704476", "0.4700842", "0.47006962", "0.46990767", "0.46970895", "0.4696035", "0.4694955", "0.46898943", "0.4678264", "0.467655", "0.4670389", "0.46694684", "0.46630943", "0.4649938", "0.4647027", "0.46467268", "0.46463147", "0.46370742", "0.4636005", "0.46358794", "0.46237186", "0.46155807", "0.4610883", "0.46101636", "0.46096152", "0.46076092", "0.46050584", "0.4592946" ]
0.599336
1
Deletes an array events by their identifiers (the "event_id" field on the event).
public function deleteEvents(array $eventIds, array $context = []): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(array $ids);", "function deleteItems($itemids) {\r\n $event = new mosEventCal_Event();\r\n\tforeach($itemids AS $itemid) {\r\n\t $event->delete($itemid);\t\r\n\t}\r\n}", "public function delete(array $ids)\n {\n\n }", "public function delete($ids){\n \n $filter = $this->primaryFilter; \n $ids = ! is_array($ids) ? array($ids) : $ids;\n \n foreach ($ids as $id) {\n $id = $filter($id);\n if ($id) {\n $this->db->where($this->primary_key, $id)->limit(1)->delete($this->table_name);\n }\n }\n }", "public function massDeleteAction()\r\n\t{\r\n\t\tif($eventIds = $this->getRequest()->getParam('event_ids')){\r\n\t\t\ttry{\r\n\t\t\t\tforeach ($eventIds as $eventId) {\r\n\t\t\t\t\t$eventModel = Mage::getModel('master_example/event')->load($eventId);\r\n\t\t\t\t\t$eventModel->delete();\r\n\t\t\t\t}\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess($this->__(\"your events(%d) have been deleted\", count($eventIds)));\r\n\t\t\t} catch(Exception $e){\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n\t\t\t}\r\n\t\t} else{\r\n\t\t\tMage::getSingleton('adminhtml/session')->addError('select some events');\r\n\t\t}\r\n\t\t$this->_redirect('*/*/index');\r\n\t}", "public function deleteFoodsFromEvent($event, $data){\r\n $rowsSQL = array();\r\n\r\n $toBind = array();\r\n\r\n foreach($data as $arrayIndex => $row){\r\n $params = array();\r\n foreach($row as $columnName => $columnValue){\r\n $param = \":\" . $columnName . $arrayIndex;\r\n $params[] = $param;\r\n $toBind[$param] = $columnValue;\r\n }\r\n $rowsSQL[] = \"(\" . implode(\", \", $params) . \")\";\r\n }\r\n\r\n $sql = \"DELETE FROM `food_event` WHERE `event` =\". $event .\" AND food IN (\" . implode(\", \", $rowsSQL) . \")\";\r\n\r\n $stmt = $this->db->prepare($sql);\r\n //Bind our values.\r\n foreach($toBind as $param => $val){\r\n $stmt->bindValue($param, $val);\r\n }\r\n //Execute our statement (i.e. insert the data).\r\n $stmt->execute();\r\n }", "public function deleteEvents($events)\n {\n $data = array (\n 'token' => $this->apiToken,\n 'content' => 'event',\n 'action' => 'delete',\n 'returnFormat' => 'json',\n );\n \n $data['events'] = $this->processEventsArgument($events, $required = true);\n \n $result = $this->connection->callWithArray($data);\n \n $this->processNonExportResult($result);\n \n return (integer) $result;\n }", "public function undelete(array $ids);", "public function deleteAllEvent($event_id)\r\r\n {\r\r\n $where = $this->getAdapter()->quoteInto('event_id = ?', $event_id);\r\r\n $this->delete($where);\r\r\n }", "public function remove($ids);", "function deleteIds ($ids) {\r\n $this->delete($this->tableName, $this->_id . ' in (' . implode(',', $ids) . ')');\r\n }", "public function massDestroy(Request $request)\n {\n if (! Gate::allows('event_delete')) {\n return abort(401);\n }\n if ($request->input('ids')) {\n $entries = Event::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->delete();\n }\n }\n }", "public function __deleteEvents() {\n $_deleteEventCodes_ = array(\n 'wk_pa_add_column_menu',\n 'wk_pa_addJs_product',\n 'wk_pa_product_model_delete',\n 'wk_pricealert_account_view',\n 'wk_pricealert_header',\n 'wk_pricealert_addJs_add',\n 'wk_pricealert_addJs_edit',\n 'wk_pa_product_model_update',\n 'wk_pa_product_model_add',\n );\n\n foreach ($_deleteEventCodes_ as $_DE_code) {\n $this->helper_event->deleteEventByCode($_DE_code);\n }\n }", "public function delete(){\r\n $id=$_POST['del_row'];\r\n $id=implode(',',$id);\r\n $this->Events_Model->delete($this->table,$id);\r\n}", "public function deleteItems(array $keys);", "function attendance_delete_calendar_events($sessionsids) {\n global $DB;\n $caleventsids = attendance_existing_calendar_events_ids($sessionsids);\n if ($caleventsids) {\n $DB->delete_records_list('event', 'id', $caleventsids);\n }\n\n $sessions = $DB->get_recordset_list('attendance_sessions', 'id', $sessionsids);\n foreach ($sessions as $session) {\n $session->caleventid = 0;\n $DB->update_record('attendance_sessions', $session);\n }\n}", "public function deleteByFileIds()\n\t{\n\t\tif ( isset( \\IPS\\Request::i()->fileIds ) )\n\t\t{\n\t\t\t$ids = \\IPS\\Request::i()->fileIds;\n\t\t\t\n\t\t\tif ( ! \\is_array( $ids ) )\n\t\t\t{\n\t\t\t\t$try = json_decode( $ids, TRUE );\n\t\t\t\t\n\t\t\t\tif ( ! \\is_array( $try ) )\n\t\t\t\t{\n\t\t\t\t\t$ids = array( $ids );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$ids = $try;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( \\count( $ids ) )\n\t\t\t{\n\t\t\t\t\\IPS\\cms\\Media::deleteByFileIds( $ids );\n\t\t\t}\n\t\t}\n\t}", "public function deleteByIds(array $ids)\n {\n try {\n $data = $this->model->whereIn('id', $ids)->delete();\n \n if ($data) {\n return [\n 'message' => 'Data is deleted successfully',\n 'payload' => $data,\n 'status' => CoreConstants::STATUS_CODE_SUCCESS\n ];\n } else {\n return [\n 'message' => 'Nothing to Delete',\n 'payload' => null,\n 'status' => CoreConstants::STATUS_CODE_ERROR\n ];\n }\n } catch (\\Throwable $th) {\n Log::error($th->getMessage());\n return [\n 'message' => 'Something went wrong',\n 'payload' => $th->getMessage(),\n 'status' => CoreConstants::STATUS_CODE_ERROR\n ];\n }\n }", "public function bulk_delete(Request $request){\n $this->isAuthorize();\n\n // Delete the Data\n $userID = $this->request->session()->get('userID');\n $ids = $request->ids;\n DB::table(\"apt_time_slots\")->where('userID','=',$userID)->whereIn('id',explode(\",\",$ids))->delete();\n return response()->json(['success'=>\"Deleted successfully.\"]);\n }", "public function destroySelected(Request $request)\n {\n foreach ($request->ids as $id) {\n // find that record\n $event = EventBackend::find($id);\n\n // delete english images or files\n\n // delete arabic images or files\n\n if (count($event->media) > 0) {\n $event->media()->delete(); // delete english & arabic youtube links\n }\n\n if (count($event->hashtags) > 0) {\n $event->hashtags()->detach(); // delete hashtags\n }\n\n if (count($event->categories) > 0) {\n $event->categories()->detach(); // delete categories\n }\n\n $event->delete(); // delete events\n }\n\n if (\\Lang::getLocale() == 'en') {\n Session::flash('success', 'Event deleted successfully!');\n } else {\n Session::flash('success', ' تم مسح الحدث بنجاح');\n }\n\n return response()->json(['success', 'event deleted!']);\n }", "protected function entityDeleteMultiple($ids) {\n waywire_video_delete_multiple($ids);\n }", "public function deleteMultipleById(array $ids) : int\n {\n }", "public function deleteMany($ids)\n {\n $placeholders = array_fill(0, count($ids), \"?\");\n $placeholders = implode(\", \", $placeholders);\n\n $sql = \"DELETE FROM `%s` WHERE `%s` IN (%s)\";\n $this->_sql[] = sprintf($sql, $this->_table, $this->_key, $placeholders);\n $parameters = array();\n foreach ($ids as $id) {\n $parameters[] = array($this->_key => $id);\n }\n $this->_parameters[] = $this->parameterize($parameters);\n return $this->run();\n }", "public function deleteChked(Request $request)\n {\n $ids=$request->allids;\n $users=User::find($ids);\n foreach($users as $user)\n {\n $user->events()->where('user_id', $user->id)->detach();\n\n }\n\n }", "public function deleteLineItems(array $ids);", "function delete_events($event_id) {\n\tglobal $cxn;\n\n\t$errArr=init_errArr(__FUNCTION__); \n\ttry\n\t{\n\t\t// Sql String\n\t\t$sqlString = \"DELETE FROM events\n\t\t\t\tWHERE eID = ?\";\n\t\t\t\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\n\t\t$stmt->bind_param(\"i\", $event_id);\n\t\t$stmt->execute();\n\t\t\n\t\t// Check and delete users from this event\n\t}\n\tcatch (mysqli_sql_exception $err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error deleting events , event id: \" . $event_id;\n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\tif ($errArr[ERR_AFFECTED_ROWS]==0) { \n\t $errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t}\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn $errArr;\n}", "public function deleteUserNotificationByIds(array $ids);", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "public function deleteEvent($id) {\r\n$array = array('event_id' => $id);\r\n$success = $this->db->delete('events', $array);\r\nreturn $success;\r\n}", "public function deleteItems(array $keys)\n {\n }", "function deleteEventFromFile($idEvent, $idUser, $eventsArray, $file)\n\t{\n\t\t$i = search_2d_array($eventsArray, \"Event ID\", $idEvent);\n\t\t$p = $eventsArray[$i][\"User ID\"];\n\t\tif ($p == $idUser)\n\t\t{\n\t\t\t// Make string array of file and remove line at index\n\t\t\t$eventStringArray = file($file);\n\t\t\tunset($eventStringArray[$i]);\n\t\t\t// Reset array to string and rewrite file\n\t\t\t$fileContent = implode(\"\", $eventStringArray);\n\t\t\t$eventFile = fopen($file, \"wb\");\n\t\t\t// if the file doesn't open\n\t\t\tif ($eventFile === FALSE)\n\t\t\t\t$errorMessage = \"There was an error deleting the event.\";\n\t\t\t// otherwise write the string and close the file\n\t\t\telse \n\t\t\t{\n\t\t\t\tfwrite($eventFile, $fileContent);\n\t\t\t\tfclose($eventFile);\n\t\t\t\t// Reread the file to the web page's eventsArray\n\t\t\t\t$eventsArray = get2DAssocArray($file, $keys);\n\t\t\t}\n\t\t}\n\t}", "public function delete($where = null, array $markers = []);", "protected function entityDeleteMultiple($fids) {\n $files = file_load_multiple($fids);\n foreach ($files as $file) {\n file_delete($file);\n }\n }", "static public function deleteMultiple($ids) {\n return entity_delete_multiple('nuntius_room', $ids);\n }", "public function deleteStaffFromEvent($event, $data){\r\n\r\n $rowsSQL = array();\r\n\r\n $toBind = array();\r\n\r\n foreach($data as $arrayIndex => $row){\r\n $params = array();\r\n foreach($row as $columnName => $columnValue){\r\n $param = \":\" . $columnName . $arrayIndex;\r\n $params[] = $param;\r\n $toBind[$param] = $columnValue;\r\n }\r\n $rowsSQL[] = \"(\" . implode(\", \", $params) . \")\";\r\n }\r\n\r\n $sql = \"DELETE FROM `staff_event` WHERE `event` =\". $event .\" AND staff IN (\" . implode(\", \", $rowsSQL) . \")\";\r\n\r\n $stmt = $this->db->prepare($sql);\r\n //Bind our values.\r\n foreach($toBind as $param => $val){\r\n $stmt->bindValue($param, $val);\r\n }\r\n //Execute our statement (i.e. insert the data).\r\n $stmt->execute();\r\n }", "function absenrich_delete(){\r\n\t\t$ids = $_POST['ids']; // Get our array back and translate it :\r\n\t\t$pkid = json_decode(stripslashes($ids));\r\n\t\t$result=$this->m_absensi_enrichment->absenrich_delete($pkid);\r\n\t\techo $result;\r\n\t}", "public function destroy($ids);", "protected function _deleteEvent($eventId)\n {\n }", "public function delete($names);", "public function delete(array $where);", "protected function entityDeleteMultiple($ids) {\n farm_asset_delete_multiple($ids);\n }", "function alat_delete(){\r\n\t\t$ids = $_POST['ids']; // Get our array back and translate it :\r\n\t\t$pkid = json_decode(stripslashes($ids));\r\n\t\t$result=$this->m_alat->alat_delete($pkid);\r\n\t\techo $result;\r\n\t}", "public static function remove($ids) {\n if ((! is_array($ids)) && ($ids == self::ALL)) {\n $url = self::_buildUrl(null,null);\n } else {\n $url = self::_buildUrl('id',$ids);\n }\n try {\n $rsp = XN_REST::delete($url);\n } catch (XN_Exception $e) {\n // 404 == didn't remove anything\n if ($e->getCode() != 404) {\n throw $e;\n }\n }\n }", "public function deleteById ($ids, $auditAction = false) {\n\t\n\t\t// initialise variables\n\t\t$successCount = 0;\n\t\t\n\t\t// build the identifier\n\t\tif (!$idKey = $this->getIdentifier()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// create an array of IDs\n\t\tif (!is_array($ids)) {\n\t\t\t$ids = array ( $ids );\n\t\t}\n\t\t\n\t\t// clean the array\n\t\tarray_walk($ids, \"intval\");\n\t\t\n\t\t// loop through IDs\n\t\tforeach ($ids as $id) {\n\t\t\n\t\t\t// get the data\n\t\t\t$sql = \"SELECT * FROM \".DB_PREFIX.$this->tableName.\"\n\t\t\t\t\tWHERE \".$this->getIdentifier().\" = \".$id;\n\t\t\t$rec = $this->db->query($sql);\n\t\t\t\n\t\t\tif ($row = $rec->fetch()) {\n\t\t\t\n\t\t\t\t// run delete SQL\n\t\t\t\t$sql = \"DELETE FROM \".DB_PREFIX.$this->tableName.\"\n\t\t\t\t\t\tWHERE \".$this->getIdentifier().\" = \".$id;\n\t\t\t\t$delResult = $this->db->query($sql);\n\t\t\t\t\n\t\t\t\t// if successful\n\t\t\t\tif ($delResult) {\n\t\t\t\t\n\t\t\t\t\t// add to count\n\t\t\t\t\t$successCount++;\n\t\t\t\t\t\n\t\t\t\t\t// log to audit trail\n\t\t\t\t\tif ($auditAction) {\n\t\t\t\t\t\tAuditTrail::log($auditAction, json_encode($row));\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t// provide feedback\n\t\tif ($successCount > 0) {\n\t\t\t$this->setMessage(LANG_SUCCESS);\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->setMessage(LANG_FAILED);\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "function agenda_delete_item($event_id,$repeat='this')\n{\n\t$final_result=true;\n\t$result=array();\n\n\t$tbl = get_conf('mainTblPrefix') . 'event';\n\t$sql = \"SELECT master_event_id\n\t\tFROM \" . $tbl . \"\n\t\tWHERE id = \" .(int) $event_id;\n\t$master_event_id = claro_sql_query_fetch_all($sql);\n\tif ($master_event_id == false)$result[] = $master_event_id;\n\n $tbl = get_conf('mainTblPrefix') . 'event';\n $sql = \"DELETE FROM \" . $tbl . \"\n WHERE id = \" . (int) $event_id;\n\t$result[] = claro_sql_query($sql);\n\n $tbl = get_conf('mainTblPrefix') . 'rel_event_recipient';\n $sql = \"DELETE FROM \" . $tbl . \"\n WHERE event_id= \" . (int) $event_id;\n\t$result[] = claro_sql_query($sql);\n\n\tif ($repeat=='all')\n\t{\n\t\tforeach ($master_event_id as $this_master_event_id)\n\t\t{\n\t\t\t$tbl = get_conf('mainTblPrefix') . 'event';\n\t\t\t$sql = \"SELECT id\n\t\t\t\tFROM \" . $tbl . \"\n\t\t\t\tWHERE master_event_id = \" .(int) $this_master_event_id['master_event_id'];\n\t\t\t$event_id_list = claro_sql_query_fetch_all($sql);\n\t\t\tif ($event_id_list == false)$result[] = $event_id_list;\n\t\t}\n\n\t\tforeach ($event_id_list as $this_event_id) \n\t\t{\n\t\t\t$tbl = get_conf('mainTblPrefix') . 'event';\n\t\t\t$sql = \"DELETE FROM \" . $tbl . \"\n\t\t\t\tWHERE id = \" . (int) $this_event_id['id'];\n\t\t\t$result [] = claro_sql_query($sql);\n\n\t\t\t$tbl = get_conf('mainTblPrefix') . 'rel_event_recipient';\n\t\t\t$sql = \"DELETE FROM \" . $tbl . \"\n\t\t\t\tWHERE event_id= \" . (int) $this_event_id['id'];\n\t\t\t$result []= claro_sql_query($sql);\n\t\t}\n\t}\n\tif (is_array($result) && !empty($result))\n\t{\n\t\tforeach($result as $this_result)\n\t\t{\n\t\t\tif ($this_result==false) $final_result=false;\n\t\t}\n\t}\n return $final_result;\n}", "public function delete_multiple(array $keys, $group = '')\n {\n }", "function delete_event($event_id) {\n\t\t$data = $this->db->query('SELECT bulletin_id FROM event_bulletin WHERE event_id='.$event_id.'');\n\t\t$bulletinIDs = $data->result();\n\t\t// Delete all bulletins with this event_id\n\t\tforeach ($bulletinIDs as &$value) {\n\t\t\t$this->db->where('bulletin_id', $value->bulletin_id);\n\t\t\t$this->db->delete('bulletin');\n\t\t}\n\t\t$this->db->where('event_id', $event_id);\n\t\t$this->db->delete('event');\n\t\t$this->db->where('event_id', $event_id);\n $this->db->delete('event_bulletin');\n\t\t$this->db->where('event_id', $event_id);\n\t\t$this->db->delete('event_location');\n\t\t$this->db->where('event_id', $event_id);\n $this->db->delete('event_owner');\n\t\t$this->db->where('event_id', $event_id);\n\t\t$this->db->delete('event_tag');\n\t\t$this->db->where('event_id', $event_id);\n\t\t$this->db->delete('organization_event');\n\t}", "public function deleteItems(array $uuids)\n {\n foreach ($uuids as $uuid) {\n $this->deleteItem($uuid);\n }\n }", "public function remove($ids) {\n\t\tif(!is_array($ids)) {\n\t\t\t$ids = array($ids);\n\t\t}\n\t\t$ids = array_map('intval', $ids);\n\t\tforeach($ids as $id) {\n\t\t\t$this->removeById($id);\n\t\t}\n\t}", "public function deleteRowByArray($table, $field, $deleteIDs)\r\n\t\t{\r\n\t\t\tforeach($deleteIDs as $id){\r\n\t\t\t\t$this->where(\"`{$field}` = '{$id}'\");\r\n\t\t\t\t$this->deleteRow($table);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "public function delete(Event $event){\r\n $stmt = $this->db->prepare(\"DELETE FROM event WHERE id_event = ?\");\r\n $stmt->execute(array($event->getIdEvent()));\r\n }", "public function purgeObjects(array $ids);", "function delete_list($office_ids)\n {\n $this->db->where_in('office_id',$office_ids);\n return $this->db->update('offices', array('deleted' => 1));\n }", "public function bulkDelete(Request $request)\n {\n $ids = $request->get('ids');\n Guest::whereIn('id', $ids)->delete();\n return $this->index(request());\n }", "public function deleteByEntryIds(array $entryIds)\n\t{\n\t\treturn $this->in($entryIds);\n\t}", "public function deleteEventsCommand(\n $dryRun = true,\n $period = 'pastOnly',\n $date = '',\n $storagePageIds = '',\n $limit = 1000\n ) {\n $settings = $this->createSettings($period, $date, $storagePageIds, $limit);\n\n $eventDemand = $this->eventDemandFactory->createFromSettings($settings);\n $events = $this->eventRepository->findDemanded($eventDemand);\n $performanceDemand = $this->performanceDemandFactory->createFromSettings($settings);\n $performances = $this->performanceRepository->findDemanded($performanceDemand);\n\n $deletedPerformances = count($performances);\n\n $output = 'Found ' . $deletedPerformances . ' performance in ' . count($events) . ' events.';\n if (!$dryRun) {\n $output = 'Deleted ' . $deletedPerformances . ' performances';\n foreach ($performances as $performance) {\n $this->performanceRepository->remove($performance);\n }\n\n $deletedEvents = 0;\n $keptEvents = 0;\n /** @var Event $event */\n foreach ($events as $event) {\n $localPerformances = $event->getPerformances();\n if (count($localPerformances)) {\n $keptEvents++;\n continue;\n }\n $deletedEvents++;\n $this->eventRepository->remove($event);\n }\n $output .= ' and ' . $deletedEvents . ' events. ';\n if ($keptEvents > 0) {\n $output .= $keptEvents . 'events where not deleted because they contain other performances.';\n }\n }\n\n $this->outputLine($output);\n }", "public function destroy($event_id)\n { \n $events=new Events;\n $events->find($event_id)->delete();\n }", "public function deleteMultiple( $keys )\n\t{\n\t\t$this->getObject()->deleteMultiple( $keys );\n\t}", "function messageDeleteBulk(Collection $messages);", "public function bulkDelete(Request $request)\n {\n return $this->model->bulkDelete($request->ids);\n }", "public function destroy(events $events)\n {\n //\n }", "public function destroy($id)\n {\n if($id == 'all')\n {\n DB::delete('delete from events where id != ?',[$id]);\n }\n else\n {\n DB::delete('delete from events where id = ?',[$id]);\n }\n return response()->json('Successfully Deleted');\n //\n }", "public static function deleteByIds($ids)\n {\n $criteriaWhere = new Criteria();\n $criteriaWhere->add(self::ID, $ids, Criteria::IN);\n\n $criteriaSet = new Criteria();\n $criteriaSet->add(self::IS_DELETED, 1);\n\n BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection(self::DATABASE_NAME));\n }", "public function destroy(Request $request)\n\t{\n\t\t$Input = $request->all();\n\t\t$pagesIDs = $Input['pageIDs'];\n\t\t$pageIdArray = explode(',', $pagesIDs);\n\n\t\tforeach ($pageIdArray as $key => $pageId){\n\t\t\tUserEvents::find($pageId)->delete();\n\n\t\t\t// Store in audit\n\t $auditData = array();\n\t $auditData['user_id'] = \\Auth::user()->id;\n\t $auditData['section'] = 'event';\n\t $auditData['action'] = 'userRequestForEvent.delete';\n\t $auditData['time_stamp'] = time();\n\t $auditData['device_id'] = \\Request::ip();\n\t $auditData['device_type'] = 'web';\n\t auditTrackRecord($auditData);\n\t\t}\n\n return redirect()->route('UserRequestForEvent.index')->with('flash_message','Item deleted successfully');\n\t}", "function deleteDateTimeRecords($dateTimeIDs)\n\t{\n\t\tforeach($dateTimeIDs as $key=>$value)\n\t\t{\n\t\t\tif($key == \"REL_startID\")\n\t\t\t{\n\t\t\t\t$start_query = \"\tDELETE FROM\t\tevent_start \n\t\t\t\t\t\t\t\t\tWHERE \t\t\tPK_startID = '$value' \";\n\t\t\t\t$start_result = mysql_query($start_query);\n\t\t\t\tif(!$start_result)\n\t\t\t\t{\n\t\t\t\t\techo('Error in DELETE query named $start_query.');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end_query = \"\tDELETE FROM\t\tevent_end \n\t\t\t\t\t\t\t\tWHERE \t\t\tPK_endID = '$value' \";\n\t\t\t\t$end_result = mysql_query($end_query);\n\t\t\t\tif(!$end_result)\n\t\t\t\t{\n\t\t\t\t\techo('Error in DELETE query named $end_query.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function delete($table, array $identifier);", "public static function delete_all_calendar_events($mumie) {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/calendar/lib.php');\n $records = $DB->get_records(\n \"event\",\n array(\n \"modulename\" => \"mumie\",\n \"instance\" => $mumie->id\n )\n );\n\n foreach ($records as $record) {\n $event = \\calendar_event::load($record->id);\n $event->delete();\n }\n }", "function delete($documents=null){\n if(!$this->db_coll_set()){\n return [\"error\"=>\"db or collection not set.\"];\n }\n $bulk = new MongoDB\\Driver\\BulkWrite;\n if($documents){\n foreach($documents as $doc){\n if(!$this->isAssoc($doc)){\n return array(\"error\"=>\"DELETE failed, document not associative array.\");\n }\n //If the '_id' is in array and its long (like a mongo id) \n //then convert into a mongoid object\n if(array_key_exists('_id',$doc) && strlen($doc['_id']) >= 24){\n $doc['_id'] = new MongoDB\\BSON\\ObjectID($doc['_id']);\n }\n \n //run the delete\n $bulk->delete($doc);\n\t\t\t\t\n }\n }else{\n $bulk->delete([]);\n }\n \n $result = $this->manager->executeBulkWrite($this->dbdotcoll, $bulk, $this->writeConcern);\n return $result->getDeletedCount();\n\n }", "public function delete()\n {\n $ids = Request::get(\"id\");\n\n $ids = is_array($ids) ? $ids : [$ids];\n\n foreach ($ids as $ID) {\n\n $activity = TenderActivity::findOrFail($ID);\n\n // Fire deleting action\n\n Action::fire(\"activity.deleting\", $activity);\n\n\n $activity->delete();\n\n // Fire deleted action\n\n Action::fire(\"activity.deleted\", $activity);\n }\n\n return Redirect::back()->with(\"message\", trans(\"tenders::activities.events.deleted\"));\n }", "public function deleteAtOffset(Array $offset = []);", "public function deleteEvent($event_id,$poi_id)\r\r\n {\r\r\n $where = $this->getAdapter()->quoteInto('event_id = ?', $event_id).\r\r\n $this->getAdapter()->quoteInto(' AND poi_id = ?', $poi_id);\r\r\n $this->delete($where);\r\r\n }", "public function removeBulk(Request $request)\n {\n $reviews_id_array = $request['id'];\n foreach ($reviews_id_array as $review_id)\n {\n $review = Review::find($review_id);\n $review->delete();\n }\n return response()->json('Data deleted successfully.');\n }", "function batch_delete_maps ($ids) {\r\n\t\tif (!is_array($ids)) return false;\r\n\t\t$clean = array();\r\n\t\tforeach ($ids as $id) {\r\n\t\t\tif ((int)$id) $clean[] = (int)$id;\r\n\t\t}\r\n\t\tif (empty($clean)) return false;\r\n\t\t$table = $this->get_table_name();\r\n\t\t$res = $this->wpdb->query(\"DELETE FROM {$table} WHERE id IN(\" . join(',', $clean) . \")\", ARRAY_A);\r\n\t\treturn $res ? true : false;\r\n\t}", "function seminars_delete_multiple($sids, $delete_categories = FALSE, $delete_masters = FALSE) {\n\n foreach($sids as $sid)\n seminars_delete($sid, $delete_categories, $delete_masters);\n \n}", "function delete_repeat_events ($event_id, $sdate_time=MIN_DATE_TIME, $delete_option=DELETE_ALL) {\n\tglobal $cxn;\n\n\t$errArr=init_errArr(__FUNCTION__); \n\ttry\n\t{\n\t\t// Set up delete conditions \n\t\tif ($delete_option == DELETE_ONE) {\n\t\t\t$where = \" AND sdate_time = ?\";\n\t\t}\n\t\telse {\n\t\t\t$where = \" \";\n\t\t}\n\t\t// Sql String\n\t\t$sqlString = \"DELETE FROM repeat_events \n\t\t\t\tWHERE event_id = ?\" \n\t\t . $where ;\n\t\t\t\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\t\tif ($delete_option == DELETE_ONE) {\n\t\t $stmt->bind_param(\"is\", $event_id, $sdate_time );\n\t\t}\n\t\telse {\n\t\t\t$stmt->bind_param(\"i\", $event_id );\n\t\t}\n\t\t$stmt->execute();\n\t}\n\tcatch (mysqli_sql_exception $err)\n\t{\n\t\t// Error settings\n\t\t$err_code = 1;\n\t\t$err_descr = \"Error deleting repeat_events, event id: \" . $event_id . \" sdate_time: \" . $sdate_time\n\t\t . \" delete_option: \" . $delete_option ;\n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn $errArr;\n}", "public static function destroy($ids);", "function remove_duplicate_events( $events ) {\n\t// Re-index them by a URL to overwrite duplicates\n\t$unique_events = array();\n\n\tforeach ( $events as $event ) {\n\t\t$parsed_url = parse_url( $event['url'] );\n\n\t\t// Take all essential parts to cover current URL structures, and potential future ones.\n\t\t$normalized_url = sprintf(\n\t\t\t'%s%s%s',\n\t\t\t$parsed_url['host'],\n\t\t\t$parsed_url['path'] ?? '',\n\t\t\t$parsed_url['query'] ?? ''\n\t\t);\n\t\t$normalized_url = str_replace( '/', '', $normalized_url );\n\n\t\t$unique_events[ $normalized_url ] = $event;\n\t}\n\n\t// Restore integer keys.\n\treturn array_values( $unique_events );\n}", "function event__delete_event($id)\n {\n $this->db->where('id', $id);\n $this->db->delete('events');\n\n // Delete event from link table\n $this->db->where('event_id', $id);\n $this->db->delete('event_links');\n }", "public function deleteStoreIds($attribute, $storeIds = array())\n {\n $table = $this->getMainTable();\n\n if ($attribute instanceof \\Magento\\Eav\\Model\\Attribute) {\n $attributeId = $attribute->getId();\n } else {\n $attributeId = $attribute;\n }\n\n if (count($storeIds) > 0) {\n $where = ['attribute_id = ?' => (int)$attributeId, 'store_id IN (?)' => $storeIds];\n\n $this->_getWriteAdapter()->delete($table, $where);\n }\n }", "public function batch_delete($data)\n {\n $required = array(\n 'ids' => 'IDs not passed',\n );\n $this->di['validator']->checkRequiredParamsForArray($required, $data);\n\n foreach ($data['ids'] as $id) {\n $this->delete(array('id' => $id));\n }\n\n return true;\n }", "public function delete($identifiers)\n {\n if (is_object($identifiers)) {\n $identifiers = $this->_hydrator->extract($identifiers);\n }\n\n if (is_string($identifiers)) {\n $field = $this->_class->getIdentifierFieldNames();\n $identifiers = [$field[0] => $identifiers];\n }\n\n $classIdentifiers = $this->_class->getIdentifier();\n $identifiers = array_intersect_key($identifiers, $classIdentifiers);\n\n $result = $this->_em->getConnexionDriver()->deleteItem($identifiers, $this->_class);\n\n if(!$result) {\n throw new \\Exception('Something wrong.');\n }\n return $result ? true : false;\n }", "abstract public function delete(string $identifier): array;", "public function deleteSelected()\n {\n PatientRecord::whereIn('id', $this->selectedKeys())->delete();\n }", "public function deleteBulk(array $source_keys) {\n // If we have a single-column key, we can shortcut it\n if (count($this->sourceKey) == 1) {\n $sourceids = array();\n foreach ($source_keys as $source_key) {\n $sourceids[] = $source_key;\n }\n $this->connection->delete($this->mapTable)\n ->condition('sourceid1', $sourceids, 'IN')\n ->execute();\n $this->connection->delete($this->messageTable)\n ->condition('sourceid1', $sourceids, 'IN')\n ->execute();\n }\n else {\n foreach ($source_keys as $source_key) {\n $map_query = $this->connection->delete($this->mapTable);\n $message_query = $this->connection->delete($this->messageTable);\n $count = 1;\n foreach ($source_key as $key_value) {\n $map_query->condition('sourceid' . $count, $key_value);\n $message_query->condition('sourceid' . $count++, $key_value);\n }\n $map_query->execute();\n $message_query->execute();\n }\n }\n }", "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 }", "function orders_delete($ids, $options=array()){\n\textract($options);\n\tglobal $fl,$ln,$qr,$qx,$fromHdrBugs,$developerEmail;\n\t//what about security, who able to do so etc.\n\tforeach($ids as $Headers_ID){\n\t\t//filter out for payments made or deposits made\n\t\t$a=q(\"SELECT * FROM _v_finan_invoices_cash_sales WHERE ID=$Headers_ID\", O_ROW);\n\t\tif($a['AmountApplied']<>0 || $a['AmountAppliedTo']<>0){\n\t\t\terror_alert('Transaction '.$a['HeaderNumber'].' was not deleted because it was referenced or paid with another transaction',1);\n\t\t\tglobal $Orders_ID;\n\t\t\tunset($Orders_ID[array_search($Headers_ID,$Orders_ID)]);\n\t\t\tif(count($ids)==1)eOK();\n\t\t}\n\t\t$ln=__LINE__; q(\"DELETE FROM finan_headers WHERE ID=$Headers_ID\");\n\t\tprn($qr);\n\t\t$ln=__LINE__; q(\"DELETE FROM finan_invoices WHERE Headers_ID=$Headers_ID\");\n\t\tprn($qr);\n\t\t$ln=__LINE__; q(\"DELETE FROM finan_payments WHERE Headers_ID=$Headers_ID\");\n\t\tprn($qr);\n\t\t$ln=__LINE__; q(\"DELETE FROM finan_transactions WHERE Headers_ID=$Headers_ID\");\n\t\tprn($qr);\n\t}\n}", "public function massDelete(Request $request)\n\t{\n\t\t$ids = $request->input('ids', []);\n\t\t\n\t\tif(is_array($ids) && !empty($ids))\n\t\t{\n\t\t\tforeach(Mail::whereIn('id', $ids)->get() as $mail)\n\t\t\t{\n\t\t\t\t$mail->delete();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$result = [\n\t\t\t'success' => 1,\n\t\t];\n\t\t\n\t\treturn $result;\n\t}", "public function deleteParticipants($event_id) {\r\n$array = array('event_id' => $event_id);\r\n$success = $this->db->delete('participated_in', $array);\r\nreturn $success;\r\n}", "public function delete( $ids )\n\t {\n\t\t if ( !is_array( $ids ) )\n\t\t \treturn false;\n\t\t \n\t\t try {\n\t\t\t $response = $this->_sf_connection->delete($ids);\n\t\t\t if ( $this->_debug ) $this->_response($response);\n\t\t\t if ( $response ) {\n\t\t\t \tif ( $response[0]->success )\n\t\t\t \t\treturn $response;\n\t\t\t \telse\n\t\t\t\t\tthrow new Exception($response[0]->errors[0]->message);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(ERROR_NO_RESPONSE);\n\t\t\t}\n\t\t } catch ( Exception $e ) {\n\t\t \t$this->_error( $e );\n\t\t \treturn false;\n\t\t }\n\t }", "public static function deleteAssignedEmployeesShiftWithAttendance($shift_id,$employee_ids_collector){\n date_default_timezone_set('Europe/Prague');\n DB::table('table_employee_shifts')\n ->select('table_employee_shifts.employee_id','table_employee_shifts.shift_id')\n ->whereNotIn('employee_id',$employee_ids_collector)\n ->where(['table_employee_shifts.shift_id' => $shift_id])\n ->delete();\n\n DB::table('table_attendances')\n ->select('table_attendances.employee_id','table_attendances.shift_id')\n ->whereNotIn('table_attendances.employee_id',$employee_ids_collector)\n ->where(['table_attendances.shift_id' => $shift_id])\n ->delete();\n }", "function delete_user_events_by_event_id($event_id) {\n\tglobal $cxn;\n\n\t$errArr=init_errArr(__FUNCTION__); \n\ttry\n\t{\n\t\t// Sql String\n\t\t$sqlString = \"DELETE FROM user_events\n\t\t\t\tWHERE event_id = ?\"; \n\t\t\t\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\t\t\n\t\t$stmt->bind_param(\"i\", $event_id);\n\t\t$stmt->execute();\n\t}\n\tcatch (mysqli_sql_exception $err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error deleting user events , event id: \" . $event_id;\n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn $errArr;\n}", "public static function removeByIds($ids)\n {\n $idList = array();\n if (is_array($ids))\n {\n $idList = array_merge($idList, $ids);\n }\n else\n {\n $idList[] = $ids;\n }\n\n $cond = array( 'id' => array( $idList ) );\n eZPersistentObject::removeObject( self::definition(), $cond );\n }", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "public function destroys()\n {\n try {\n $ids = \\request()->get('ids');\n Event::destroy($ids);\n } catch (\\Exception $e) {\n return response()->json([\n 'message' => \"Error: {$e->getMessage()}\"\n ], $e->getCode());\n }\n\n return response()->json([\n 'message' => __('Data deleted successfully')\n ]);\n }", "public function deleteEventByID($event_id)\n{\n $this->load->database();\n\n $query = \"delete from event where event_id = $event_id\";\n $result = $this->db->query($query);\n return ($result);\n}", "public function delete($ids)\n\t{\n\t\t$conditions = array();\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$conditions[] = 'id = ' . (int) $id;\n\t\t}\n\n\t\t$query = $this->db->getQuery(true);\n\n\t\t$query->delete('#__monitor_projects')\n\t\t\t->where($conditions, 'OR');\n\n\t\t$this->db->setQuery($query);\n\n\t\t$this->db->execute();\n\t}", "function deleteEvent($eventId) {\n if (!is_int($eventId)) {\n return FALSE;\n }\n $this->deleteRecommendations($eventId);\n $this->_deleteWeekdays($eventId);\n $this->_deleteMonths($eventId);\n return $this->databaseDeleteRecord($this->tableEvents, 'event_id', $eventId);\n }", "function delete_user_events_by_user_event_id($user_id, $event_id) {\n\tglobal $cxn;\n\n\t$errArr=init_errArr(__FUNCTION__); \n\ttry\n\t{\n\t\t// Sql String\n\t\t$sqlString = \"DELETE FROM user_events\n\t\t\t\tWHERE user_id = ? AND\n\t\t\t\t event_id = ?\";\n\t\t\t\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\n\t\t$stmt->bind_param(\"ii\", $user_id, $event_id);\n\t\t$stmt->execute();\n\t}\n\tcatch (mysqli_sql_exception $err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error deleting user events , user id: \" . $user_id . \" event id: \" .$event_id;\n\t\tset_errArr($err, $err_code, $err_descr, $errArr);\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn $errArr;\n}", "public function deleteEmails(int $id, array $emails): bool;", "public function deleteRows($arr_delete_array, $table_name, $field_name) {\n if (count($arr_delete_array) > 0) {\n foreach ($arr_delete_array as $id) {\n $this->db->where($field_name, $id);\n $query = $this->db->delete($table_name);\n $error = $this->db->_error_message();\n $error_number = $this->db->_error_number();\n if ($error) {\n $controller = $this->router->fetch_class();\n $method = $this->router->fetch_method();\n $error_details = array(\n 'error_name' => $error,\n 'error_number' => $error_number,\n 'model_name' => 'Common_Model',\n 'model_method_name' => 'deleteRows',\n 'controller_name' => $controller,\n 'controller_method_name' => $method\n );\n $this->common_model->errorSendEmail($error_details);\n redirect(base_url() . 'page-not-found'); //create this route\n }\n }\n }\n }" ]
[ "0.7017683", "0.69400126", "0.677669", "0.6579054", "0.6548128", "0.65366983", "0.64679104", "0.6464421", "0.64289457", "0.63672334", "0.6338343", "0.62950206", "0.61640596", "0.61266243", "0.60348094", "0.602979", "0.6000051", "0.59990793", "0.59835464", "0.5943345", "0.5921986", "0.58847386", "0.5867438", "0.58662695", "0.58634514", "0.58633995", "0.5854368", "0.584552", "0.5813635", "0.5811524", "0.58083475", "0.5794702", "0.5780489", "0.5775201", "0.5767032", "0.57368404", "0.5734767", "0.57282734", "0.57266647", "0.57206327", "0.57128865", "0.5697606", "0.56934035", "0.56902987", "0.56898683", "0.56850845", "0.5680258", "0.566065", "0.56546885", "0.56540394", "0.56504124", "0.56491786", "0.5646384", "0.5642115", "0.56254154", "0.5622979", "0.5606599", "0.5606382", "0.5602711", "0.5595057", "0.5587412", "0.5574977", "0.55580205", "0.55441386", "0.55429083", "0.55242366", "0.552063", "0.551988", "0.5513896", "0.5513323", "0.55057657", "0.5503032", "0.55005586", "0.5498081", "0.54973066", "0.54961264", "0.54961145", "0.54883724", "0.54854214", "0.5483474", "0.5474436", "0.5463413", "0.54613507", "0.5459047", "0.5451667", "0.5446865", "0.5446468", "0.5444625", "0.5438766", "0.5438536", "0.5437164", "0.5436844", "0.54366165", "0.5434115", "0.5429442", "0.5423095", "0.5413387", "0.540227", "0.53981215", "0.53959334" ]
0.705966
0
Executes a search request and populates the provided response object with the events found, total, time_taken, etc.
public function searchEvents(Message $request, ParsedQuery $parsedQuery, Message $response, array $curies = [], array $context = []): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run($request) {\n\n\t\t$ef = new EventApi;\n\n\t\t$query_attributes = array(\n\t\t\t'category' => 6, \n\t\t\t'location' => 363,\n\t\t\t'modified_since' => date('Y-m-d h:i:s', strtotime('-30 days')),\n\t\t\t'created_since' => date('Y-m-d h:i:s', strtotime('-30 days'))\n\t\t\t); \n\n\t\t$results = $ef->get_dataset($query_attributes); \n\n\t\techo count($results) . ' results returned'; \n\n\t\tforeach ($results as $result) {\n\t\t\techo '<p>' . $result['name'] . ' / ' . $result['location_summary'] . '</p>';\n\t\t}\n\n\t}", "public function search($request, $response)\n {\n }", "public function search($request) {\n // Prepare Google search request parameters\n $query = urlencode(\"{$_SERVER['HTTP_HOST']} {$_GET['q']}\");\n $offset = isset($_GET['start']) ? (int)$_GET['start'] : '0';\n $response = file_get_contents(sprintf(self::GOOGLE_SEARCH_URL, $query, $offset));\n \n // Decode JSON response and prepare view content\n $response = json_decode($response);\n $searchResults = $pages = array();\n\n // Build list of search results\n foreach($response->responseData->results as $result)\n $searchResults[] = sprintf(self::SEARCH_RESULT, $result->unescapedUrl, $result->titleNoFormatting, $result->titleNoFormatting, $result->content);\n\n // Prepare pagination options\n $resultsCount = isset($response->responseData->cursor->estimatedResultCount) ? $response->responseData->cursor->estimatedResultCount : 0;\n $currentPageIndex = $response->responseData->cursor->currentPageIndex;\n\n if($resultsCount) {\n // Previous pagination option\n if($currentPageIndex > 0) {\n $page = $response->responseData->cursor->pages[$currentPageIndex - 1];\n $url = sprintf(self::SITE_SEARCH_URL, urlencode($_GET['q']), $page->start);\n $pages[] = sprintf(self::PAGINATION_LINK, $url, '&lt;&lt; Previous', '&lt;&lt; Previous');\n\n } else {\n $pages[] = sprintf(self::PAGINATION_ACTIVE, '&lt;&lt; Previous');\n }\n\n // Page pagination option\n foreach($response->responseData->cursor->pages as $index => $page) {\n if($currentPageIndex == $index) {\n $pages[] = sprintf(self::PAGINATION_ACTIVE, $page->label);\n\n } else {\n $url = sprintf(self::SITE_SEARCH_URL, urlencode($_GET['q']), $page->start);\n $pages[] = sprintf(self::PAGINATION_LINK, $url, $page->label, $page->label);\n }\n }\n\n // Next pagination option\n if($currentPageIndex < 7 && count($response->responseData->cursor->pages) > 1) {\n $page = $response->responseData->cursor->pages[$currentPageIndex + 1];\n $url = sprintf(self::SITE_SEARCH_URL, urlencode($_GET['q']), $page->start);\n $pages[] = sprintf(self::PAGINATION_LINK, $url, 'Next &gt;&gt;', 'Next &gt;&gt;');\n\n } else {\n $pages[] = sprintf(self::PAGINATION_ACTIVE, 'Next &gt;&gt;');\n }\n }\n\n return $this->customise(array(\n 'Title' => 'Search Results',\n 'SearchQuery' => Convert::raw2xml($_GET['q']),\n 'ResultsCount' => $resultsCount,\n 'MoreResultsUrl' => $response->responseData->cursor->moreResultsUrl,\n 'SearchResults' => implode(\"\\r\\n\", $searchResults),\n 'Pagination' => implode(\"\\r\\n\", $pages),\n ))->renderWith(array('SearchPage', 'Page'));\n }", "public function searchEventLogs($request)\n {\n return $this->start()->uri(\"/api/system/event-log/search\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "function ap_search_results($data){\n $args = array(\n 'post_status'=>'publish',\n 'post_type'=> array('post', 'page'),\n 's' => sanitize_text_field($data['term'])\n);\n\t$main_query = new \\WP_Query($args);\n\t$event_query = tribe_get_events(array(\n\t\t\t\t\t'start_date' => date( 'Y-m-d H:i:s' ),\n\t\t\t\t\t's' => sanitize_text_field($data['term']),\n\n\t));\n\n\t $results = array(\n\t\t'pages' => array(),\n\t\t'posts' => array(),\n\t\t'events' => array()\n\t );\n\n\tforeach ($event_query as $event){\n\t\tarray_push($results['events'], array(\n\t\t\t\t'title' => $event->post_title,\n\t\t\t\t'permalink' => get_permalink($event->ID),\n\t\t\t\t'day' => tribe_get_start_date($event->ID, false, 'j'),\n\t\t\t\t'month' => tribe_get_start_date($event->ID, false, 'M')\n\t\t\t));\n\t}\n\n\twhile($main_query ->have_posts()) {\n\t\t$main_query -> the_post();\n\n\t\tif(get_post_type() == 'page'){\n\t\t\tarray_push($results['pages'], array(\n\t\t\t\t'title' => get_the_title(),\n\t\t\t\t'permalink' => get_the_permalink()\n\t\t\t));\n\t\t }\n\t\tif(get_post_type() == 'post'){\n\t\t\tarray_push($results['posts'], array(\n\t\t\t\t'title' => get_the_title(),\n\t\t\t\t'permalink' => get_the_permalink(),\n\t\t\t\t'postType' => get_post_type(),\n\t\t\t\t'publishDate' => get_the_date()\n\t\t\t));\n\t\t }\n\t }\n\n\t return $results;\n }", "protected function callData()\n {\n $type = $this->getSearchType();\n $searchString = $this->getSearchQuery();\n $response = $this->connector->call('GET', 'search/'.$type.'?query='.$searchString.'&limit=100', \"\", 10);\n $responseCode = (int) $response->getStatusCode();\n if ($responseCode !== 200) {\n throw new Exception('Invalid response from Search Data');\n }\n $responseJson = $response->getBody()->getContents();\n return $responseJson;\n }", "public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}", "public function doSearch() {\n\t\tif (isset($this->request->post['date_start'])) {\n\t\t\t$this->load->model('extension/payment/hoolah');\n\t\t\t$result = $this->model_extension_payment_hoolah->searchHoolahTransaction($this->request->post);\n\t\t\t\n\t\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t\t$this->response->setOutput(json_encode($result));\n\t\t} else {\n\t\t\t$response['error'] = true;\n\t\t\t$response['error_msg'] = 'Enter a start date';\n\t\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t\t$this->response->setOutput(json_encode($response));\n\t\t}\n\t}", "public function listAction()\r\n\t{\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\t\t$this -> view -> business = $business = Engine_Api::_() -> core() -> getSubject();\r\n\t\t$this -> view -> form = $form = new Ynbusinesspages_Form_Event_Search;\r\n\t\t$val = $this -> _getAllParams();\r\n\t\t// Populate form data\r\n\t\tif (!$form -> isValid($val))\r\n\t\t{\r\n\t\t\t$form -> populate($defaultValues);\r\n\t\t\t$this -> view -> formValues = $values = array();\r\n\t\t\t$this -> view -> message = \"The search value is not valid !\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$values = $form -> getValues();\r\n\t\t$values['business_id'] = $business -> getIdentity();\r\n\t\t// Prepare data\r\n\t\t$this -> view -> formValues = $values = array_merge($values, $_GET);\r\n\t\t\r\n\t\t// Check create event authorization\r\n\t\t$this -> view -> canCreate = $business -> isAllowed('event_create');\r\n\t\t//Get data\r\n\t\t$this -> view -> paginator = $paginator = Engine_Api::_()->getDbTable('mappings', 'ynbusinesspages') -> getEventsPaginator($values);\r\n\t\t$paginator -> setCurrentPageNumber($this -> _getParam('page'));\r\n\t}", "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Google_Calendar_SearchEvents_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Calendar_SearchEvents_Results($outputs);\n }", "public function search()\n {\n return $this->call('GET', $this->endpoint);\n }", "function searchEvent(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateSearchSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectSearchSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->searchEventHelper($formvars)){\r\n\t\t\t//$this->HandleError(\"Did not Find any Results by 2 \" . $formvars['eventSearch']);\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t$result = $this->searchEventHelper($formvars);\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "public function onRefreshEvents()\n {\n $startTime = post('startTime');\n $endTime = post('endTime');\n $timeZone = post('timeZone');\n\n $data = [\n 'startTime' => $startTime,\n 'endTime' => $endTime,\n 'timeZone' => $timeZone\n ];\n\n if ($this->isFilteredByDateRange()){\n $startTime = 0;\n $endTime = 0;\n }\n\n return Response::json($this->getRecords($startTime, $endTime));\n }", "function theme_intranet_haarlem_search_events($options = array()){\n\t$defaults = array(\t'past_events' \t\t=> false,\n\t\t\t\t\t\t'count' \t\t\t=> false,\n\t\t\t\t\t\t'offset' \t\t\t=> 0,\n\t\t\t\t\t\t'limit'\t\t\t\t=> EVENT_MANAGER_SEARCH_LIST_LIMIT,\n\t\t\t\t\t\t'container_guid'\t=> null,\n\t\t\t\t\t\t'query'\t\t\t\t=> false,\n\t\t\t\t\t\t'meattending'\t\t=> false,\n\t\t\t\t\t\t'owning'\t\t\t=> false,\n\t\t\t\t\t\t'friendsattending' \t=> false,\n\t\t\t\t\t\t'region'\t\t\t=> null,\n\t\t\t\t\t\t'latitude'\t\t\t=> null,\n\t\t\t\t\t\t'longitude'\t\t\t=> null,\n\t\t\t\t\t\t'distance'\t\t\t=> null,\n\t\t\t\t\t\t'event_type'\t\t=> false,\n\t\t\t\t\t\t'past_events'\t\t=> false,\n\t\t\t\t\t\t'search_type'\t\t=> \"list\"\n\t\t\t\t\t\t\n\t);\n\t\n\t$options = array_merge($defaults, $options);\n\t\n\t$entities_options = array(\n\t\t'type' \t\t\t=> 'object',\n\t\t'subtype' \t\t=> 'event',\n\t\t'offset' \t\t=> $options['offset'],\n\t\t'limit' \t\t=> $options['limit'],\n\t\t'joins' => array(),\n\t\t'wheres' => array(),\n\t\t'order_by_metadata' => array(\"name\" => 'start_day', \"direction\" => 'ASC', \"as\" => \"integer\")\n\t);\n\t\n\tif (isset($options['entities_options'])) {\n\t\t$entities_options = array_merge($entities_options, $options['entities_options']);\n\t}\n\t\n\tif($options[\"container_guid\"]){\n\t\t// limit for a group\n\t\t$entities_options['container_guid'] = $options['container_guid'];\n\t}\n\t\n\tif($options['query']) {\n\t\t$entities_options[\"joins\"][] = \"JOIN \" . elgg_get_config(\"dbprefix\") . \"objects_entity oe ON e.guid = oe.guid\";\n\t\t$entities_options['wheres'][] = event_manager_search_get_where_sql('oe', array('title', 'description'), $options, false);\n\t}\n\t\t\t\t\n\tif(!empty($options['start_day'])) {\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_day', 'value' => $options['start_day'], 'operand' => '>=');\n\t}\n\t\n\tif(!empty($options['end_day'])) {\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_day', 'value' => $options['end_day'], 'operand' => '<=');\n\t}\n\t\n\tif(!$options['past_events']) {\n\t\t// only show from current day or newer\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'start_day', 'value' => mktime(0, 0, 1), 'operand' => '>=');\n\t}\n\t\n\tif($options['meattending']) {\n\t\t$entities_options['joins'][] = \"JOIN \" . elgg_get_config(\"dbprefix\") . \"entity_relationships e_r ON e.guid = e_r.guid_one\";\n\t\t\n\t\t$entities_options['wheres'][] = \"e_r.guid_two = \" . elgg_get_logged_in_user_guid();\n\t\t$entities_options['wheres'][] = \"e_r.relationship = '\" . EVENT_MANAGER_RELATION_ATTENDING . \"'\";\n\t}\n\t\n\tif($options['owning']) {\n\t\t$entities_options['owner_guids'] = array(elgg_get_logged_in_user_guid());\n\t}\n\t\n\tif($options[\"region\"]){\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'region', 'value' => $options[\"region\"]);\n\t}\n\t\n\tif($options[\"event_type\"]){\n\t\t$entities_options['metadata_name_value_pairs'][] = array('name' => 'event_type', 'value' => $options[\"event_type\"]);\n\t}\n\t\n\tif($options['friendsattending']){\n\t\t$friends_guids = array();\n\t\t\n\t\tif($friends = elgg_get_logged_in_user_entity()->getFriends(\"\", false)) {\n\t\t\tforeach($friends as $user) {\n\t\t\t\t$friends_guids[] = $user->getGUID();\n\t\t\t}\n\t\t\t$entities_options['joins'][] = \"JOIN \" . elgg_get_config(\"dbprefix\") . \"entity_relationships e_ra ON e.guid = e_ra.guid_one\";\n\t\t\t$entities_options['wheres'][] = \"(e_ra.guid_two IN (\" . implode(\", \", $friends_guids) . \"))\";\n\t\t} else\t{\n\t\t\t// return no result\n\t\t\t$entities_options['joins'] = array();\n\t\t\t$entities_options['wheres'] = array(\"(1=0)\");\n\t\t}\n\t}\n\t\n\tif(($options[\"search_type\"] == \"onthemap\") && !empty($options['latitude']) && !empty($options['longitude']) && !empty($options['distance'])){\n\t\t$entities_options[\"latitude\"] = $options['latitude'];\n\t\t$entities_options[\"longitude\"] = $options['longitude'];\n\t\t$entities_options[\"distance\"] = $options['distance'];\n\t\t$entities = elgg_get_entities_from_location($entities_options);\n\t\t\t\n\t\t$entities_options['count'] = true;\n\t\t$count_entities = elgg_get_entities_from_location($entities_options);\n\t\t\n\t} else {\n\t\t\n\t\t$entities = elgg_get_entities_from_metadata($entities_options);\n\t\t\n\t\t$entities_options['count'] = true;\n\t\t$count_entities = elgg_get_entities_from_metadata($entities_options);\n\t}\n\t\n\t$result = array(\n\t\t\"entities\" \t=> $entities,\n\t\t\"count\" \t=> $count_entities\n\t\t);\n\t\t\n\treturn $result;\n}", "public function search()\n {\n $domains = Configure::read('AccessControlAllowOrigin');\n $this->response->cors($this->request)\n ->allowOrigin($domains)\n ->allowMethods(['GET'])\n ->allowHeaders(['X-CSRF-Token'])\n ->maxAge(300)\n ->build();\n\n $version = '2-2';\n if (!empty($this->request->query['version'])) {\n $version = $this->request->query['version'];\n }\n if (empty($this->request->query['lang'])) {\n throw new BadRequestException();\n }\n $lang = $this->request->query['lang'];\n\n $page = 1;\n if (!empty($this->request->query['page'])) {\n $page = $this->request->query['page'];\n }\n $page = max($page, 1);\n\n if (count(array_filter(explode(' ', $this->request->query['q']))) === 1) {\n $this->request->query['q'] .= '~';\n }\n\n $options = [\n 'query' => $this->request->query('q'),\n 'page' => $page,\n ];\n $this->loadModel('Search', 'Elastic');\n $results = $this->Search->search($lang, $version, $options);\n\n $this->viewBuilder()->className('Json');\n $this->set('results', $results);\n $this->set('_serialize', 'results');\n }", "function search() {\n\n /* Start building the query object. We hope to end up with something like:\n $reqeust = '{\n \"from\" : 0,\n \"size\": 10,\n \"query\" : {\n \"terms\" : {\n \"creator\" : [ \"card\" ]\n }\n },\n sort: {\n title: {\n order: \"desc\"\n }\n }\n }';\n */\n $request = array();\n\n // Users can query by specifying an url param like &filter=title:ender\n // TODO: We should allow for multiple filters.\n $key_and_val = explode(\":\", $this->get('GET.filter'));\n if (count($key_and_val) == 2 and !empty($key_and_val[0]) and !empty($key_and_val[1])) {\n $request['query']['query_string']['fields'] = array($key_and_val[0]);\n $request['query']['query_string']['query'] = '*' . $key_and_val[1] . '*';\n $request['query']['query_string']['default_operator'] = 'AND';\n } else {\n $request['query'] = array(\"match_all\" => new stdClass);\n }\n //$request['query']['query_string']['query'] = 'American FactFinder';\n // start parameter (elasticsearch calls this 'from')\n $incoming_start = $this->get('GET.start');\n if (!empty($incoming_start)) {\n $request['from'] = $this->get('GET.start');\n }\n \n // limit parameter (elasticsearch calls this 'size')\n $incoming_limit = $this->get('GET.limit');\n if (!empty($incoming_limit)) {\n $request['size'] = $this->get('GET.limit');\n }\n \n // sort parameter\n $incoming_sort = $this->get('GET.sort');\n $sort_field_and_dir = explode(\" \", $this->get('GET.sort'));\n if (count($sort_field_and_dir) == 2) {\n $request['sort'] = array($sort_field_and_dir[0] => array('order' => $sort_field_and_dir[1]));\n }\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n\n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n // callback for jsonp requests\n $incoming_callback = $this->get('GET.callback');\n if (!empty($incoming_callback)) {\n $this->set('callback', $this->get('GET.callback'));\n }\n \n // We don't want dupes. Dedupe based on hollis_id\n //$deduped_docs = $this->dedupe_using_hollis_id($cleaned_results);\n \n // Hopefully we're deduping on intake\n $deduped_docs = $cleaned_results;\n \n $this->set('results', $deduped_docs);\n //$this->set('results', $cleaned_results);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n }", "public function search(Request $request, Response $response)\n {\n $query = $request->getQueryParam('q', NULL);\n $media = $request->getQueryParam('media', RESMedia::IMAGE);\n $limit = intval($request->getQueryParam('limit', 10));\n $offset = intval($request->getQueryParam('offset', 0));\n $audiences = $request->getQueryParam('for', NULL);\n\n $result = $this->client->search($query, $media, $limit, $offset, $audiences);\n\n // for each item in the results, construct a URI pointing at the search\n // service API, in the form\n // http://<search service domain and port>/proxy?uri=<topic URI>\n // (where the piece before the querystring is derived\n // from the endpoints for this Controller)\n $baseApiUri = $this->endpoints['proxy'];\n\n foreach($result['items'] as $index => $item)\n {\n $querystring = 'uri=' . urlencode($item['topic_uri']) . '&media=' . urlencode($media);\n $item['api_uri'] = $baseApiUri . '?' . $querystring;\n $result['items'][$index] = $item;\n }\n\n return $response->withJson($result);\n }", "public function parseSearchResponse($response, SearchApiQueryInterface $query) {\n\n $search_result = array('results' => array());\n\n $search_result['result count'] = $response['hits']['total'];\n\n // Parse results.\n if (!empty($response['hits']['hits'])) {\n foreach ($response['hits']['hits'] as $result) {\n $id = $result['_id'];\n\n $search_result['results'][$id] = array(\n 'id' => $result['_id'],\n 'score' => $result['_score'],\n 'fields' => isset($result['_source']) ? $result['_source'] : array(),\n );\n\n foreach ($result as $key => $value) {\n if (!in_array($key, array('_id', '_score', '_source'))) {\n $search_result['results'][$id][$key] = $value;\n }\n }\n }\n }\n\n $search_result['search_api_facets'] = $this->parseSearchFacets($response, $query);\n\n // Check for spellcheck suggestions.\n if (module_exists('search_api_spellcheck') && $query->getOption('search_api_spellcheck')) {\n $search_result['search_api_spellcheck'] = new SearchApiSpellcheckElasticsearch($response);\n }\n\n return $search_result;\n }", "public function Search($request,$responce)\n {\n $arr = [];\n\n //Select db and get all data from collection\n $db = $this->mongo->selectDB(\"test\");\n\n $collection = $db->test;\n $cursor = $collection->find();\n if(!empty($cursor)) {\n $array = iterator_to_array($cursor);\n foreach ($array as $value) {\n $params[\"index\"] = \"test\";\n $params[\"type\"] = \"test_type\";\n $params[\"id\"] = $value[\"_id\"];\n $arr[] = $this->elastic->get($params);\n }\n\n }\n\n //Create users zakaz data\n $userdata = [];\n $data = [];\n foreach ($arr as $value)\n {\n $userdata[] = [\n \"data\" => $value[\"_source\"],\n \"id\" => $value[\"_id\"],\n ];\n $udata[] = $value[\"_source\"];\n }\n\n //Compare user zakaz data and search string\n // put result in array and show it\n $search = [];\n $time_start = $request->getParam(\"year\").\"-\".$request->getParam(\"month\").\"-\".$request->getParam(\"day\").\" 00:00:00\";\n $time_end = $request->getParam(\"year\").\"-\".$request->getParam(\"month\").\"-\".$request->getParam(\"day\").\" 23:59:59\";\n foreach ($userdata as $data)\n {\n if(strcasecmp($request->getParam(\"search\"), $data[\"id\"]) == 0 ||\n stripos($request->getParam(\"search\"),$data[\"data\"][\"name\"]) !==false ||\n stripos($request->getParam(\"search\"),$data[\"data\"][\"surname\"]) !==false ||\n stripos($request->getParam(\"search\"),$data[\"data\"][\"email\"]) !==false ||\n $request->getParam(\"price_from\")<=$data[\"data\"][\"price\"] && $data[\"data\"][\"price\"]<=$request->getParam(\"price_to\") ||\n strtotime($time_start)<=strtotime($data[\"data\"][\"date\"]) && strtotime($data[\"data\"][\"date\"])<=strtotime($time_end)\n )\n {\n $search[] = $data[\"data\"];\n }\n\n\n }\n\n\n return $this->view->render($responce,\"app.twig\",[\"search\" => $search,\"zakaz\" => $udata]);\n\n }", "public function search() {\n\t\tif(isset($_GET['query'])) $this->query_str = $_GET['query'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t$cache = new Cache($this->query_str);\n\t\t//check if the result is cached\n\t\t\n\t\tif($cache->allow_cache()) {\n\t\t\t$raw = $cache->load_cache();\n\t\t\tif($raw === false) $raw = null;\n\t\t}\n\n\t\tif($raw === null) {\n\t\t\t//check if jar exists\n\t\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar search ' . escapeshellarg($this->query_str));\n\t\t\telse return;\n\n\t\t\t//only save into cached when the escaped string equal to input string\n\t\t\tif($raw !== null && count($raw) > 0 && $cache->allow_cache()) \n\t\t\t\t$cache->save_cache($raw);\n\t\t}\n\n\t\t$this->results = json_decode($raw);\n\n\t\t$this->end_time = microtime(true);\n\t}", "public function index()\n {\n $filters = request()->only('date', 'region');\n\n $events = $this->event\n ->when(isset($filters['date']), function ($query) use ($filters) {\n return $query->whereDate('date', $filters['date']);\n })\n ->when(isset($filters['region']), function ($query) use ($filters) {\n return $query->where('place', 'LIKE', \"%{$filters['region']}%\");\n })\n ->paginate(10);\n\n return response()->json([\n 'error' => false,\n 'message' => '',\n 'data' => [\n 'current_page' => $events->currentPage(),\n 'last_page' => $events->lastPage(),\n 'per_page' => $events->perPage(),\n 'path' => $events->path(),\n 'data' => new EventCollection($events)\n ]\n ], 200);\n }", "protected function handleGetFiltered() {\n\t\t\tif ($this->verifyRequest('GET') && $this->verifyParams()) {\n\t\t\t\textract($this->getResultParams());\n\t\t\t\t\n\t\t\t\t$strFilterBy = $this->objUrl->getFilter('by');\n\t\t\t\t$mxdFilter = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3));\n\t\t\t\t\n\t\t\t\tif ($strFilterBy == 'username') {\n\t\t\t\t\tAppLoader::includeUtility('DataHelper');\n\t\t\t\t\t$mxdFilter = DataHelper::getUserIdByUsername($mxdFilter);\n\t\t\t\t\t$strFilterBy = 'userid';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($strFilterBy == 'userid') {\n\t\t\t\t\t$blnCached = $this->loadFromCache($strNamespace = sprintf(AppConfig::get('UserEventNamespace'), $mxdFilter));\n\t\t\t\t} else {\n\t\t\t\t\t$blnCached = $this->loadFromCache();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (empty($blnCached)) {\n\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\tswitch ($strFilterBy) {\n\t\t\t\t\t\tcase 'userid':\n\t\t\t\t\t\t\t$blnResult = $objUserEvent->loadByUserId($mxdFilter, $arrFilters, false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($blnResult) {\n\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\tif ($objUserEvent->count()) {\n\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t'events' => $this->formatEvents($objUserEvent),\n\t\t\t\t\t\t\t\t'total' => $objUserEvent->count()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t'events' => array(),\n\t\t\t\t\t\t\t\t'total' => 0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset($blnCached)) { \n\t\t\t\t\t\t\tif (isset($strNamespace)) {\n\t\t\t\t\t\t\t\t$this->saveToCache($this->intCacheExpire, $strNamespace);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->saveToCache($this->intCacheExpire);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t$this->error();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}", "public function parse(){\n\t\t$this->_data = array();\n\t\n\t\ttry{\n\t\t\tparent::parse();\n\t\t\t\n\t\t\tif(!empty($this->_response)){\n\t\t\t\tif($this->_request['method'] == 'GetEvents'){\n\t\t\t\t\tif(is_array($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->GetEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else if($this->_request['method'] == 'SearchEvents'){\n\t\t\t\t\tif(is_array($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->SearchEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->SearchEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(!empty($this->_response->GetCountryByIDResult)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetCountryByIDResult;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}catch(TNException $e){\n\t\t\t$err = $this->debug($e->getMessage());\n\t\t\techo $err;\n\t\t}\n\t\n\t\treturn $this;\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Calendar_GetAllEvents_Results($outputs);\n }", "function _callback_search_result(&$result, Request $request, Template $page, $query, $offset, $limit, $count) {\n\t\tif (0 == $offset) {\n\t\t\t// Match for username\n\t\t\tif (preg_match('/^\\s*([\\w\\-]*[a-z][\\w\\-]*)\\s*$/', $query, $m))\n\t\t\t\t$user = $this->resolveLogin($m[1]);\n\t\t\t// Match for email\n\t\t\telse if (preg_match('/^\\s*([\\w\\-\\.]+@[\\w\\-\\.]+)\\s*$/', $query, $m))\n\t\t\t\t$user = $this->resolveEmail($m[1]);\n\t\t\t// Match for number\n\t\t\telse if (preg_match('/^\\s*(\\d+)\\s*$/', $query)) {\n\t\t\t\t$collection = $this->findUsers($query);\n\t\t\t\tif (count($users = $collection->getContents(0, 1)))\n\t\t\t\t\t$user = $users[key($users)];\n\t\t\t\t$count = $collection->getCount();\n\t\t\t}\n\t\t\t\t\n\t\t\tif (isset($user)) {\n\t\t\t\t$summary = clone $page;\n\t\t\t\t$summary->assign('user', $user);\n\t\t\t\t$summary->assign('count', isset($count) ? $count : 1);\n\t\t\t\t$summary->assign('request', $request);\n\t\t\t\t$result .= $summary->fetch(tpl_design_path('module/user/summary_search_result.tpl'));\n\t\t\t}\n\t\t}\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Calendar_GetEvent_Results($outputs);\n }", "public function search(Request $request){\n $fromDate = $request->input('from_date','');\n $toDate = $request->input('to_date','');\n $group = $request->input('group','');\n $action = $request->input('action','');\n $pageSize = $request->input('page_size',10);\n //\n $result = UserAuditLogic::Instance()\n ->search($fromDate, $toDate, \"\", $group, $action, \"\", \"\", $pageSize);\n //\n $returnModel = ReturnModel::Instance();\n $returnModel->status = \"200\";\n $returnModel->data = $result;\n return json_encode($returnModel);\n }", "private function rest_search() {\n\t\t// return json elements here\n\t}", "public static function get_entries_by_search_returns() {\n return new external_single_structure(array(\n 'count' => new external_value(PARAM_INT, 'The total number of records matching the request.'),\n 'entries' => new external_multiple_structure(\n self::get_entry_return_structure()\n ),\n 'ratinginfo' => \\core_rating\\external\\util::external_ratings_structure(),\n 'warnings' => new external_warnings()\n ));\n }", "public function store()\n {\n $racingJSON = Input::json();\n\n foreach ($racingJSON as $key => $resultsArray) {\n $result = $this->results->ResultEvents($resultsArray);\n }\n return Response::json(array('error' => $result['error'], 'message' => $result['message']), $result['status_code']);\n }", "public function execute() {\n\t\t$params = $this->extractRequestParams();\n\t\t$this->validateParams( $params );\n\t\t$eventId = $params['eventid'];\n\t\t$startDate = $params['startdate'];\n\t\t$endDate = $params['enddate'];\n\t\t$increment = $params['increment'];\n\t\t$userDefString = $params['userdefs'];\n\n\t\t// This is if it's asking for tableData\n\t\tif ( isset( $params['tabledata'] ) ) {\n\t\t\t$tableData = SpecialClickTracking::buildRowArray( $startDate, $endDate, $userDefString );\n\t\t\t$this->getResult()->addValue( array( 'tablevals' ), 'vals', $tableData );\n\t\t} else {\n\t\t\t// Chart data\n\t\t\ttry {\n\t\t\t\t$click_data = SpecialClickTracking::getChartData( $eventId, $startDate, $endDate, $increment, $userDefString );\n\t\t\t\t$this->getResult()->addValue( array( 'datapoints' ), 'expert', $click_data['expert'] );\n\t\t\t\t$this->getResult()->addValue( array( 'datapoints' ), 'basic', $click_data['basic'] );\n\t\t\t\t$this->getResult()->addValue( array( 'datapoints' ), 'intermediate', $click_data['intermediate'] );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t/* No result */\n\t\t\t}\n\t\t}\n\t}", "public function get_results() {\n\n\t\t\tif(!isset($_GET['wpusquery'])) {\n\t\t\t\tdie(); // if no data has been entered, quit\n\t\t\t} else {\n\t\t\t\t$searcharray = $_GET['wpusquery'];\n\t\t\t}\n\n\t\t\t$nonce = $_GET['searchNonce'];\n\t\t\tif(!wp_verify_nonce($nonce, 'search-nonce')) // make sure the search nonce matches the nonce generated earlier\n\t\t\t{\n\t\t\t\tdie ('Busted!');\n\t\t\t}\n\n\t\t\tif(class_exists(\"WPUltimateSearchPro\")) {\n\t\t\t\t$this->pro_class->execute_query_pro($searcharray);\n\t\t\t} else {\n\t\t\t\t$this->execute_query_basic($searcharray);\n\t\t\t}\n\t\t}", "public function indexResultsAction()\n {\n $datatable = $this->get('pixeloid_app.datatable.eventregistration');\n $datatable->buildDatatable();\n\n $query = $this->get('sg_datatables.query')->getQueryFrom($datatable);\n\n $function = function($qb)\n {\n // $qb->andWhere(\"post.title = :p\");\n $qb->andWhere(\"eventregistration.created > :date\");\n $qb->setParameter('date', new \\DateTime($this->container->getParameter('start_date')));\n };\n\n // $query->addWhereAll($function);\n\n // return $query->getResponse();\n $query->addWhereAll($function);\n\n // // Or add the callback function as WhereAll\n // //$query->addWhereAll($function);\n\n // // Or to the actual query\n // $query->buildQuery();\n // $qb = $query->getQuery();\n\n // //$qb->addSelect(\"eventregistration.email\");\n // //$qb->andWhere(\"moviecategories.shortlist = 1\");\n\n // // var_dump($qb->getQuery()->getSQL());\n // // exit;\n\n // $query->setQuery($qb);\n return $query->getResponse();\n\n }", "function query_api($term, $location, $price, $radius, $categories, $sort) { \n $response = search($term, $location, $price, $radius, $categories, $sort);\n echo $response;\n}", "public function api(SearchRequest $request)\n\t{\n\t\t$lat = $request->input('lat');\n\t\t$lng = $request->input('lng');\n\t\t$count = $request->input('count');\n\t\t\n\t\t$settings = Config::get('twitter');\n\n\t\t$url = 'https://api.twitter.com/1.1/search/tweets.json';\n\t\t$getfield = \"?q=&geocode=$lat,$lng,50km&count=$count\";\n\t\t$requestMethod = 'GET';\n\t\t$twitter = new TwitterAPIExchange($settings);\n\t\t \n\t\t$api_response = $twitter ->setGetfield($getfield)\n\t\t ->buildOauth($url, $requestMethod)\n\t\t ->performRequest();\n\t\t \n\t\theader('Content-Type: application/json');\n\t\t//return response()->json( $api_response );\n\t\techo $api_response;\n\t}", "public function search(Request $request)\n {\n $appid = '6433c1f8';\n $appkey = 'acf4191deb52673bc8bcbf205e8c2ccc';\n $q = htmlspecialchars($request->search);\n $client = new Client([\n 'base_uri' => 'https://api.edamam.com',\n ]);\n $search = 'search?q='.$q.'&app_id='.$appid.'&app_key='.$appkey.'&from=0&to=12';\n $req = $client->request('GET', $search);\n $data = json_decode($req->getBody(), true);\n\n\n $results = [];\n $keyword = $data['q'];\n foreach($data['hits'] as $arr){\n $results[] = [\n 'uri'=>$arr['recipe']['uri'],\n 'shareAs'=>$arr['recipe']['shareAs'],\n 'sourceUrl'=>$arr['recipe']['url'],\n 'label'=>$arr['recipe']['label'],\n 'image'=>$arr['recipe']['image'],\n 'source'=>$arr['recipe']['source'],\n 'calories'=>$arr['recipe']['calories'],\n 'ingredients'=>count($arr['recipe']['ingredients'])\n ];\n }\n return view('search.resultview')->withKeyword($keyword)->withResults($results);\n }", "public function search()\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->getUrl());\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n ob_start();\n curl_exec($ch);\n $response = ob_get_contents();\n ob_end_clean();\n\n curl_close($ch);\n\n return $response;\n }", "function search($query, $year=NULL, $page_limit=5, $page=NULL) {\n\t\t\n\t\t$args = array (\n\t\t\t\"q\" => $query,\n\t\t\t\"year\" => (int)$year,\n\t\t\t\"page_limit\" => $page_limit,\n\t\t\t\"page\" => $page\n\t\t);\n\t\t\n\t\t$json = $this->request(self::API_URL_TMPL_SEARCH, array(\n\t\t\t\"query-args\" => $this->collapse_args($args)\n\t\t));\n\t\t\n\t\tif(isset($json->total)) {\n\t\t\t\n\t\t\tif($json->total > 0) {\n\t\t\t\t\n\t\t\t\treturn new rt_search_result($json);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn array();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn NULL;\n\t\t\t\n\t\t}\n\t\t\n\t}", "private function executeSearch(): array\n {\n $cover = input_get('cover');\n $older = input_get('older');\n $younger = input_get('younger');\n $ounit = input_get('ounit');\n $yunit = input_get('yunit');\n $covers = getCovers();\n $nonce = $this->create_nonce();\n $json = [\n 'nonce' => $nonce,\n 'admin_url' => url_admin_post(),\n 'referer' => url_menu('bc_covers'),\n 'title' => \\get_admin_page_title(),\n 'images' => url_images(),\n 'mode' => 'search',\n 'folder' => folder_covers(),\n 'baseurl' => url_cover(''),\n 'covers' => $covers,\n 'cover' => $cover,\n 'older' => $older,\n 'ounit' => $ounit,\n 'younger' => $younger,\n 'yunit' => $yunit\n ];\n $oldts = $this->get_timestamp($older, $ounit);\n $youngts = $this->get_timestamp($younger, $yunit);\n $json['found'] = $this->search($cover, $covers, $oldts, $youngts);\n return $json;\n }", "protected function _handleResponse(){\n $this->_results[] = array(\n 'http_code' => $this->getInfoHTTPCode(),\n 'response' => $this->getResponse(),\n 'server' => $this->getUrl()\n );\n }", "public function getTimelineBySearch_get() {\n extract($_GET);\n //------------checking the limit is empty or numeric------------//\n\n if (!(is_numeric($limit))) {\n if (empty($limit)) {\n $this->response([\n 'status' => 500,\n 'status_message' => 'Data Not Found.!'], REST_Controller::HTTP_PRECONDITION_FAILED);\n } else {\n $this->response([\n 'status' => 500,\n 'status_message' => 'Limit should be numeric!'], REST_Controller::HTTP_PRECONDITION_FAILED);\n }\n }\n //--------------------ends---------------------------------//\n //------------checking the limit is empty or numeric------------//\n\n if (!(is_numeric($start))) {\n if (empty($start)) {\n $this->response([\n 'status' => 500,\n 'status_message' => 'Data Not Found.!'], REST_Controller::HTTP_PRECONDITION_FAILED);\n } else {\n $this->response([\n 'status' => 500,\n 'status_message' => 'Start value should be numeric!'], REST_Controller::HTTP_PRECONDITION_FAILED);\n }\n }\n \n $result = $this->feeds_model->getTimelineBySearch($limit, $start, $search);\n // print_r($result);die(); \n switch ($result['status']) {\n case '200': //-----------------if response is 200 it returns login successful\n $this->response([\n 'status' => 200,\n 'PRODUCTIMAGE_PATH' => PRODUCTIMAGE_PATH,\n 'PROFILEIMAGEPATH' => PROFILEIMAGE_PATH,\n 'status_message' => $result['status_message']], REST_Controller::HTTP_OK);\n break;\n\n case '500': //-----------------if response is 500 it returns error message\n $this->response([\n 'status' => 500,\n 'status_message' => 'Oops! No more Feeds available.'], REST_Controller::HTTP_PRECONDITION_FAILED);\n break;\n\n default:\n $this->response([\n 'status' => 500,\n 'status_message' => \"Something went wrong. Request was not send...!!!\"], REST_Controller::HTTP_PRECONDITION_FAILED);\n break;\n }\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 search($search, $offset){\n\n $response = Http::get(self::baseURL.'/search?api_key='.self::api_key.'&q='.$search.'&offset='.$offset.'&rating=g&lang=en');\n\n $count = count($response->json('data'));\n\n return ['count' => $count, 'data' => $response->json('data')];\n \n }", "public function search($query = '')\n\t{\n\t\tif($query != '')\n\t\t{\n\t\t\t$trackClass = $this->apiClass->getPackage($this->auth, 'track', $this->config);\n\t\t\t\n\t\t\t$methodVars = array(\n\t\t\t\t\t'track' => $query,\n\t\t\t\t\t'limit' => $this->numResults\n\t\t\t);\n\t\n\t\t\tif ($results = $trackClass->search($methodVars) ) {\n\t\t\t\t$this->fromArray($results);\n\t\t\t} //else no results\n\t\t} else {\n\t\t\t$this->error(\"provide a search query, you dickhead\");\n\t\t}\n\t}", "public function get()\n {\n $this->composeQuery();\n $result = $this->connection->client()->search($this->queryBody);\n $this->scrollId = array_get($result,'_scroll_id');\n\n return array_get($result, 'hits.hits');\n }", "public function search(Request $request)\n {\n $referer = URL::previous();\n\n $searchTerm = $request->input('searchterm');\n $filter = $request->input('filter');\n\n $isSearchFromMagazine = strpos($referer, '/magazine'); //determine if the search originates from the EMU Magazine page\n\n //Pagination properties\n $page = Input::get('page', 1); // Get the current page or default to 1, this is what you miss!\n $perPage = 10;\n $offset = ($page * $perPage) - $perPage;\n\n // Story results\n $searchStoryResults = array();\n if(!$filter || $filter == 'stories' || $filter == 'all'){\n $searchStoryResultsNonMagazine = Story::runSearchNonMagazine($searchTerm);\n\n foreach($searchStoryResultsNonMagazine as $nm_story){\n $searchStoryResults[] = $nm_story;\n }\n }\n\n // Event results\n $searchEventResults = array();\n if(!$filter || $filter == 'events' || $filter == 'all'){\n $searchEventResults = Event::runSearch($searchTerm);\n }\n\n // Announcement results\n $searchAnnouncementResults = array();\n if(!$filter || $filter == 'announcements' || $filter == 'all'){\n $searchAnnouncementResults = Announcement::runSearch($searchTerm);\n }\n\n // Magazine results (fetch ONLY if user is filtering by magazine OR the search originated from the EMU Magazine site)\n $searchMagazineResults = array();\n if( ($filter && $filter == 'magazine') || $isSearchFromMagazine){\n // Magazine stories should be filtered by is_approved AND a start date before or on the current date\n $searchMagazineResults = Story::runSearchMagazine($searchTerm);\n }\n\n // Expert results\n $searchExpertsResults = array();\n if(!$filter || $filter == 'experts' || $filter == 'all'){\n $searchExpertsResults = Expert::runSearch($searchTerm);\n }\n\n $allStories = $this->searchProvider->condenseSearch(array($searchStoryResults, $searchEventResults, $searchAnnouncementResults, $searchMagazineResults, $searchExpertsResults));\n\n $numResults = count($allStories);\n\n $storiesPaginated = new LengthAwarePaginator(array_slice($allStories, $offset, $perPage, true), count($allStories), $perPage);\n $storiesPaginated->appends('searchterm', $searchTerm); // keep ?searchterm=term in URL\n $storiesPaginated->setPath('search');\n\n if($filter != null){\n $storiesPaginated->appends('filter', $filter);\n }\n\n return view('public.searchresults', compact('storiesPaginated', 'searchTerm', 'numResults', 'isSearchFromMagazine', 'filter'));\n }", "public function execute_query($filters, $accessinfo, $limit = 0) {\n global $USER;\n\n if (empty($limit)) {\n $limit = \\core_search\\manager::MAX_RESULTS;\n }\n\n // If there is any problem we trigger the exception as soon as possible.\n $client = $this->get_search_client();\n\n // Create the query object.\n $query = $this->create_user_query($filters, $accessinfo);\n\n // If the query cannot have results, return none.\n if (!$query) {\n return [];\n }\n\n // We expect good match rates, so for our first get, we will get a small number of records.\n // This significantly speeds solr response time for first few pages.\n $query->setRows(min($limit * 3, static::QUERY_SIZE));\n $response = $this->get_query_response($query);\n\n // Get count data out of the response, and reset our counters.\n list($included, $found) = $this->get_response_counts($response);\n $this->totalenginedocs = $found;\n $this->processeddocs = 0;\n $this->skippeddocs = 0;\n if ($included == 0 || $this->totalenginedocs == 0) {\n // No results.\n return array();\n }\n\n // Get valid documents out of the response.\n $results = $this->process_response($response, $limit);\n\n // We have processed all the docs in the response at this point.\n $this->processeddocs += $included;\n\n // If we haven't reached the limit, and there are more docs left in Solr, lets keep trying.\n while (count($results) < $limit && ($this->totalenginedocs - $this->processeddocs) > 0) {\n // Offset the start of the query, and since we are making another call, get more per call.\n $query->setStart($this->processeddocs);\n $query->setRows(static::QUERY_SIZE);\n\n $response = $this->get_query_response($query);\n list($included, $found) = $this->get_response_counts($response);\n if ($included == 0 || $found == 0) {\n // No new results were found. Found being empty would be weird, so we will just return.\n return $results;\n }\n $this->totalenginedocs = $found;\n\n // Get the new response docs, limiting to remaining we need, then add it to the end of the results array.\n $newdocs = $this->process_response($response, $limit - count($results));\n $results = array_merge($results, $newdocs);\n\n // Add to our processed docs count.\n $this->processeddocs += $included;\n }\n\n return $results;\n }", "public function handleResponse($response)\n {\n $taskStatus = new IndexingTaskStatusQueryResponse();\n\n $response = $response->json();\n\n\n if ( !isset( $response['status'] ) ) {\n throw new \\Exception(\"Unexpected response\"); // TODO Replace with subclassed exception\n }\n $responseStatus = $response['status'];\n\n\n if ( !isset( $response['task'] ) ) {\n throw new \\Exception(\"Unexpected response\"); // TODO Replace with subclassed exception\n }\n $taskStatus->setTask( $response['task'] );\n\n if ( !isset( $responseStatus['id'] ) ) {\n throw new \\Exception(\"Unexpected response\"); // TODO Replace with subclassed exception\n }\n $taskStatus->setId( $responseStatus['id'] );\n\n if ( !isset( $responseStatus['status'] ) ) {\n throw new \\Exception(\"Unexpected response\"); // TODO Replace with subclassed exception\n }\n $taskStatus->setStatus( $responseStatus['status'] );\n\n if ( !isset( $responseStatus['duration'] ) ) {\n throw new \\Exception(\"Unexpected response\"); // TODO Replace with subclassed exception\n }\n $taskStatus->setDuration( $responseStatus['duration'] );\n\n\n return $taskStatus;\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_GetEvents_Results($outputs);\n }", "public function index(Request $request)\n {\n $events = Event::orderBy('start_at', 'desc');\n if ($request->query('description')) {\n $events = $events->where('description', 'LIKE', $request->query('description'));\n }\n\n if ($request->query('responsable')) {\n $events = $events->where('responsable_id', '=', $request->query('responsable'));\n }\n return $this->sendResponse($events->get(), 'success', 200);\n }", "public function testResults()\n {\n $search_term = $this->getSearchTerm();\n $website = $this->getWebsite();\n $limit = $this->getLimit();\n\n $request = $this->mockHttpRequest([\n 'query' => $search_term,\n 'website' => $website\n ]);\n $service = $this->mockGoogleSearchServiceForSearch($search_term, $website, $limit);\n\n $controller = new SearchResultsController($request, $service);\n\n $result = $controller->results();\n\n $this->assertInstanceOf(Views\\Listing::class, $result);\n $this->assertIsArray($result->getData());\n $this->assertEquals($result->getData(), [\n 'search_results' => [],\n 'total_mentions' => 0,\n 'query' => $search_term,\n 'website' => $website,\n 'total_searched' => $limit\n ]);\n }", "public function getEvents()\n {\n if ($this->input->get('start') === null || $this->input->get('end') === null) {\n $response = array(\"status\" => false, \"message\" => 'Please provide necessary data.');\n\n $this->send(400, $response);\n }\n\n $reqData = array('start' => $this->input->get('start'), 'end' => $this->input->get('end'));\n\n $events = $this->model->getEvents($reqData);\n\n $this->send(200, $events);\n }", "function display_elastic_search ($q, $filter=null, $from = 0, $size = 20, $callback = '')\n{\n\tglobal $elastic;\n\t\n\t$status = 404;\n\t\t\t\t\n\tif ($q == '')\n\t{\n\t\t$obj = new stdclass;\n\t\t$obj->hits = new stdclass;\n\t\t$obj->hits->total = 0;\n\t\t$obj->hits->hits = array();\n\t\t\n\t\t$status = 200;\n\t}\n\telse\n\t{\t\t\n\t\t// query type\t\t\n\t\t$query_json = '';\n\t\t\n\t\tif ($filter)\n\t\t{\n\t\t\tif (isset($filter->author))\n\t\t\t{\n\t\t\t\t// author search is different( but not working yet)\t\n\t\t\t\t$query_json = \t\t\n\t'{\n\t\"size\":50,\n \"query\": {\n \"bool\": {\n \"must\": [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.author\"] \n\t\t\t\t}\n\t\t\t\t}]\n }\n }\n\t}';\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t\t\n\t\t\t// echo $query_json;\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// default is search on fulltext fields\n\t\tif ($query_json == '')\n\t\t{\n\t\t\t$query_json = '{\n\t\t\t\"size\":50,\n\t\t\t\t\"query\": {\n\t\t\t\t\t\"bool\" : {\n\t\t\t\t\t\t\"must\" : [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.fulltext\", \"search_data.fulltext_boosted^4\"] \n\t\t\t\t}\n\t\t\t\t}],\n\t\t\t\"filter\": <FILTER>\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"aggs\": {\n\t\t\t\"type\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.type.keyword\" }\n\t\t\t },\n\t\t\t \"year\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.year\" }\n\t\t\t },\n\t\t\t \"container\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.container.keyword\" }\n\t\t\t },\n\t\t\t \"author\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.author.keyword\" }\n\t\t\t },\n\t\t\t \"classification\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.classification.keyword\" }\n\t\t\t } \n\n\t\t\t}\n\n\t\n\t\t\t}';\n\t\t\t\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t}\n\t\n\t$filter_string = '[]';\n\t\n\tif ($filter)\n\t{\n\t\t$f = array();\n\t\t\n\t\tif (isset($filter->year))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.year'} = $filter->year;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\n\t\t// this doesn't work\n\t\tif (isset($filter->author))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.author'} = $filter->author;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\t\t\n\t\t$filter_string = json_encode($f);\n\t}\n\t\n\t$query_json = str_replace('<FILTER>', $filter_string, $query_json);\n\t\n\t\n\t$resp = $elastic->send('POST', '_search?pretty', $post_data = $query_json);\n\t\n\n\t\t$obj = json_decode($resp);\n\n\t\t$status = 200;\n\t}\n\t\n\tapi_output($obj, $callback, 200);\n}", "public abstract function getResults();", "public function getResponse()\n {\n /*$params = [\n 'index' => Constants::INDEX,\n 'type' => Constants::DOC_TYPE_USERS,\n 'id' =>'AViGp5EVwZZaO7go9C4Y'\n ];*/\n\n // return $this->main->client->delete($params);\n\n $params = [\n 'index' => Constants::INDEX,\n 'type' => Constants::DOC_TYPE_USERS,\n 'body' => ['query' => ['match_all' => []], 'from' => 0, 'size' => 1000\n ]\n ];\n $response = $this->main->client->search($params);\n return $response;\n\n }", "public function index() {\n $output = $this->verifyProvidedInput(['keywords' => 'Keywords are required to perform a search']);\n\n if (empty($output)) {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n if (!empty($this->request->advancedSearch) && $this->request->advancedSearch) {\n $sortBy = (isset($this->request->sortBy) ? $this->request->sortBy : 'rawListPrice');\n $reverseSort = (isset($this->request->reverseSort) ? boolval($this->request->reverseSort) : false);\n $data = $this->getRETS->getListing()\n ->setSortBy($sortBy)\n ->setReverseSort($reverseSort)\n ->search($preparedKeywords, \n $this->request->extra, \n $this->request->maxPrice, \n $this->request->minPrice, \n $this->request->beds, \n $this->request->baths, \n $this->request->includeResidential, \n $this->request->includeLand, \n $this->request->includeCommercial);\n \n $this->addThumbnails($data);\n $output = $this->respondData($data);\n } else {\n $preparedKeywords = htmlspecialchars($this->request->keywords);\n $data = $this->getRETS->getListing()->searchByKeyword($preparedKeywords);\n $this->addThumbnails($data);\n $output = $this->respondData($data);\n }\n }\n\n return $output;\n }", "public function search(array $data): SearchResponse\n {\n $response = self::$adapter->search($data, $this->api_key);\n\n return new SearchResponse($response, $data, $this);\n\n }", "public function execute() {\n\t\t$result = [\n\t\t\t'success' => false,\n\t\t\t'errorMessage' => '',\n\t\t];\n\t\t$options = $this->getRequest()->getParams();\n\t\ttry {\n\t\t\t$response = $this->clientResolver->create(\"elasticsearch7\", $options)->testConnection();\n\t\t\tif ($response) {\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$url = \"{$options['hostname']}:{$options['port']}\";\n\t\t\t\t$this->curl->get($url);\n\t\t\t\t$result['html'] = $this->curl->getBody();\n\t\t\t}\n\t\t} catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n\t\t\t$result['errorMessage'] = $e->getMessage();\n\t\t} catch (\\Exception $e) {\n\t\t\t$message = __($e->getMessage());\n\t\t\t$result['errorMessage'] = $this->tagFilter->filter($message);\n\t\t}\n\n\t\t/** @var \\Magento\\Framework\\Controller\\Result\\Json $resultJson */\n\t\t$resultJson = $this->resultJsonFactory->create();\n\t\treturn $resultJson->setData($result);\n\t}", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }", "function searchForEvent(){\n global $conn;\n\n $json = file_get_contents('php://input');\n $obj = json_decode($json, true);\n\n $searchString = $obj['searchString'];\n\n $returned->isValid = 'valid';\n\n $sql = \"SELECT PostEvent.id, PostEvent.UsersId, PostEvent.EventName, PostEvent.DateAdded, PostEvent.Description, Users.FirstName, Users.LastName, Users.ProfilePicture, \n (SELECT P.PictureOne FROM UserPost AS P JOIN PostEvent AS E ON E.Id = P.EventId WHERE P.EventId = PostEvent.id LIMIT 0, 1) AS postPicture \n FROM PostEvent\n INNER JOIN Users ON PostEvent.UsersId = Users.UsersId \n WHERE (PostEvent.EventName Like '%$searchString%') AND Users.ActiveFlag = 1\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $stmt->bind_result($id, $UsersID, $EventName, $DateAdded, $Description, $FirstName, $LastName, $ProfilePicture, $postPicture);\n $stmt->store_result();\n $returned->timeline = array();\n while($stmt->fetch()){\n $dt = new DateTime($DateAdded);\n $tempDate = $dt->format('Y-m-d');\n $temp = array('id'=>$id, 'UsersId'=>$UsersID, 'title'=>$EventName, 'time'=>$tempDate, 'description'=>$Description, 'FirstName'=>$FirstName, 'LastName'=>$LastName, 'ProfilePicture'=>$ProfilePicture, 'PostImage'=>$postPicture);\n array_push($returned->timeline, $temp);\n }\n $stmt->close();\n echo json_encode($returned);\n }", "public function getResults();", "public function searchAction()\n { \n $request = Request::createFromGlobals();\n \n $search = $request->query->get('search');\n \n $em = $this->getDoctrine()->getManager();\n \n $addresses = $em->getRepository('comemNewsroomBundle:Ad')->search($search);\n \n $response = new Response(json_encode($addresses));\n \n $response->headers->set('Content-Type', 'application/json');\n \n return $response;\n }", "public function search(Request $request)\n {\n $start = $request->start;\n $length = $request->length;\n $search = $request->search['value'];\n\n // Getting and parsing the data\n $subscribers = $this->connector->getSubscribers($length, $start, $search);\n\n // Serverside data table\n $columns = [\n ['db' => 'email', 'dt' => 0],\n ['db' => 'name', 'dt' => 1],\n ['db' => 'country', 'dt' => 2],\n ['db' => 'subscribe_date', 'dt' => 3],\n ['db' => 'subscribe_time', 'dt' => 4],\n ['db' => 'id', 'dt' => 5],\n ];\n\n $data = $this->dtOutput($columns, $subscribers, $request);\n return response()->json($data);\n }", "public function resultAction($search, $amountOfResults, $page)\n {\n $hub = new Hub();\n $hub->setSearch($search);\n $hub->setNrOfResult($amountOfResults); \n $hub->setSort('null');\n $hub->setPage($page); \n $array = array( \n 'search'=> $search, \n 'nrOfResult' => $amountOfResults, \n 'sort' => $hub->getSearch(), \n 'page' => $page, ); \n $session = $this->getRequest()->getSession();\n $session->set('hub', $array);\n $response = $this->forward('AppBundle:Rest:getSearch', array('hub' =>$array)); \n $result = explode(\"\\r\\n\\r\\n\", $response, 2);\n $results = json_decode($result[1],true);\n \n return $this->render('default/result.html.twig', array ('results'=>$results));\n }", "public function execute()\n\t{\n\t\t$searchQuery = $this->searchPhrase ? '\"' . $this->searchPhrase . '\"' : '';\n\t\t$queryParams['attributesToRetrieve']\t= '*';\n\t\t$queryParams['maxValuesPerFacet']\t\t= '100';\n\t\t$queryParams['attributesToHighlight']\t= array();\n\t\t$queryParams['filters']\t\t\t\t\t= $this->filters;\n\t\t$queryParams['facetFilters']\t\t\t= $this->facetFilters;\n\t\t$queryParams['offset']\t\t\t\t\t= $this->start;\n\t\t$queryParams['length']\t\t\t\t\t= $this->limit;\n\n\t\t$queryParams['facets']\t\t\t\t\t= array($this->facetField);\n\n\t\t// We need to pass this query by setRawQueryParams for advsearch frontent.\n\t\t$queryParams['advancedSyntax']\t\t\t= 'true';\n\n\t\tif (count($this->rawQueryParams))\n\t\t{\n\t\t\t$queryParams = array_merge($queryParams, $this->rawQueryParams);\n\t\t}\n\n\t\t// This is something Juggad related to Osianama requirement.\n\t\tif (isset($queryParams['restrictSearchableAttributes']))\n\t\t{\n\t\t\t$searchQuery = $this->searchPhrase ? $this->searchPhrase : '';\n\t\t}\n\n\t\t$Data = $this->algoliaIndex->search($searchQuery, $queryParams);\n\n\t\tif (count($Data['hits']) > 0)\n\t\t{\n\t\t\t$this->total\t= $Data['nbHits'];\n\t\t\t$this->count\t= $Data['hitsPerPage'];\n\t\t\t$this->records\t= '';\n\n\t\t\tforeach ($Data['hits'] as $key => $row)\n\t\t\t{\n\t\t\t\tunset($row['_highlightResult']);\n\n\t\t\t\t$row['id']\t\t\t\t\t\t= $row['objectID'];\n\t\t\t\t$this->records['data'][$key]\t= (object) $row;\n\t\t\t}\n\n\t\t\tif ($this->facetField)\n\t\t\t{\n\t\t\t\t$this->records['facets'] = $Data['facets'];\n\t\t\t}\n\t\t}\n\t}", "public function Search(Request $request) {\n\n\t\t$searchQuery = $request->input('q');\n\n\t\t$data = $this->twitterAPIService->Search($searchQuery);\n\n\t\t//reverse chronological order\n\t\tusort($data, function($a, $b) {\n\t\t\tif($a->createdTimestamp == $b->createdTimestamp)\n\t\t\t\treturn 0;\n\n\t\t\treturn $a->createdTimestamp > $b->createdTimestamp ? -1 : 1;\n\t\t});\n\n\t\t$serializedData = array_map(function ($tweet) {\n\t\t\treturn $tweet->jsonSerialize();\n\t\t}, $data);\n\n\t\t$tweetsResponse = ['tweets' => $serializedData];\n\n\t\treturn JsonResponse::create($tweetsResponse);\n\t}", "public function indexAction()\n {\n\ttry {\n \t// print_r($this->getRequest()->getQuery());\n\t\t\n $sE = new \\CL\\Service\\Entity\\CLServiceEntity($this->getRequest()->getQuery());\n\n $s = new \\CL\\Service\\CLService($sE);\n\t\t$startdate = strtotime(\"-2 day\") * 1000;\n\t\t$enddate = strtotime(\"+30 day\") * 1000;\n\t\t// print_r($startdate);\n\t\t// print_r(\"\\n\");\n\t\t// print_r($enddate);\n $wasSuccessful = $s->queryEventsAPI($startdate, $enddate);\n \t\n \n if ($wasSuccessful) {\n\t $result = new JsonModel(array(\n \t\t\t'success'=>true,\n \t\t));\n } else {\n\t $result = new JsonModel(array(\n \t\t\t'success'=>false,\n \t\t));\n }\n \n return $result;\n \n } catch(\\Exception $e)\n\t {\n\t throw new ControllerException('Error Submitting Events API Request', $e);\n\t }\n }", "protected function found()\n {\n $this->response = $this->response->withStatus(200);\n $this->jsonBody($this->payload->getOutput());\n }", "public function PerformSearch(){\r\n\t\t\r\n\t\t// get all our search requirements\r\n\t\t$query = self::get_query($mysqlSafe = true);\r\n\t\t$types = self::get_mapped_types();\r\n\t\t$filters = self::get_mapped_filters();\r\n\t\t\r\n\t\t// prepare our final result object\r\n\t\t$allResults = ArrayList::create();\r\n\t\t\r\n\t\t// loop all the records we need to lookup\r\n\t\tforeach ($types as $type){\r\n\t\t\t\r\n\t\t\t$sql = '';\r\n\t\t\t$joins = '';\r\n\t\t\t$where = '';\r\n\t\t\t$sort = '';\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Result selection\r\n\t\t\t * We only need ClassName and ID to fetch the full object (using the SilverStripe ORM)\r\n\t\t\t * once we've got our results\r\n\t\t\t **/\r\n\t\t\t$sql.= \"SELECT \\\"\".$type['Table'].\"\\\".\\\"ID\\\" AS \\\"ResultObject_ID\\\" FROM \\\"\".$type['Table'].\"\\\" \";\r\n\t\t\t\r\n\t\t\t// Join this type with any dependent tables (if applicable)\r\n\t\t\tif (isset($type['JoinTables'])){\r\n\t\t\t\tforeach ($type['JoinTables'] as $joinTable){\r\n\t\t\t\t\t$joins.= \"LEFT JOIN \\\"\".$joinTable.\"\\\" ON \\\"\".$joinTable.\"\\\".\\\"ID\\\" = \\\"\".$type['Table'].\"\\\".\\\"ID\\\" \";\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Query term\r\n\t\t\t * We search each column for this type for the provided query string\r\n\t\t\t */\r\n\t\t\t$where .= ' WHERE (';\r\n\t\t\tforeach ($type['Columns'] as $i => $column){\r\n\t\t\t\t$column = explode('.',$column);\r\n\t\t\t\tif ($i > 0){\r\n\t\t\t\t\t$where .= ' OR ';\r\n\t\t\t\t}\r\n\t\t\t\t$where .= \"\\\"\".$column[0].\"\\\".\\\"\".$column[1].\"\\\" LIKE CONCAT('%','\".$query.\"','%')\";\r\n\t\t\t}\r\n\t\t\t$where.= ')';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Apply our type-level filters (if applicable)\r\n\t\t\t **/\t\t\r\n\t\t\tif (isset($type['Filters'])){\r\n\t\t\t\tforeach ($type['Filters'] as $key => $value){\r\n\t\t\t\t\t$where.= ' AND ('.$key.' = '.$value.')';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Apply filtering\r\n\t\t\t **/\r\n\t\t\t$relations_sql = '';\r\n\r\n\t\t\tif ($filters){\r\n\t\t\t\tforeach ($filters as $filter){\r\n\r\n\t\t\t\t\t// Apply filters, based on filter structure\r\n\t\t\t\t\tswitch ($filter['Structure']){\r\n\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Simple column value filter\r\n\t\t\t\t\t\t **/\r\n\t\t\t\t\t\tcase 'db':\r\n\r\n\t\t\t\t\t\t\t// Identify which table has the column which we're trying to filter by\r\n\t\t\t\t\t\t\t$table_with_column = null;\r\n\t\t\t\t\t\t\tif (isset($type['JoinTables'])){\r\n\t\t\t\t\t\t\t\t$tables_to_check = $type['JoinTables'];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$tables_to_check = [];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$tables_to_check[] = $type['Table'];\r\n\r\n\t\t\t\t\t\t\tforeach ($tables_to_check as $table_to_check){\r\n\t\t\t\t\t\t\t\t$column_exists_query = DB::query( \"SHOW COLUMNS FROM \\\"\".$table_to_check.\"\\\" LIKE '\".$filter['Column'].\"'\" );\r\n\r\n\t\t\t\t\t\t\t\tforeach ($column_exists_query as $column){\r\n\t\t\t\t\t\t\t\t\t$table_with_column = $table_to_check;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Not anywhere in this type's table joins, so we can't search this particular type\r\n\t\t\t\t\t\t\tif (!$table_with_column){\r\n\t\t\t\t\t\t\t\tcontinue 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t// open our wrapper\r\n\t\t\t\t\t\t\t$where.= ' AND (';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * This particular type needs to join with other parent tables to\r\n\t\t\t\t\t\t\t * form a complete, and searchable row\r\n\t\t\t\t\t\t\t **/\r\n\t\t\t\t\t\t\tif (isset($type['JoinTables'])){\r\n\t\t\t\t\t\t\t\tforeach ($type['JoinTables'] as $join_table){\r\n\t\t\t\t\t\t\t\t\t//$joins.= \"LEFT JOIN \\\"\".$type['Table'].\"\\\" ON \\\"\".$join_table.\"\\\".\\\"ID\\\" = \\\"\".$type['Table'].\"\\\".\\\"ID\\\"\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (is_array($filter['Value'])){\r\n\t\t\t\t\t\t\t\t$valuesString = '';\r\n\t\t\t\t\t\t\t\tforeach ($filter['Value'] as $value){\r\n\t\t\t\t\t\t\t\t\tif ($valuesString != ''){\r\n\t\t\t\t\t\t\t\t\t\t$valuesString.= ',';\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t$valuesString.= \"'\".$value.\"'\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$valuesString = $filter['Value'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$where.= \"\\\"\".$table_with_column.\"\\\".\\\"\".$filter['Column'].\"\\\" \".$filter['Operator'].\" '\".$valuesString .\"'\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// close our wrapper\r\n\t\t\t\t\t\t\t$where.= ')';\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Simple relational filter (ie Page.Author)\r\n\t\t\t\t\t\t **/\r\n\t\t\t\t\t\tcase 'has_one':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Identify which table has the column which we're trying to filter by\r\n\t\t\t\t\t\t\t$table_with_column = null;\r\n\t\t\t\t\t\t\tif (isset($type['JoinTables'])){\r\n\t\t\t\t\t\t\t\t$tables_to_check = $type['JoinTables'];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$tables_to_check = [];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$tables_to_check[] = $type['Table'];\r\n\r\n\t\t\t\t\t\t\tforeach ($tables_to_check as $table_to_check){\r\n\t\t\t\t\t\t\t\t$column_exists_query = DB::query( \"SHOW COLUMNS FROM \\\"\".$table_to_check.\"\\\" LIKE '\".$filter['Column'].\"'\" );\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\tforeach ($column_exists_query as $column){\r\n\t\t\t\t\t\t\t\t\t$table_with_column = $table_to_check;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Not anywhere in this type's table joins, so we can't search this particular type\r\n\t\t\t\t\t\t\tif (!$table_with_column){\r\n\t\t\t\t\t\t\t\tcontinue 2;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// join the relationship table to our record(s)\r\n\t\t\t\t\t\t\t$joins.= \"LEFT JOIN \\\"\".$filter['Table'].\"\\\" ON \\\"\".$filter['Table'].\"\\\".\\\"ID\\\" = \\\"\".$table_with_column.\"\\\".\\\"\".$filter['Column'].\"\\\"\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(!empty($filter['Value'])){\r\n\t\t\t\t\t\t\t\tif (is_array($filter['Value'])){\r\n\t\t\t\t\t\t\t\t\t$ids = '';\r\n\t\t\t\t\t\t\t\t\tforeach ($filter['Value'] as $id){\r\n\t\t\t\t\t\t\t\t\t\tif ($ids != ''){\r\n\t\t\t\t\t\t\t\t\t\t\t$ids.= ',';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$ids.= \"'\".$id.\"'\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$ids = $filter['Value'];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$where.= ' AND ('.\"\\\"\".$table_with_column.\"\\\".\\\"\".$filter['Column'].\"\\\" IN (\". $ids .\")\".')';\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Complex relational filter (ie Page.Tags)\r\n\t\t\t\t\t\t **/\r\n\t\t\t\t\t\tcase 'many_many':\r\n\r\n\t\t\t\t\t\t\t// Make sure this type has a relationship to this filter object\r\n\t\t\t\t\t\t\tif (isset($filter['JoinTables'][$type['Key']])){\r\n\r\n\t\t\t\t\t\t\t\t$filter_join = $filter['JoinTables'][$type['Key']];\r\n\r\n\t\t\t\t\t\t\t\t$joins.= \"LEFT JOIN \\\"\".$filter_join['Table'].\"\\\" ON \\\"\".$type['Table'].\"\\\".\\\"ID\\\" = \\\"\".$filter_join['Table'].\"\\\".\\\"\".$filter_join['Column'].\"\\\"\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(!empty($filter['Value'])){\r\n\t\t\t\t\t\t\t\t\tif (is_array($filter['Value'])){\r\n\t\t\t\t\t\t\t\t\t\t$ids = '';\r\n\t\t\t\t\t\t\t\t\t\tforeach ($filter['Value'] as $id){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ids != ''){\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ids.= ',';\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t$ids.= \"'\".$id.\"'\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$ids = $filter['Value'];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif ($relations_sql !== ''){\r\n\t\t\t\t\t\t\t\t\t\t$relations_sql.= \" AND \";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t$relations_sql.= \"\\\"\".$filter_join['Table'].\"\\\".\\\"\".$filter['Table'].\"ID\\\" IN (\". $ids .\")\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Append any required relations SQL\r\n\t\t\t\tif ($relations_sql !== ''){\r\n\t\t\t\t\t$where.= ' AND ('.$relations_sql.')';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Compile our sql string\r\n\t\t\t$sql.= $joins;\r\n\t\t\t$sql.= $where;\r\n\r\n\t\t\t// Debugging\r\n\t\t\t//echo '<h3 style=\"position: relative; padding: 20px; background: #EEEEEE; z-index: 999;\">'.str_replace('\"', '`', $sql).'</h3>';\r\n\r\n\t\t\t// Eexecutioner enter stage left\r\n\t\t\t$results = DB::query($sql);\r\n\t\t\t$resultIDs = array();\r\n\r\n\t\t\t// Add all the result ids to our array\r\n\t\t\tforeach ($results as $result){\r\n\r\n\t\t\t\t// Make sure we're not already a result\r\n\t\t\t\tif (!isset($resultIDs[$result['ResultObject_ID']])){\r\n\t\t\t\t\t$resultIDs[$result['ResultObject_ID']] = $result['ResultObject_ID'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Convert our SQL results into SilverStripe objects of the appropriate class\r\n\t\t\tif ($resultIDs){\r\n\t\t\t\t$resultObjects = $type['ClassName']::get()->filter(['ID' => $resultIDs]);\r\n\t\t\t\t$allResults->merge($resultObjects);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sort = false;\r\n\t\t// Sorting applied throug form submission\r\n\t\tif(isset(self::get_mapped_sort()['Sort'])){\r\n\t\t\t$sort = self::get_mapped_sort()['Sort'];\t\t\r\n\t\t\t$sort = str_replace(\"'\", \"\\'\", $sort);\r\n\t\t\t$sort = str_replace('\"', '\\\"', $sort);\r\n\t\t\t$sort = str_replace('`', '\\`', $sort);\r\n\t\t}\r\n\t\t// Default sort defined in config\r\n\t\telseif(isset(self::get_mapped_defaults()['sort'])){\r\n\t\t\t$sort = self::get_mapped_defaults()['sort'];\r\n\t\t}\r\n\t\tif($sort){\r\n\t\t\t$allResults = $allResults->Sort($sort);\r\n\t\t}\r\n\r\n\t\t// Remove duplicates\r\n\t\t$allResults->removeDuplicates('ID');\r\n\r\n\t\t// filter by permission\r\n\t\tif($allResults) foreach($allResults as $result) {\r\n\t\t\tif(!$result->canView()) $allResults->remove($result);\r\n\t\t}\r\n\t\t\r\n\t\t// load into a paginated list. To change the items per page, set via the template (ie Results.setPageLength(20))\r\n\t\t$paginatedItems = PaginatedList::create($allResults, $this->request);\r\n\t\t\r\n\t\treturn $paginatedItems;\r\n\t}", "public function GetSearch(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $user_id = $_POST['user_id'];\n $keyword = $_POST['keyword'];\n $type = $_POST['type'];\n $user_auth_key = $_POST['user_auth_key'];\n $latitude = $_POST['latitude'];\n $longitude = $_POST['longitude'];\n $page_no = $_POST['page_no'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($keyword) && !empty($type) && !empty($user_auth_key) && !empty($page_no)){\n $result = $res->CheckAuthentication($user_id, $user_auth_key, $conn);\n if($result != false){\n $res->get_search($user_id, $keyword, $type, $latitude, $longitude, $page_no, $conn);\n $this->dbClose();\n }\n else{\n $this->dbclose();\n $error = array('status' => \"0\", \"msg\" => \"Not Authorised To get detail\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "public function getEventsAction() {\n\t\tdate_default_timezone_set ( 'UTC' );\n\t\t\n\t\t// Short-circuit if the client did not give us a date range.\n\t\tif (! isset ( $_GET ['start'] ) || ! isset ( $_GET ['end'] )) {\n\t\t\tdie ( \"Please provide a date range.\" );\n\t\t}\n\t\t\n\t\t// Parse the start/end parameters.\n\t\t// These are assumed to be ISO8601 strings with no time nor timezone, like \"2013-12-29\".\n\t\t// Since no timezone will be present, they will parsed as UTC.\n\t\t$range_start = Object\\Shift::parseDateTime ( $_GET ['start'] );\n\t\t$range_end = Object\\Shift::parseDateTime ( $_GET ['end'] );\n\t\t$data [] = $range_start->toString ( \\Zend_Date::ISO_8601 );\n\t\t$data [] = $range_end->toString ( \\Zend_Date::ISO_8601 );\n\t\t// Parse the timezone parameter if it is present.\n\t\t$timezone = null;\n\t\tif (isset ( $_GET ['timezone'] )) {\n\t\t\t$timezone = new DateTimeZone ( $_GET ['timezone'] );\n\t\t}\n\t\t\n\t\t// Read and parse our events JSON file into an array of event data arrays.\n\t\t$json = file_get_contents ( PIMCORE_LAYOUTS_DIRECTORY . '/assets/json/events.json' );\n\t\t$input_arrays = new Object\\Shift\\Listing (); // json_decode($json, true);\n\t\t \n\t\t// Accumulate an output array of event data arrays.\n\t\t$output_arrays = array ();\n\t\tforeach ( $input_arrays as $event ) {\n\t\t\t\n\t\t\t// Convert the input array into a useful Event object\n\t\t\t// $event2 = Object\\Shift::create($event->toArray());\n\t\t\t// $event2->setKey(Pimcore_File::getValidFilename('New Name 10'));\n\t\t\t// $event2->setParentId(53);\n\t\t\t// $event2->save();\n\t\t\t// $output_arrays['new'] = $event2 ;\n\t\t\t\n\t\t\t// $data[]= $event->getEnd()->toString(\\Zend_Date::ISO_8601);\n\t\t\t// If the event is in-bounds, add it to the output\n\t\t\tif ($event->isWithinDayRange ( $range_start, $range_end )) {\n\t\t\t\t$output_arrays [] = $event->toCalendar ();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Send JSON to the client.\n\t\t$reponse = new Reponse ();\n\t\t\n\t\t$reponse->data = $output_arrays; // $input_arrays;\n\t\t$reponse->message = \"TXT_SHIFTS_SENT\";\n\t\t$reponse->success = true;\n\t\t\n\t\t$this->render ( $reponse );\n\t\t// echo json_encode($output_arrays);\n\t}", "protected function wrapResults($outputs)\n {\n return new LastFm_User_GetEvents_Results($outputs);\n }", "public function run()\n {\n $result = new JsonAjaxResult();\n \n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n \n $elements = $this->get_elements();\n \n $elements = $elements->as_array();\n \n $result->set_property(self::PROPERTY_ELEMENTS, $elements);\n $result->set_property(self::PROPERTY_TOTAL_ELEMENTS, $this->user_count);\n \n $result->display();\n }", "public function getSearch()\n {\n $keyword= Input::get('q');\n $keywords = Explode(' ',$keyword);\n $query= DB::table('events')\n ->leftJoin('organizations', 'organizations.id', '=', 'events.org_id');\n foreach ($keywords as $key => $value) {\n $query ->orWhere('organizations.name', 'like', DB::raw(\"'%$value%'\"));\n $query ->orWhere('events.name', 'like', DB::raw(\"'%$value%'\"));\n }\n\n //search that event in Database\n $events= $query->get();\n // var_dump($events);\n\n //return display search result to user by using a view\n return View::make('event')->with('event', $events);\n }", "private function get_results() {\n $cache = new SearchCache();\n\n if ($this->cache and $cache->can_cache()) {\n if (!($resultdocs = $cache->cache($this->term))) {\n $resultdocs = $this->process_results();\n //cache the results so we don't have to compute this on every page-load\n $cache->cache($this->term, $resultdocs);\n //print \"Using new results.\";\n } else {\n //There was something in the cache, so we're using that to save time\n //print \"Using cached results.\";\n } \n } else {\n //no caching :(\n //print \"Caching disabled!\";\n $resultdocs = $this->process_results();\n } \n return $resultdocs;\n }", "public function executeSearch(sfWebRequest $request) {\n \t// look into PHP buffering to facilitate with GATC setting before redirecting to exact match\n \t$this->getResponse()->setSlot('body_class','search');\n \t$this->query = trim($request->getParameter('q'));\n \tif(!in_array($this->query, sfConfig::get('app_search_default_queries'))) {\n \t\t$SA = new SearchAgent($this->query);\n \t\t// if exact match is found redirect to the part's route\n \t\tif($route = $SA->search()) $this->redirect($route);\n \t\telse { // otherwise, see if similar parts exist for the user's query\n \t\t\tif($this->similar_parts = $SA->getSimilarParts()) {\n\t \t\t\t$this->count = $this->similar_parts[0]['count'];\n\t \t\t\t$this->search_routes = $SA->getSearchRoutes();\n\t \t\t\t$this->search_routes_class = $this->getSearchRoutesClass(count($this->search_routes));\n\t \t\t\t$this->num_serps = $this->count <= sfConfig::get('app_search_pagination_max_items') ? 1 : ceil($this->count / sfConfig::get('app_search_pagination_max_items'));\n\t \t\t\t$item_count = count($this->similar_parts);\n\t \t\t\t$rem = $item_count % 2 == 0 ? 2 : 1;\n\t \t\t\t$this->bottom_idx = $item_count - $rem;\n\t \t\t\t$this->getResponse()->setTitle(\"Product Search: '{$this->query}'\");\n\t \t\t\treturn sfView::SUCCESS;\n \t\t\t} else {\n \t\t\t\t// there is nothing in the database like the user's query\n \t\t\t\t$this->getResponse()->setTitle(\"Product Search: '{$this->query}'\");\n \t\t\t\treturn sfView::ALERT;\n \t\t\t}\n \t\t}\n \t} else {\n \t\t// user didn't enter anything into search box\n \t\t$this->getResponse()->setTitle('Product Search: Missing Query Parameter');\n \t\treturn sfView::ALERT;\n \t}\n }", "public function indexAction(Request $request) {\n if (empty($request->getSession()->get('token'))) {\n return $this->redirectToRoute('check_path');\n }\n $events = new Events();\n $em = $this->getDoctrine()->getManager();\n $dql = \"SELECT a FROM DroidInfotechDroidBundle:Events a \";\n $form = $this->createForm('DroidInfotech\\DroidBundle\\Form\\EventsType', $events);\n $form->handleRequest($request);\n if ($request->isMethod('POST')) {\n\n $dqls = array();\n if ($events->getTitle()) {\n $dqls[] = \" a.title like '\" . $events->getTitle() . \"%'\";\n }\n if ($events->getLocation()) {\n $dqls[] = \" a.location like '\" . $events->getLocation() . \"%'\";\n }\n if (!empty($dqls)) {\n $dql .= \" where \" . implode(\" AND \", $dqls);\n }\n }\n // echo $dql;\n $query = $em->createQuery($dql);\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query, /* query NOT result */ $request->query->getInt('page', 1)/* page number */, 10/* limit per page */\n );\n\n return $this->render('events/index.html.twig', array(\n 'pagination' => $pagination,\n 'form' => $form->createView()\n ));\n }", "public function searchAction($search)\n {\n $searchs = explode(',', $search);\n if (false === is_array($searchs) || true === empty($search)) {\n return new ErrorResponse('Bad Query', 400);\n }\n\n $available_searchs = $this->search;\n\n $where = array();\n $where_values = array();\n\n foreach ($searchs as $search) {\n list($key, $value) = explode('=', $search);\n if (false === in_array($key, $available_searchs)) {\n return new ErrorResponse($key.' is not in available key search ('.implode(', ', $available_searchs).')', 400);\n }\n\n $where[] = $key.' LIKE ?';\n $where_values[] = '%'.$value.'%';\n }\n $sql = 'SELECT '.$this->fields.' FROM '.$this->db->quoteIdentifier($this->table).($this->criteria ?: ' WHERE 1=1').' AND '.implode(' AND ', $where);\n $objects = $this->db->fetchAll($sql, array_merge($this->criteria_values, array($where_values)));\n\n return new JsonResponse($objects);\n }", "public function search()\n {\n // acquire the supplied data field or throw an exception\n $field = $this->getConfig('fieldKey');\n $userData = $this->request->getData();\n if (!isset($userData[$field])) {\n throw new BadRequestException('Missing data field');\n }\n \n // retrieve the response from the restful server\n $resource = $this->getConfig('resourceUrl');\n $resourceLoader = new ResourceLoader($resource);\n $data = $resourceLoader->search($userData[$field]);\n \n return [\n 'term' => $data->term,\n 'results' => $data->results,\n ];\n }", "public function postQuery (SearchRequest $request){\n $result = new SearchResult();\n $qry = new InvokePostMethodQuery($this, \"postquery\",null,\"request\", $request);\n $this->getContext()->addQueryAndResultObject($qry,$result);\n return $result;\n }", "private function processResults(): void\n {\n $this->pagerFantaResults->setMaxPerPage($this->searchOptions->getMaxPerPage());\n\n $this->numberOfResults = $this->pagerFantaResults->getNbResults();\n $this->numberOfPages = $this->pagerFantaResults->getNbPages();\n $this->resultsPerPage = $this->pagerFantaResults->getMaxPerPage();\n $this->currentPage = ($this->searchOptions->getCurrentPage() <= $this->numberOfPages) ? $this->searchOptions->getCurrentPage() : 1;\n $this->pagerFantaResults->setCurrentPage($this->currentPage);\n\n $this->result = $this->pagerFantaResults->getCurrentPageResults();\n\n $aggregations = $this->pagerFantaResults->getAdapter()->getAggregations();\n\n // Data type aggregation\n $dataTypeAggregations = $this->findKey($aggregations, 'friendly_name_agregation');\n if (array_key_exists('buckets', $dataTypeAggregations)) {\n $dataTypeBucket = array_column(\n $dataTypeAggregations['buckets'],\n 'doc_count',\n 'key'\n );\n $this->facetInfo['dataTypeInfo'] = $this->bucketToInfoArray($dataTypeBucket);\n }\n\n // Status info aggregation\n $datasetStatusAggregations = $this->findKey($aggregations, 'status');\n if (array_key_exists('buckets', $datasetStatusAggregations)) {\n $datasetStatusBucket = array_column(\n $datasetStatusAggregations['buckets'],\n 'doc_count',\n 'key'\n );\n $this->facetInfo['statusInfo'] = $this->getStatusInfo($datasetStatusBucket);\n }\n\n // Funder aggregation\n $funderAggregations = $this->findKey($aggregations, 'funders_aggregation');\n if (array_key_exists('buckets', $funderAggregations)) {\n $funderBucket = array_column(\n $funderAggregations['buckets'],\n 'doc_count',\n 'key'\n );\n $this->facetInfo['fundersInfo'] = $this->funderRepository->getFunderInfo($funderBucket);\n }\n\n // Product type aggregation\n $productTypeDescriptorAggregations = $this->findKey($aggregations, 'product_type_aggregation');\n if (array_key_exists('buckets', $productTypeDescriptorAggregations)) {\n $productTypeDescriptorBucket = array_column(\n $productTypeDescriptorAggregations['buckets'],\n 'doc_count',\n 'key'\n );\n $this->facetInfo['productTypeDescriptorInfo'] = $this->productTypeDescriptorRepository->getProductTypeDescriptorInfo($productTypeDescriptorBucket);\n }\n\n // Digital resource type aggregation\n $digitalResourceTypeDescriptorAggregations = $this->findKey($aggregations, 'digital_resource_aggregation');\n if (array_key_exists('buckets', $digitalResourceTypeDescriptorAggregations)) {\n $digitalResourceTypeDescriptorBucket = array_column(\n $digitalResourceTypeDescriptorAggregations['buckets'],\n 'doc_count',\n 'key'\n );\n $this->facetInfo['digitalResourceTypeDescriptorsInfo'] = $this->digitalResourceTypeDescriptorRepository->getDigitalResourceTypeDescriptorsInfo($digitalResourceTypeDescriptorBucket);\n }\n\n $researchGroupBucket = $this->combineBuckets($aggregations, 'research_group_aggregation', 'research_groups_aggregation');\n\n $this->facetInfo['researchGroupInfo'] = $this->researchGroupRepository->getResearchGroupsInfo($researchGroupBucket);\n\n // Tags info aggregation\n $tagsAggregations = $this->findKey($aggregations, 'tags_agg');\n if (array_key_exists('buckets', $tagsAggregations)) {\n $tagsBucket = array_column(\n $tagsAggregations['buckets'],\n 'doc_count',\n 'key'\n );\n $this->facetInfo['tagsInfo'] = $this->bucketToInfoArray($tagsBucket);\n }\n }", "public function get_events($args = [])\n {\n global $db, $system;\n /* initialize arguments */\n $user_id = !isset($args['user_id']) ? null : $args['user_id'];\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n $get_all = !isset($args['get_all']) ? false : true;\n $suggested = !isset($args['suggested']) ? false : true;\n $random = !isset($args['random']) ? false : true;\n $managed = !isset($args['managed']) ? false : true;\n $filter = !isset($args['filter']) ? \"admin\" : $args['filter'];\n $results = !isset($args['results']) ? $system['max_results_even'] : $args['results'];\n /* initialize vars */\n $events = [];\n $offset *= $results;\n /* get suggested events */\n if ($suggested) {\n $where_statement = \"\";\n /* make a list from joined events */\n $events_ids = $this->get_events_ids();\n if ($events_ids) {\n $events_list = implode(',', $events_ids);\n $where_statement .= \"AND event_id NOT IN (\" . $events_list . \") \";\n }\n $sort_statement = ($random) ? \" ORDER BY RAND() \" : \" ORDER BY event_id DESC \";\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n $get_events = $db->query(\"SELECT * FROM `events` WHERE event_privacy != 'secret' \" . $where_statement . $sort_statement . $limit_statement) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"taget\" all events who admin */\n } elseif ($managed) {\n $get_events = $db->query(sprintf(\"SELECT * FROM `events` WHERE event_admin = %s ORDER BY event_id DESC\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"viewer\" events who (going|interested|invited|admin) */\n } elseif ($user_id == null) {\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n switch ($filter) {\n case 'going':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_going = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n case 'interested':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_interested = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n case 'invited':\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE events_members.is_invited = '1' AND events_members.user_id = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n\n default:\n $get_events = $db->query(sprintf(\"SELECT * FROM `events` WHERE event_admin = %s ORDER BY event_id DESC \" . $limit_statement, secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n break;\n }\n /* get the \"target\" events */\n } else {\n /* get the target user's privacy */\n $get_privacy = $db->query(sprintf(\"SELECT user_privacy_events FROM users WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n $privacy = $get_privacy->fetch_assoc();\n /* check the target user's privacy */\n if (!$this->check_privacy($privacy['user_privacy_events'], $user_id)) {\n return $events;\n }\n /* if the viewer not the target exclude secret groups */\n $where_statement = ($this->_data['user_id'] == $user_id) ? \"\" : \"AND `events`.event_privacy != 'secret'\";\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false));\n $get_events = $db->query(sprintf(\"SELECT `events`.* FROM `events` INNER JOIN events_members ON `events`.event_id = events_members.event_id WHERE (events_members.is_going = '1' OR events_members.is_interested = '1') AND events_members.user_id = %s \" . $where_statement . \" ORDER BY event_id DESC \" . $limit_statement, secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n }\n if ($get_events->num_rows > 0) {\n while ($event = $get_events->fetch_assoc()) {\n $event['event_picture'] = get_picture($event['event_cover'], 'event');\n /* check if the viewer joined the event */\n $event['i_joined'] = $this->check_event_membership($this->_data['user_id'], $event['event_id']);;\n $events[] = $event;\n }\n }\n return $events;\n }", "public function execute() {\n $this->check();\n $this->buildQuery();\n $response = json_decode($this->getContents());\n $this->response = !empty($response) ? $response : NULL;\n }", "public function find($search_data) {\r\n\r\n # invoke find operation\r\n\r\n $params = array_merge($search_data, array('ws.op' => 'find'));\r\n\r\n $data = $this->adapter->request('GET', $this->url, $params);\r\n\r\n\r\n\r\n # get total size\r\n\r\n $ts_params = array_merge($params, array('ws.show' => 'total_size'));\r\n\r\n $total_size = $this->adapter->request('GET', $this->url, $ts_params, array('return' => 'integer'));\r\n\r\n $data['total_size'] = $total_size;\r\n\r\n\r\n\r\n # return collection\r\n\r\n return $this->readResponse($data, $this->url);\r\n\r\n }", "private function _process()\n {\n $params = $this->uri->uri_to_assoc(3);\n\n // grab any traditional GET parameters in the URL\n if (($pos = strpos($this->uri->uri_string(), '?')) !== false)\n {\n $getParams = substr($this->uri->uri_string(), $pos + 1);\n foreach(explode('&', $getParams) as $param)\n {\n list($key, $value) = explode('=', $param);\n $params[$key] = $value;\n }\n }\n\n // URL decode all of the parameters\n foreach ($params as $key => $value)\n {\n $params[$key] = urldecode($value);\n }\n\n // which report is going to be executed (do not use r_id param)\n if (isset($params['type']))\n {\n switch ($params['type']) {\n case \"answers\":\n $this->reportID = 165; // default OpenSearch report\n break;\n default:\n \\RightNow\\Libraries\\ThirdParty\\rss_error(\\RightNow\\Utils\\Config::getMessage(INVALID_OPENSEARCH_TYPE_SPECIFIED_LBL));\n }\n }\n else\n {\n $this->reportID = 165; // default OpenSearch report\n }\n\n // get the query\n if (isset($params['kw']))\n $this->q = $params['kw'];\n if (isset($params['q']))\n $this->q = $params['q'];\n\n if (isset($this->q))\n {\n $filters['keyword']->filters->data = $this->q;\n $filters['keyword']->filters->rnSearchType = 'keyword';\n $filters['keyword']->filters->reportID = $this->reportID;\n $filters['keyword']->type = 'keyword';\n $filters['search'] = true;\n }\n\n if (!$this->session->isNewSession())\n {\n // how many results\n if (isset($params['count']))\n $filters['per_page'] = $params['count'];\n\n // what is the startindex\n if (isset($params['startIndex']))\n {\n $filters['start_index'] = $params['startIndex'];\n }\n\n // It's only a \"search\" if there is no paging going on, and it's\n // not a first impression. Though this will be ignored if there\n // isn't actually a search term\n if (empty($filters['start_index']))\n {\n $filters['recordKeywordSearch'] = 1;\n }\n else\n {\n ActionCapture::record('opensearch', 'paging');\n }\n }\n if(isset($this->q) && $filters['recordKeywordSearch'] === 1){\n ActionCapture::record('opensearch', 'search', substr($this->q, 0, ActionCapture::OBJECT_MAX_LENGTH));\n }\n\n $reportFilter = $this->model('Report')->getFilterByName($this->reportID, 'os_search')->result;\n $filters['searchType']->filters->fltr_id = $reportFilter['fltr_id'];\n $filters['searchType']->filters->oper_id = $reportFilter['oper_id'];\n $filters['searchType']->filters->rnSearchType = 'searchType';\n $filters['searchType']->filters->reportID = $this->reportID;\n $filters['searchType']->type = 'searchType';\n\n if (isset($params['sort']))\n {\n $sort = explode(':', $params['sort']);\n\n $filters['sort_args']['filters']['sort_field0'] = array(\n 'col_id' => intval($sort[0]),\n 'sort_direction' => intval($sort[1]),\n 'sort_order' => 1 );\n }\n\n if (isset($params['p']))\n {\n $prodFilter = $this->model('Report')->getFilterByName($this->reportID, 'os_prod')->result;\n\n $filters['map_prod_hierarchy']->filters->fltr_id = $prodFilter['fltr_id'];\n $filters['map_prod_hierarchy']->filters->oper_id = $prodFilter['oper_id'];\n $filters['map_prod_hierarchy']->filters->rnSearchType = 'menufilter';\n $filters['map_prod_hierarchy']->filters->reportID = $this->reportID;\n\n foreach(explode(';', $params['p']) as $product)\n {\n $filters['map_prod_hierarchy']->filters->data[] = explode(',', $product);\n }\n }\n\n if (isset($params['c']))\n {\n $catFilter = $this->model('Report')->getFilterByName($this->reportID, 'os_cat')->result;\n\n $filters['map_cat_hierarchy']->filters->fltr_id = $catFilter['fltr_id'];\n $filters['map_cat_hierarchy']->filters->oper_id = $catFilter['oper_id'];\n $filters['map_cat_hierarchy']->filters->rnSearchType = 'menufilter';\n $filters['map_cat_hierarchy']->filters->reportID = $this->reportID;\n\n foreach(explode(';', $params['c']) as $category)\n {\n $filters['map_cat_hierarchy']->filters->data[] = explode(',', $category);\n }\n }\n\n foreach ($params as $name => $value)\n {\n $filterNum = 0;\n\n // filter parameters are preceded by a 'f_'\n if (stristr(substr($name, 0, 2), 'f_'))\n {\n $tempFilter = $this->model('Report')->getFilterByName($this->reportID, substr($name, 2))->result;\n\n $filters[\"os_filter$filterNum\"]->filters->fltr_id = $tempFilter['fltr_id'];\n $filters[\"os_filter$filterNum\"]->filters->oper_id = $tempFilter['oper_id'];\n $filters[\"os_filter$filterNum\"]->filters->rnSearchType = 'searchType';\n $filters[\"os_filter$filterNum\"]->filters->reportID = $this->reportID;\n $filters[\"os_filter$filterNum\"]->filters->data[] = $value;\n $filterNum++;\n }\n }\n\n $format['raw_date'] = true;\n\n $reportToken = \\RightNow\\Utils\\Framework::createToken($this->reportID);\n $results = $this->model('Report')->getDataHTML($this->reportID, $reportToken, $filters, $format)->result;\n\n if (!isset($results['headers']) || !isset($results['data']))\n \\RightNow\\Libraries\\ThirdParty\\rss_error(\\RightNow\\Utils\\Config::getMessage(ERROR_EXECUTING_REPORT_LBL) . \" \" . $this->reportID);\n\n // create the header array for easy column extraction\n foreach ($results['headers'] as $header)\n {\n if ($header['heading'] == 'title' ||\n $header['heading'] == 'link' ||\n $header['heading'] == 'pubDate' ||\n $header['heading'] == 'score')\n {\n $this->headers[] = array('heading' => $header['heading'], 'std' => true);\n }\n else\n {\n $this->headers[] = array('heading' => $header['heading']);\n }\n }\n\n // assemble a link that points back to an analogue of\n // this search on the regular enduser pages\n $this->homeLink = Url::getShortEufAppUrl('sameAsCurrentPage', '/home');\n if (isset($this->q))\n {\n $this->homeLink .= '/kw/' . $this->q;\n }\n $this->homeLink .= Url::sessionParameter();\n\n $output = $this->_toRssXml($results);\n\n if($output)\n {\n header('Content-Type: text/xml; charset='.$this->rssgen->outputencoding);\n header('Content-Length: '.strval(strlen($output)));\n echo $output;\n }\n else\n {\n \\RightNow\\Libraries\\ThirdParty\\rss_error(\"Error: \" . $this->rssgen->error);\n }\n }", "function get_event_list($userId, $location, $details, $filters, $limit, $offset)\n {\n\t\tlog_message('debug', '_event/get_event_list');\n\t\tlog_message('debug', '_event/get_event_list:: [1] userId='.$userId.' location='.json_encode($location).' details='.json_encode($details).' filters='.json_encode($filters).' limit='.$limit.' offset=',$offset);\n\n $status = (!empty($filters['status'])? $filters['status']: 'active');\n\n $searchString = '';\n $searchPhrase = (!empty($filters['searchString'])? ' MATCH(store_name) AGAINST (\"'.$filters['searchString'].'\") AND': '');\n $searchCatogory = (!empty($filters['categoryId'])? ' (SELECT _category_id FROM clout_v1_3.store_sub_categories WHERE _store_id =P.store_id AND _category_id='.$filters['categoryId'].' LIMIT 1) IS NOT NULL AND': '');\n $searchDate = (!empty($filters['eventDate'])? ' UNIX_TIMESTAMP(\"'.date('Y-m-d H:i:s',strtotime($filters['eventDate'])).'\") BETWEEN UNIX_TIMESTAMP(start_date) AND UNIX_TIMESTAMP(end_date) AND': '');\n\t $searchString .= ($searchPhrase.$searchDate.$searchDate);\n\n log_message('debug', '_event/get_event_list:: [2] searchstring='.$searchString);\n\n $result = $this->_query_reader->get_list('get_list_of_events',array(\n\t\t\t'user_id'=>$userId,\n\t\t\t'user_latitude'=>$location['latitude'],\n\t\t\t'user_longitude'=>$location['longitude'],\n 'owner_type'=>$details['ownerType'],\n 'promotion_types'=>$details['promotionTypes'],\n 'status'=>$status,\n 'list_type'=>$filters['listType'],\n 'max_search_distance'=>$details['maxSearchDistance'],\n\t\t\t'search_string'=>$searchString,\n 'limit_text'=>'limit '.$offset.', '.$limit\n\t\t\t));\n\n log_message('debug', '_event/get_event_list:: [3] result='.json_encode($result));\n return $result;\n }", "public function index(Request $request)\n {\n $data = [\n 'statusCode' => 200,\n 'errors' => null,\n 'message' => null,\n 'results' => []\n ];\n\n $events = EventPostEntity::with('type');\n\n if(isset($request->checkUserBid)) {\n if(isset($request->noSelectedPro)) {\n $events = $events->whereDoesntHave('selectedPro', function($query) use($request)\n {\n $query->where('user_id', '!=', $request->userId);\n });\n }\n\n if(isset($request->hasApplied)) {\n $events = $events->whereHas('bids', function($query) use($request)\n {\n $query->where('created_by', $request->userId);\n });\n }\n\n $events = $events->with([\n 'bids' => function($query) use($request)\n {\n $query->where('created_by', $request->userId);\n }\n ]);\n }\n\n if(isset($request->status)) {\n $events = $events->where('status', $request->status);\n }\n\n $events = $events->orderBy('id', 'DESC')->paginate(config('occ_pros.pagination.limit'));\n if(isset($request->paginateUrl)){\n $events->setPath($request->paginateUrl);\n }\n\n $data['results']['data'] = $events;\n $data['results']['pagination'] = $events->links()->toHtml();\n // dd($data);\n return response()->json($data);\n }", "protected function mockApiAndCollection($query = 'example', $response_type = 'successful', $pagination = 0) \n {\n switch($response_type) {\n default:\n case 'successful':\n $response = $this->getSearchResponse('search_response_success.xml');\n break;\n case 'empty':\n $response = $this->getSearchResponse('search_response_empty.xml');\n break;\n }\n\n $this->replaceApiActionByMock(\"klevu_search/api_action_idsearch\", $response);\n\n }", "public function index(Request $request)\n {\n $this->validate($request, [\n 'end_date' => 'date',\n 'start_date' => 'date',\n 'when' => 'in:past,future',\n ]);\n\n $queryParameters = array_filter(\n $request->only(['end_date', 'start_date', 'when'])\n );\n\n $events = Event::query();\n\n if (array_key_exists('end_date', $queryParameters)) {\n $events->where('end_date', $queryParameters['end_date']);\n }\n\n if (array_key_exists('start_date', $queryParameters)) {\n $events->where('start_date', $queryParameters['start_date']);\n }\n\n if (array_key_exists('when', $queryParameters)) {\n $now = Carbon::now();\n switch ($queryParameters['when']) {\n case 'past':\n $events->where('end_date', '<', $now->toIso8601String());\n break;\n case 'future':\n $events->where('start_date', '>', $now->toIso8601String());\n break;\n default:\n abort(500);\n }\n }\n\n return response()->json($events->paginate());\n }", "public function search($request, $country = ['CM','FR','US'])\n {\n /*$command = \"allintitle%3A+\";\n $command1 = \"insubject%3A+\";\n if(empty($request)) $request = \"ENSP Yaounde\";\n//*/\n\n $this->Loading($request,'all');\n\n $counts = 0;\n $nb = 40;\n $this->count = 0;\n\n $this->fetching($request,$nb);\n\n if($this->continue)\n {\n $this->recording($request,$counts,true);\n }\n\n return response()->json($this->searchResults);//*/\n }", "private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}", "public function searchAction(Request $request){\n\n // Get Posted Content\n $postedContent = json_decode($request->getContent());\n\n // Handle Error if type/text are not set\n if( !isset($postedContent->type) || !isset($postedContent->text)){\n return $this->handleError(\"Search Type or Search Text are not set\");\n }\n\n // What you need to get\n $searchType = $postedContent->type;\n $searchText = $postedContent->text;\n $type = \"search\";\n\n // Perform Regex Validation on Search Text\n if( !preg_match('/^[a-zA-Z0-9_\\d\\_\\s-]+$/', $searchText) ){\n return $this->handleError(\"Search Text should only contain alpha-numeric values, spaces or hyphen\");\n }\n\n $returnQuantity = 1;\n \n // Pass Additional Params\n $additionalParams = [\n \"p\" => 1,\n \"type\" => $searchType,\n \"q\" => $searchText,\n \"withBreweries\" => \"Y\",\n \"hasLabels\" => \"Y\"\n ];\n \n try {\n \n // Perform Request and get response array\n $response = $this->get(\"http\")->doRequest($returnQuantity, $type, $additionalParams);\n } catch (\\Exception $e){\n \n // handle any exceptions\n $this->handleError($e->getMessage());\n }\n \n // Check for any additional API Errors\n $checkForAdditionalErrors = json_decode($response);\n \n if( isset($checkForAdditionalErrors->errorMessage)) {\n \n // If any, throw exception\n return $this->handleError($checkForAdditionalErrors->errorMessage);\n }\n \n return new Response($response);\n }", "public function resultsAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $name = null;\n if(!empty( $request->get('name'))) {\n $name = $request->get('name');\n }\n\n $location = null;\n if(!empty( $request->get('location') )) {\n $location = $request->get('location');\n }\n\n $startDate = new DateTime();\n if(!empty( $request->get('start-dd'))) {\n $startDate = new DateTime($request->get('start-dd'));\n }\n\n $endDate = new DateTime('+ 1 day');\n if(!empty( $request->get('end-dd'))) {\n $endDate = new DateTime($request->get('end-dd'));\n }\n\n $bedRooms = $em->getRepository('AppBundle:BedRoom')->search($name, $location, $startDate, $endDate);\n\n dump($bedRooms);\n return $this->render('bedroom/results.html.twig', array(\n 'bedRooms' => $bedRooms,\n ));\n }", "public function sendSearchEvent($query, $filters = [])\n {\n try {\n $environment = $this->environment;\n $httpRequest = $this->httpRequest;\n $customerInfo = $environment->identifyCustomer();\n $website = $environment->getWebsite();\n $storeCode = $environment->getStoreCode();\n $data = [\n \"stacc_id\" => (string)$customerInfo['visitor_id'],\n \"query\" => (string)$query,\n \"filters\" => $filters,\n \"website\" => $website,\n 'store' => $storeCode,\n \"properties\" => $this->getProperties($customerInfo, $website, $storeCode)\n ];\n\n $url = $environment->getSearchEventURL();\n\n $timeout = $environment->getTimeout();\n\n $output = $httpRequest->postData($data, $url, $timeout);\n return $output;\n } catch (Exception $exception) {\n $this->logger\n ->critical(\n \"Apiclient->sendSearchEvent() Exception: \",\n [\n get_class($exception),\n $exception->getMessage(),\n $exception->getCode()\n ]\n );\n return \"{}\";\n }\n }", "public function search(Classes\\SearchRequest $arg) {\n\t\treturn $this->makeSoapCall(\"search\", $arg);\n\t}", "public function executeSearch(sfWebRequest $request)\n {\n \n// // Forward to a 404 page if the method used is not a post\n $this->forward404Unless($request->isMethod('post'));\n $this->setCommonValues('specimen', 'collection_name', $request);\n $item = $request->getParameter('searchSpecimen',array(''));\n // Instantiate a new specimen form\n $this->form = new SpecimensSelfFormFilter(array('caller_id'=>$item['caller_id']));\n // Triggers the search result function\n $this->searchResults($this->form, $request);\n }", "function show_search_result($records, $searchTimeElapsed){\r\n\t//Check if records were returned\r\n\tif ($records) {\r\n try { \t\r\n print \"<a name='sr'></a><div style='clear: both;'><br/><h2>Search Results</h2>\\n\";\r\n print \"<p>Returned \" . count($records) . \" total record\";\r\n if (count($records) !== 1) print 's';\r\n print \" in \";\r\n\tprintf (\"%01.3f\", $searchTimeElapsed);\r\n\tprint \" seconds:</p>\";\r\n\t\r\n\t$searchResultArray = array();\r\n\tforeach($records as $record){\r\n\t\t$recordObject = new Sobject($record->record);\r\n\t\t$searchResultArray[$recordObject->type][] = $recordObject;\r\n\t}\r\n\r\n\r\n\tforeach($searchResultArray as $recordSetName=>$records){\r\n\t\techo \"<h3 style='color: #0046ad;'>$recordSetName</h3>\";\r\n\t\t\r\n\t print \"<table class='data_table'>\\n\";\r\n\t\t//Print the header row on screen\r\n\t\t$record0 = $records[0];\r\n\t\tprint \"<tr><td>1</td>\";\r\n\t\t//If the user queried for the Salesforce ID, this special method is nessisary\r\n\t\t//to export it from the nested SOAP message. This will always be displayed\r\n\t\t//in the first column regardless of search order\r\n\t\tif ($record0->Id){\r\n\t\t\tprint \"<th>Id</th>\";\r\n\t\t}\r\n\t\tif ($record0->fields){\r\n\t\t\tforeach($record0->fields->children() as $field){\r\n\t\t \t\t\tprint \"<th>\";\r\n\t\t \tprint htmlspecialchars($field->getName(),ENT_QUOTES,'UTF-8');\r\n\t\t \tprint \"</th>\";\r\n\t\t }\r\n\t\t}else {\r\n\t\t\tprint \"</td></tr>\";\r\n\t\t}\r\n\t print \"</tr>\\n\";\r\n\t\r\n\t\t\t//Print the remaining rows in the body\r\n\t\t\t$rowNum = 2;\r\n\t foreach ($records as $record) {\t\r\n\t print \"<tr><td>$rowNum</td>\";\r\n\t $rowNum++;\r\n\t //Another check if there are ID columns in the body\r\n\t if (isset($record->Id)){\r\n\t \tprint \"<td>$record->Id</td>\";\r\n\t }\r\n\t //Print the non-ID fields\r\n\t if (isset($record->fields)){\r\n\t\t\tforeach($record->fields as $datum){\r\n\t\t\t\tprint \"<td>\";\r\n\t\t\t\tif($datum){\r\n\t\t\t\tprint htmlspecialchars($datum,ENT_QUOTES,'UTF-8');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprint \"&nbsp;\";\r\n\t\t\t\t}\r\n\t\t\t\tprint \"</td>\";\r\n\t\t\t}\r\n\t\t\tprint \"</tr>\\n\";\r\n\t } else{\r\n\t \tprint \"</td></tr>\\n\";\r\n\t }\r\n\t }\r\n\t print \"</table><p/>\";\r\n\t}\r\n\t print\t\"</div>\\n\";\r\n } catch (Exception $e) {\r\n \t$errors = null;\r\n\t\t$errors = $e->getMessage();\r\n\t\tprint \"<p />\";\r\n\t\tshow_error($errors);\r\n\t\tinclude_once('footer.php');\r\n\t\texit;\r\n }\r\n } else {\r\n \tprint \"<p><a name='sr'>&nbsp;</a></p>\";\r\n \tshow_error(\"Sorry, no records returned.\");\r\n }\r\n include_once('footer.php');\r\n}", "function doAPISearch($params) {\n global $searchUrl;\n\n $ch = curl_init(); // initialize curl handle\n curl_setopt($ch, CURLOPT_URL,$searchUrl . $params);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable\n curl_setopt($ch, CURLOPT_TIMEOUT, 8); // times out after 4s\n curl_setopt($ch, CURLOPT_POST, 0); // set GET method\n // curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n // Retrieve result\n $result = curl_exec($ch);\n // TODO return error if error\n // $cerror = curl_error($ch);\n\n return $result;\n}", "public function searchEvent(string $eventId, bool $reset = FALSE);" ]
[ "0.6132697", "0.6092422", "0.5712649", "0.566634", "0.56584215", "0.5634493", "0.56007993", "0.5557639", "0.5522946", "0.551089", "0.5505492", "0.5501669", "0.54963607", "0.5492992", "0.5457747", "0.54550695", "0.54383665", "0.5420487", "0.5419508", "0.5415758", "0.537435", "0.53615224", "0.53244567", "0.53201365", "0.53112763", "0.52773225", "0.5275597", "0.5269466", "0.5254369", "0.5248434", "0.5248404", "0.5246024", "0.5244724", "0.5236601", "0.5226448", "0.5218709", "0.52118564", "0.5179804", "0.51796496", "0.5173507", "0.51722276", "0.51535577", "0.51469845", "0.5141119", "0.5138485", "0.5134061", "0.5132876", "0.5129897", "0.5128892", "0.5122448", "0.5121334", "0.5119756", "0.51048094", "0.5102443", "0.50982076", "0.50869143", "0.5084689", "0.5076809", "0.5075588", "0.5073179", "0.50718814", "0.50715286", "0.5071519", "0.5068252", "0.5064144", "0.50620496", "0.50525415", "0.5048466", "0.50474316", "0.5046151", "0.504614", "0.50365525", "0.5031685", "0.5025454", "0.50208706", "0.5019106", "0.50169694", "0.50126326", "0.5009781", "0.5005218", "0.49893847", "0.4986123", "0.49856126", "0.49844387", "0.49842584", "0.49729308", "0.49721432", "0.4970811", "0.4970478", "0.49704036", "0.4960752", "0.49529204", "0.49527374", "0.49517527", "0.49497095", "0.49409226", "0.49404147", "0.49349198", "0.493077", "0.49276865" ]
0.6725314
0
Adds "apiKey" GET parameter with provided API key
public function handle($item) { if ($item instanceof RequestData && null !== $item->request) { $params = []; $uri = $item->request->getUri(); parse_str($uri->getQuery(), $params); $params['apiKey'] = $this->apiKey; $item->request = $item->request->withUri($uri->withQuery(http_build_query($params)), true); } return parent::handle($item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setApiKey($apiKey);", "public function setApiKey($apiKey);", "public function setApiKey($apiKey){\n $this->apiKey=$apiKey;\n }", "public function setApiKey($apiKey){\n\t\t$this->apiKey = $apiKey;\n\t}", "public function setApiKey($apiKey) {\n\t\t$this->apiKey = $apiKey;\n\t}", "public function setApiKey(string $apiKey): void\n {\n $this->apiKey = strval($apiKey);\n }", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n }", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n }", "private function setApiKey( $apiKey ) {\n\n $this->apiKey = $apiKey;\n }", "public function setAPIKey($key){\r\n\t\t$this->apiKey = $key;\r\n\t}", "public function setApiKey($apiKey)\n {\n $this->apiKey = trim($apiKey);\n }", "public function setApikey()\n {\n $this->apiKey = Config::get('leanpub.API_KEY');\n }", "public function getApiKey()\n {\n return $this->getParameter('apiKey');\n }", "public function getApiKey()\n {\n return $this->getParameter('apiKey');\n }", "public function setApiKey($api_key)\n {\n $this->api_key = $api_key;\n }", "public function setApiKey(string $apiKey): self\n {\n $this->options['apiKey'] = $apiKey;\n return $this;\n }", "public function setApiKey(string $apiKey): self\n {\n $this->options['apiKey'] = $apiKey;\n return $this;\n }", "function set_api_key($api_key)\n\t{\n\t\t$this->api_key = $api_key;\n\t}", "private function getApiKey()\n {\n return $this->apiKey;\n }", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "public static function setApiKey($key)\n {\n self::$apiKey = (string) $key;\n }", "public function setKey($apiKey)\n {\n $this->key = $apiKey;\n }", "function setApiKey($key){\n $this->key = $key;\n }", "public function setApiKey(string $api_key): void\n {\n $this->api_key = $api_key;\n }", "public function getApiKey();", "public function setApiKey($apiKey) {\r\n\t\t$this->apiKey = $apiKey;\r\n\t\treturn $this;\r\n\t}", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey() {\n\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->getParameter('appid');\n }", "public function setApiKey($value)\n {\n return $this->setParameter('apiKey', $value);\n }", "public function setApiKey($value)\n {\n return $this->setParameter('apiKey', $value);\n }", "protected function getApiKey()\n {\n return $this->_apiKey;\n }", "public function setApiKey(?string $apiKey) {\n $this->apiKey = $apiKey;\n return $this;\n }", "public function getApiKey(){\n\t\treturn $this->apiKey;\n\t}", "public function setApiKey($api)\n {\n $this->api_key = $api;\n }", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n return $this;\n }", "public function set_api_key($api_key)\n {\n $this->api_key = $api_key;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey()\n {\n return $this->apiKey;\n }", "public function getApiKey() {\n\t\treturn $this->apiKey;\n\t}", "public function getApiKey(): string\n {\n return $this->apiKey;\n }", "public function registerAPIKey()\n {\n acf_update_setting('google_api_key', $this->apiKey);\n }", "public function getApiKey() {\n return $this->apiKey;\n }", "function auth_apikey($key){\n\t\n}", "public function getApiKey(): string;", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n return $this;\n }", "public function setApiKey($apiKey)\n\t\t\t{\n\t\t\t\t$this->apiKey = $apiKey;\n\n\t\t\t\treturn $this;\n\t\t\t}", "public function getApiKey()\n {\n return $this->_apiKey;\n }", "public function __construct(string $apiKey)\n {\n $this->_apiKey = $apiKey;\n }", "function get_api_key()\n{\n return get_global_value('api-key');\n}", "private function setApikey($apikey) {\n\t\t$this->_apikey = (string) $apikey;\n\t}", "private function set_key($sApiKey) {\r\n $this->key = $sApiKey;\r\n }", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n\n return $this;\n }", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n\n return $this;\n }", "public function setApiKey($apiKey)\n {\n $this->apiKey = $apiKey;\n\n return $this;\n }", "public function getApiKey()\n {\n return $this->api_key;\n }", "private function getApikey() {\n\t\treturn $this->_apikey;\n\t}", "public function getApiKey()\n\t\t\t{\n\t\t\t\treturn $this->apiKey;\n\t\t\t}", "public static function setApiKey($key)\n {\n static::$key = $key;\n }", "private function getApiKey()\n\t{\n\t\treturn Mage::helper('core')->decrypt(Mage::getStoreConfig('whitePages_configuration/options/api_key'));\n\t}", "public function apiKey(): string;", "public function __construct($api_key)\n {\n $this->_apiKey = $api_key;\n }", "public function applyNewApiKey()\n {\n $this->attributes['api_key'] = KeyGenerator::generateRandomKey();\n }", "private function set_key($sApiKey) {\n $this->key = $sApiKey;\n }", "public function getApiKey () {\n syslog( LOG_INFO, 'Get an api key \\n' );\n\n $url = '/api_key';\n\n return $this->runRequest($url, 'GET', null);\n }", "function generate_rapi_endpoint($api_url, $api_key, $addition = \"\", $page_limit = false, $params = \"\") {\n $qparams['q'] = $params;\n if ($page_limit) {\n $qparams['page_limit'] = $page_limit;\n }\n $qparams['apikey'] = $api_key;\n $endpoint = $api_url . $addition . '?' . http_build_query($qparams);\n return $endpoint;\n}", "function placester_get_api_key() { return PL_Option_Helper::api_key(); }", "protected function getApiKey()\n {\n return $this->config['api_key'];\n }", "public function getApiKey()\n {\n return Mage::getStoreConfig('magebridge/settings/api_key');\n }", "public function setApiKey($strKey = '')\n {\n $this->strApiKey = $strKey;\n\n return $this;\n }", "public function getApiKey()\n {\n return $this->config['api_key'];\n }", "public function setKey($key) {\n\t\t\tif(!empty($key)) $this->apiKey = $key;\n\t\t}", "public function is_apikey($apikey){\n $this->apiKey = false;\n if(!empty($apikey) &&$apikey==AUTH_KEY){\n $this->apiKey = true;\n }\n }", "public function getApiKey()\n {\n return $this->getGeneralSetting('ApiKey');\n }", "function apiGet($key,$default=false) {return isset($_GET[$key]) ? $_GET[$key] : $default;}", "public function getApiKey(){\n if (empty($this->apiKey)){\n throw new InvalidArgumentException(\"Missing API KEY!\");\n }\n return $this->apiKey;\n }", "function api_key() {\n\tif(check_value(chevereto_config('api_key'))) return chevereto_config('api_key');\n}", "public function api_key(string $api_key = null)\n {\n if (null === $api_key) {\n return $this->api_key;\n }\n\n $this->api_key = $api_key;\n return $this;\n }", "public function setApiKey(string $apiKey): AuthorizationInterface;", "public function setAPIKey($api_key)\n\t{\n\t\t$this->api_key = $api_key;\n\t\treturn $this;\n\t}", "public static function configure($api_key)\n {\n parent::configureEndpoint(self::API_ENDPOINT, $api_key);\n }", "function generateUrl($api, $params = array(), $key = null){\n\t\t$url = $this->baseUri . $api . \"?\";\n\t\t$params += $this->_authenticateParams();\n\n\t\tif (isset($params['_key']) && $key === null) {\n\t\t\t$key = $params['_key'];\n\t\t\tunset($params['_key']);\n\t\t}\n\t\t$url .= $this->_generateQuery($params, $key);\n\t\treturn $url;\n\t}", "public function __construct($apiKey, $secretKey) {\n //$this->resource = \"charge\";\n $this->apiKey = $apiKey;\n $this->secretKey = $secretKey;\n $this->url = $this->version . \"/\" . $this->resource;\n }", "public function getApiKeySettings();", "public function __construct($apiKey, $secretKey) {\n //$this->resource = \"charge\";\n $this->apiKey = $apiKey;\n $this->secretKey = $secretKey;\n $this->url = $this->version . \"/\" . $this->resource;\n }", "public function getApiKey()\n {\n switch ($this->getApiMode()) {\n case Carrier::MODE_PRODUCTION:\n return $this->scopeConfig->getValue(self::XML_PATH_PRODUCTION_API_KEY, ScopeInterface::SCOPE_WEBSITES);\n default:\n return $this->scopeConfig->getValue(self::XML_PATH_TESTING_API_KEY, ScopeInterface::SCOPE_WEBSITES);\n\n }\n }", "public static function setRandomApiKey()\n {\n if (!empty(self::getSetting('API_KEY'))) {\n return;\n }\n\n $randomKey = bin2hex(openssl_random_pseudo_bytes(16));\n\n Registry::getConfig()->saveShopConfVar('str', 'AVSHOPGUARDIANS_API_KEY', $randomKey, null, 'module:AvShopguardians');\n }", "public function setApi_Key($api_key)\n\t{\n\t\t$this->api_key = $api_key;\n\n\t\treturn $this;\n\t}", "public function getApi_Key()\n\t{\n\t\treturn $this->api_key;\n\t}", "public function showApiKeyInput()\n\t{\n\t\t$id = 'revendless-api-key';\n\t\t$option = 'api_key';\n\n\t\t$value = (isset($this->options[$option]) && $this->options[$option]) ? ' value=\"'.esc_attr($this->options[$option]).'\"' : '';\n\n\t\tsettings_errors($id);\n\n\t\tprint '<input type=\"text\" name=\"'.self::OPTION_NAME.'['.$option.']\"'.$value.' id=\"'.$id.'\" maxlength=\"40\" size=\"45\" autocomplete=\"off\" pattern=\"[a-zA-Z0-9]+\" />';\n\t\tprint '<p class=\"description\">'.esc_html( __('An API Key associates your product integrations with your personal Revendless account.', 'revendless')).'</p>';\n\t}", "public function getAPIKey()\n\t{\n\t\treturn $this->api_key;\n\t}", "public function get_api_key() {\n\t\tif ( ! $this->is_api_key_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_api_key', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_API_KEY, 'ALGOLIA_API_KEY' );\n\n\t\treturn ALGOLIA_API_KEY;\n\t}", "public function getApiKey(): ?string;", "function key(){\n\t\t$api_key = '42b85431eba6a84d17266021e817d2a6';\n\t\treturn $api_key;\n\t}", "public function __construct($apiUrl, $apiKey)\n {\n $this->apiUrl = $apiUrl;\n $this->apiKey = $apiKey;\n }", "private function getApiKey()\n {\n if ($this->options['api-version'] == 0) {\n if (!empty($this->options['secret'])) {\n return $this->options['secret'];\n }\n } elseif ($this->options['api-version'] >= 1) {\n if (!empty($this->options['api-key'])) {\n return $this->options['api-key'];\n }\n }\n if (!empty(getenv('WPC_API_KEY'))) {\n return getenv('WPC_API_KEY');\n }\n return '';\n }", "public function updateApiKey($appName, $newKey);", "function apikeyAdd($username, $password) {\n $params = array();\n $params[\"username\"] = $username;\n $params[\"password\"] = $password;\n return $this->callServer(\"apikeyAdd\", $params);\n }", "public function getAppNameForApiKey($apiKey);" ]
[ "0.75884235", "0.75884235", "0.751295", "0.7372051", "0.72220236", "0.7218761", "0.7149062", "0.7149062", "0.71054476", "0.70330113", "0.69746786", "0.69625527", "0.69108564", "0.69108564", "0.68919456", "0.68868256", "0.68868256", "0.6875334", "0.6870129", "0.6805967", "0.67833465", "0.6777971", "0.677735", "0.67467", "0.6732989", "0.67297125", "0.6718661", "0.6710804", "0.6705041", "0.66896", "0.66896", "0.6688914", "0.66888607", "0.6674409", "0.6671163", "0.66691196", "0.6659024", "0.65700626", "0.65700626", "0.65700626", "0.65700626", "0.65602916", "0.65520227", "0.6535785", "0.65292007", "0.6517809", "0.65111506", "0.650903", "0.65020657", "0.6482119", "0.6453759", "0.64416516", "0.6397889", "0.638741", "0.6385913", "0.6385913", "0.6385913", "0.63706756", "0.6352532", "0.6348809", "0.63478273", "0.6340644", "0.6319576", "0.6296243", "0.6278566", "0.62678045", "0.62468934", "0.62441623", "0.6239364", "0.61880225", "0.61792547", "0.6148902", "0.61350214", "0.6128916", "0.6120858", "0.61043316", "0.61029565", "0.60699314", "0.6047211", "0.60310066", "0.5981076", "0.59657", "0.59322727", "0.5887763", "0.58849704", "0.58789617", "0.5874825", "0.5869392", "0.5852705", "0.58477277", "0.5842765", "0.58313215", "0.581835", "0.5817269", "0.58080596", "0.58014417", "0.5780473", "0.5774898", "0.57710296", "0.5768239", "0.5763549" ]
0.0
-1
/ This function copy the image from source and paste it to the given path Upload file from one place and copy to the local path given in $sPath
public function upload($sTempFileName,$sPath) { copy($sTempFileName,$sPath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upload_file($src, $dest){\t\n\t\tif(!empty($src)){\t\t\t\n\t\t\t// copy the file to the image path\t\t\t\n\t\t\tif(!copy($src, $dest)){\n\t\t\t\techo 'failed to copy the file';\n\t\t\t}else{\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t}", "public function copyImages();", "function copyAndCreateThumb( $sDestDir, $mImgSrc, $sImgOutput, $sOption = null ){\n\n // zapamietanie wielkosci dla miniaturek\n $iOldSize = $this->iThumbX;\n\n if( !is_dir( $sDestDir ) )\n return null;\n\n $sImgOutput = $this->throwNameOfFile( $sImgOutput );\n\n $sImgOutput = $this->changeFileName( $sImgOutput );\n\n if( $sOption == 'upload' ){\n if( is_uploaded_file( $mImgSrc['tmp_name'] ) && is_file( $mImgSrc['tmp_name'] ) && filesize( $mImgSrc['tmp_name'] ) > 0 && $this->checkCorrectFile( $mImgSrc['name'], 'jpg|jpeg|gif|png' ) == 1 ){\n $this->sExt = $this->throwExtOfFile( $mImgSrc['name'] );\n $aNewFiles['bFile'] = $this->uploadFile( $mImgSrc, $sDestDir, $sImgOutput.'.'.$this->sExt );\n }\n else\n return null;\n }\n elseif( $sOption == 'copy' ){\n if( is_file( $mImgSrc ) && filesize( $mImgSrc ) > 0 && $this->checkCorrectFile( $mImgSrc, 'jpg|jpeg|gif|png' ) == 1 ){\n $this->sExt = $this->throwExtOfFile( $mImgSrc );\n $aNewFiles['bFile'] = $this->checkIsFile( $sImgOutput.'.'.$this->sExt, $sDestDir, $this->sExt );\n if( !copy( $mImgSrc, $sDestDir.$aNewFiles['bFile'] ) )\n return null;\n }\n else\n return null;\n }\n $sImgPatch = $sDestDir.$aNewFiles['bFile'];\n\n $aNewFiles['bName'] = basename( $aNewFiles['bFile'], '.'.$this->sExt );\n $aNewFiles['sFile'] = $aNewFiles['bName'] . $this->iThumbAdd . '.' . $this->sExt;\n $aImgSize = $this->throwImgSize( $sImgPatch );\n\n if( defined( 'MAX_DIMENSION_OF_IMAGE' ) && ( $aImgSize['width'] > MAX_DIMENSION_OF_IMAGE || $aImgSize ['height'] > MAX_DIMENSION_OF_IMAGE ) ){\n if( $aImgSize['width'] < $this->iMaxForThumbSize && $aImgSize ['height'] < $this->iMaxForThumbSize ){\n $iOldAdd = $this->iThumbAdd;\n $this->setThumbSize( MAX_DIMENSION_OF_IMAGE );\n $this->setThumbAdd( '' );\n $aNewFiles['bFile'] = $this->createThumb( $sImgPatch, $sDestDir, $aNewFiles['bFile'] );\n $this->setThumbSize( $iOldSize );\n $this->setThumbAdd( $iOldAdd );\n }\n else\n return null;\n }\n \n if( $aImgSize['width'] >= $this->iThumbX || $aImgSize['height'] >= $this->iThumbX ){\n if( $aImgSize['width'] < $this->iMaxForThumbSize && $aImgSize ['height'] < $this->iMaxForThumbSize )\n $aNewFiles['sFile'] = $this->createThumb( $sImgPatch, $sDestDir );\n else\n return null;\n }\n else\n copy( $sImgPatch, $sDestDir.$aNewFiles['sFile'] );\n\n $aNewFiles['bWidth'] = $aImgSize['width'];\n $aNewFiles['bHeight'] = $aImgSize['height'];\n $aNewFiles['sWidth'] = $this->iThumbX;\n $aNewFiles['sHeight'] = $this->iThumbY;\n $aNewFiles['sName'] = basename( $aNewFiles['sFile'], '.'.$this->sExt );\n $aNewFiles['ext'] = $this->sExt;\n\n $this->iThumbY = 100;\n $this->setThumbSize( $iOldSize );\n\n return $aNewFiles;\n }", "function upload_destination_image() {\n if ($_FILES['destination_image']['size'] > 0) {\n $dir = '../images/destination_images';\n $filename1 = $_FILES['destination_image']['name'];\n $srcfile = $_FILES['destination_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "private function copyServerFile($src, $des){\n /* \n if(ftp_chdir($this->conn, $src)){\n $rawList = ftp_nlist($conn, \".\"); \n if (!in_array($destDir, $rawList)) \n { \n ftp_mkdir($conn, $destDir); \n //@ftp_chmod($conn, 0777, $image_dir); \n }\n }\n \n $files = ftp_nlist($this->ftp_conn, $path);\n foreach ($files as $file)\n {\n $this->delete($path.'/'.$file);\n }\n return $this->delete($path);\n\n $srcDir = $this->fieldarray['sourceItemId']; \n $destDir = $this->fieldarray['itemId']; \n $localDir = PUBLIC_PATH . 'photos/' . $this->fieldarray['imageType'] . '/original/' . $this->fieldarray['itemId']; \n \n if ($conn = ftp_connect(PHOTO_SERVER)) \n { \n if (ftp_login($conn, PHOTO_SERVER_USER, PHOTO_SERVER_PW)) \n { \n ftp_pasv($conn, true); \n if (ftp_chdir($conn, PHOTO_SERVER_UPLOAD_DIR)) \n { \n $rawList = ftp_nlist($conn, \".\"); \n if (!in_array($destDir, $rawList)) \n { \n ftp_mkdir($conn, $destDir); \n //@ftp_chmod($conn, 0777, $image_dir); \n } \n \n $files = ftp_nlist($conn, $srcDir); \n foreach ($files as $file) \n { \n if ($file != \".\" && $file != \"..\") \n { \n $srcFile = PHOTO_SERVER_FTP_GET_SRC_DIR . '/' . $srcDir . '/' . $file; \n $localFile = $localDir . '/' . $file; \n \n if (ftp_get($conn, $localFile, $srcFile, FTP_BINARY)) \n { \n $upload = ftp_put($conn, $destDir . \"/\" . $file, $localFile, FTP_BINARY); \n } \n } \n } \n } \n }\n }*/\n }", "public function copyFile($sourceFileName, $sourceFileExtension = 'file', $sourceIsImage = false, $sourcePath = null,\n\t\t\t\t\t\t\t $destFileName, $destFileExtension = 'file', $destIsImage = false, $destPath = null)\n\t{\n\t\t// If the newpath was not given\n\t\tif($destPath == null)\n\t\t{\n\t\t\t$destPath = $sourcePath;\n\t\t}\n\n\t\t// Create a correct path (where the file is at first)\n\t\t$sourceFilePath = FileComponent::createFilePath($sourcePath, $sourceFileName, $sourceFileExtension, $sourceIsImage);\n\n\t\t// Create a correct path (where the file should be placed)\n\t\t$destFilePath = FileComponent::createFilePath($destPath, $destFileName, $destFileExtension, $destIsImage);\n\n\t\t// Instanciate the file on the ftp\n\t\t$sourceFile = new File($sourceFilePath);\n\n\t\t// Copy the file to the new path on the ftp\n\t\t$sourceFile->copy($destFilePath);\n\t}", "function copyFile($oImage, $destination) {\n if (empty($oImage)) {\n $this->farrErrors[] = \"Image not set\";\n return false;\n }\n\n if (empty($destination)) {\n $this->farrErrors[] = \"Image destination path not set\";\n return false;\n }\n\n if ($destination[strlen($destination) - 1] != \"/\" &&\n $destination[strlen($destination) - 1] != \"\\\\\") {\n $destination .= \"/\";\n }\n\n $arrProperty = $oImage->getFileProperty();\n if (@copy($oImage->getFilePath().$oImage->getFileName(),\n $destination.$oImage->getFileName())) {\n\n $arrProperty['filePath'] =\n $destination.$oImage->getFileName();\n\n $oNewImage = new Image();\n\n $oNewImage->initializeByPropertyArray($arrProperty);\n\n return $oNewImage;\n } else {\n $this->farrErrors[] = \"Image copy error\";\n return false;\n }\n }", "function upload_banner() {\n $destPath = 'assets/img/uploads/progression';\n #Find and move our file\n $destFile = $_SERVER['DOCUMENT_ROOT'].\"/\".$destPath.\"/\".basename($_FILES['img']['name']);\n $tmpFile = $_FILES['img']['tmp_name'];\n if (move_uploaded_file($tmpFile, $destFile)){\n return $destPath.\"/\".basename($_FILES['img']['name']);\n } else {\n die(\"File Moving Failed.\");\n }\n }", "function move_upload_file($srcfile, $destfile) {\n\t//if(IN_SAE) return copy($srcfile, $destfile);\n\t//$r = move_uploaded_file($srcfile, $destfile);\n\t$r = copy($srcfile, $destfile);\n\treturn $r;\n}", "function UploadImageFile(&$SavePath,$FileObject,$FileType)\n{\n $Message='';\n\t$Upldate=time();\n\t$savefile = 1;\n\t\n if($FileObject->name=='')\n\t{ \n\t return;\n\t}\t\n\t\n\t $FileObject->name = str_replace(\" \",\"\",$FileObject->name);\n\t $pos=strpos($FileObject->name,\".\");\n\t $SavePath=substr($FileObject->name,0,$pos);\n\t \n\t \n\tif($FileType == 'image')\n\t{\n\t\t$maxsize = IMAGESIZE;\n\t\t$extension = IMAGEEXT;\n\t}\n\telse\n\t{\n\t\t$maxsize = FILESIZE;\n\t\t$extension = FILEEXT;\n }\t\n\t\n\t//================================ Check file size ===================\n\t if($FileObject->size>$maxsize)\n\t { \n\t\t\t $savefile = 0;\n\t\t\t $Message = MAXSIZEMESSAGE;\n\t\t}\n\t\telseif($FileObject->size <= 0)\n\t\t{\n\t\t\t$savefile = 0;\n\t\t\t$Message = MINSIZEMESSAGE;\n\t\t\t\n\t\t}\n\t//================================ Check file type ===================\n\t $fileext = explode(\"/\",$FileObject->type); // Fetch the file type\n\t $extension1 = explode(\",\",$extension); // Change the string into array\n\t $filename = $FileObject->name; // Fetch the filename of posted file\n\t $pos=strrpos($FileObject->name,\".\"); \n\t $ext = strtolower(substr($FileObject->name,$pos+1)); // Acheive only file extionsion\n\t\n\n //##########################################################################\n\t $key = array_search($ext,$extension1); // Search the received extionsion in array \n \n\t if($extension1[$key] != $ext)\n\t\t {\n\t\t\t$Message = EXTMESSAGE.$extension.\" files.\";\n\t $savefile = 0;\n\t\t } \n \t\t\n\t//================================ copy file all validations are true ===================\n\t\tif($savefile == 1)\n\t\t{\n\t\t $SavePath.= time().\".\".$ext;\n\t\t $copypath = FILEPATH.$SavePath;\n\t\t \n\t\t\n\t\t\tif(is_uploaded_file($FileObject->tmp_name))\n\t\t \t{\n\t\t \t\tinclude_once(ROOT.'/lib/image.class.php');\n\t\t\t\t$img = new thumb_image;\n\t\t\t\t$img->GenerateThumbFile($FileObject->tmp_name, $copypath);\n\t\t \t\t\n\t\t\t\tif(!file_exists($copypath))\n\t\t\t\t{\n\t\t\t\t\t$Message=FAILEDCOPYMESSAGE;\n\t\t\t\t\t$SavePath = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Message=\"File not uploaded.\";\n\t\t\t\t$SavePath = '';\n\t\t\t}\n\t\t}\n\t\t\n\treturn $Message;\n}", "function copyAndResize($imgReal_full_path, $imgTarget_name, $imgTarget_dir, $resize = array())\r\n {\r\n $ext = $this->getExtension($imgReal_full_path);\r\n $source_img = $imgReal_full_path;\r\n #$target_img = $imgTarget_dir . $imgTarget_name . $ext;\r\n $target_img = $imgTarget_dir . '/' . $imgTarget_name .'.'. $ext;\r\n \r\n //create dir\r\n $this->createDir($imgTarget_dir.'/');\r\n \r\n //copy real image\r\n copy($source_img, $target_img) or die('Failed to copy :'.$source_img.'--to--'.$target_img);\r\n //copy resized image\r\n $ret_dirresize = $ret_urlresize = array();\r\n foreach($resize as $key=>$size)\r\n {\r\n $crop = strpos($key, \":\") ? $key : '';\r\n $ret_dirresize[$size] = $this->resize_image($target_img, $crop, $size, false);\r\n //$ret_urlresize[$size] = str_replace(MEDIA_DIR, \"http://klimg.com/merdeka.com/cms/\", $ret_dirresize[$size]);\r\n }\r\n\t\t\t\r\n\t\t\t#harus di unremark ulang\r\n //$sourcefile = array_merge($ret_dirresize, array($target_img));\r\n //$this->send_to_server($sourcefile);\r\n \r\n $return = array(\r\n #'nama' => $target_imgName, \r\n 'nama' => $imgTarget_name .'.'. $ext,\r\n 'type' => $ext, \r\n #'path' => $target_dir, \r\n 'path' => $imgTarget_dir.'/',\r\n 'url_resize'=> $ret_urlresize,\r\n 'dir_resize'=> $ret_dirresize,\r\n //'sourcefile'=> $sourcefile,\r\n\t\t\t\t'sourcefile'=> '',\r\n 'source_img'=> $source_img,\r\n 'target_img'=> $target_img\r\n );\r\n \r\n return $return;\r\n }", "private function copyImages()\n {\n $media = [\n 'slider-woman-on-the-beach.jpg'\n ];\n\n $this->mediaMigration->copyMediaFiles($media, self::MIGRATION_MODULE, 'scandiweb/slider/s/l');\n }", "public static function copy(string $srcImgPath, string $dstDirpath, string $dstImgName = null): string {\r\n FileHelper::makeDirectory($dstDirpath);\r\n $dstImgName = empty($dstImgName) \r\n ? basename($srcImgPath) : \r\n $dstImgName . '.' . pathinfo($srcImgPath, PATHINFO_EXTENSION);\r\n file_put_contents(rtrim($dstDirpath, '/') . '/' . $dstImgName, file_get_contents($srcImgPath), LOCK_EX);\r\n return $dstImgName;\r\n }", "public function save()\n {\n $dir = $this->pathTmpImage;\n\n $files = scandir($dir);\n\n foreach ($files as $file) {\n if ($file == $_POST['image']) { \n copy($this->pathTmpImage . $file, $this->pathResult . $file);\n }\n }\n\n //$this->dbInsert($_POST['image']);\n\n unlink($this->pathTmpImage . $_POST['image']);\n }", "public static function UploadFile($folder,$filename){\n// CATALOGUE\n$uploaddir = './ImagesAll/imagesBlackScale/'; //$uploaddir = './imagesBlackScale/';\n$uploadfile = $uploaddir.basename($_FILES['fileme']['name']);\n$url=\"http://example2.esy.es\";\n$imageLoaded=$uploadfile ; // to form['GET'] URL LINK\n\n\n// Copy a file from temporary catalogue for files saving :\nif (copy($_FILES['fileme']['tmp_name'], $uploadfile))\n{\n\n\n\n// ADD picture to DB----------------------------------\n// Path to image\n$pathMe= $uploaddir.\"/\".$_FILES['fileme']['name']; // it is dublicated??\n\n //$sthI = $db->prepare(\"INSERT INTO mvcGallery (mvcGal_user, mvcGal_image) VALUES (:user, :image)\");\n //$sthI->bindValue(':user' , $_SESSION['login']);\n //$sthI->bindValue(':image', $pathMe);\n // $sthI->execute(); \n\n// END ADD PICTURE TO DB-----------------------------\n\n\n\n\n\n\necho \"<h1 style='color:red;font-size:44px;margin: 0 auto;'>UPLOADED SUCCESSFULLY</h1>\";\necho \"<img src=$uploadfile />\";\n\necho \"</br><input type=button value='Back'\nonclick='history.back()'>\";\nheader(\"Location: http://example2.esy.es/mvc/?gdlibrary&loadImage=$imageLoaded&condition=on\"); \n\n\n\n}\nelse { echo \"<h3>ERROR</h3>\"; exit; }\n\n }", "public function resizeAndCopyImage($sourceFileName, $sourceFileExtension, $sourcePath = null, $destWidth, $destHeight, $destFileName = null, $destFileExtension = null, $destPath = null)\n\t{\n\t\t// If the destination file name is not set\n\t\tif($destFileName == null)\n\t\t{\n\t\t\t$destFileName = $sourceFileName;\n\t\t}\n\n\t\t// If the fileextension is not set\n\t\tif($destFileExtension == null)\n\t\t{\n\t\t\t$destFileExtension = $sourceFileExtension;\n\t\t}\n\n\t\t// If a custom path is not given to the destination\n\t\tif($destPath == null)\n\t\t{\n\t\t\t$destPath = $sourcePath;\n\t\t}\n\t\t\n\t\t// Generate the paths for the images\n\t\t$sourcePath = FileComponent::createFilePath($sourcePath, $sourceFileName, $sourceFileExtension, true);\n\t\t$destPath = FileComponent::createFilePath($destPath, $destFileName, $destFileExtension, true);\n\n\t $sourceFile = new File($sourcePath);\n\t $sourceFileInformation = $sourceFile->info();\n\n\t // Check if everything has one of the allowed file extension\n\t\t$allowedExtensions = array(\"gif\", \"jpeg\", \"png\");\n\t\tif(!in_array($sourceFileExtension, $allowedExtensions) ||\n\t\t !in_array($destFileExtension, $allowedExtensions) ||\n\t\t !in_array($sourceFileInformation['extension'], $allowedExtensions))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Fetch data about the image\n\t list($sourceWidth, $sourceHeight, $sourceImageType) = getimagesize($sourcePath);\n\n\t // Create an image in the cache according to the type\n\t switch ($sourceImageType) \n\t {\n\t case IMAGETYPE_GIF:\n\t $destGDImage = imagecreatefromgif($sourcePath);\n\t break;\n\t case IMAGETYPE_JPEG:\n\t $destGDImage = imagecreatefromjpeg($sourcePath);\n\t break;\n\t case IMAGETYPE_PNG:\n\t $destGDImage = imagecreatefrompng($sourcePath);\n\t break;\n\t }\n\t if ($destGDImage === false) \n\t {\n\t return false;\n\t }\n\t // Calcluates the aspects of the old and the new image\n\t $sourceAspectRatio = $sourceWidth / $sourceHeight;\n\t $destAspecRatio = $destWidth / $destHeight;\n\n\t // If the source image is smaller than the requested one\n\t if ($sourceWidth <= $destWidth && $sourceHeight <= $destHeight)\n\t {\n\t $newWidth = $sourceWidth;\n\t $newHeight = $sourceHeight;\n\t } \n\t // If the request image is wider than the source\n\t elseif ($destAspecRatio > $sourceAspectRatio) \n\t {\n\t $newWidth = (int) ($destHeight * $sourceAspectRatio);\n\t $newHeight = $destHeight;\n\t } \n\t // If the request image is taller than the source\n\t else \n\t {\n\t $newWidth = $destWidth;\n\t $newHeight = (int) ($destWidth / $sourceAspectRatio);\n\t }\n\n\t // Generate an image width the calculated width and height\n\t $newGDImage = imagecreatetruecolor($newWidth, $newHeight);\n\n\t // Resize (resample) the image\n\t imagecopyresampled($newGDImage, $destGDImage, 0, 0, 0, 0, $newWidth, $newHeight, $sourceWidth, $sourceHeight);\n\t \n\t // Check what output that is wanted\n\t switch ($sourceImageType) \n\t {\n\t case IMAGETYPE_GIF:\n\t imagegif($newGDImage, $destPath);\n\t break;\n\t case IMAGETYPE_JPEG:\n\t imagejpeg($newGDImage, $destPath, 75);\n\t break;\n\t case IMAGETYPE_PNG:\n\t imagepng($newGDImage, $destPath, 9);\n\t break;\n\t }\n\n\t // Destroy the images in the cache\n\t imagedestroy($destGDImage);\n\t imagedestroy($newGDImage);\n\n\t return true;\n\t}", "function _copy_image_file($attachment_id)\n {\n }", "function copy_image_resize_to_folder($source_file, $destination_folder, $filename, $max_width, $max_height)\n{\n $image_info = getimagesize($source_file);\n $source_pic_width = $image_info[0];\n $source_pic_height = $image_info[1];\n\n $x_ratio = $max_width / $source_pic_width;\n $y_ratio = $max_height / $source_pic_height;\n\n if (($source_pic_width <= $max_width) && ($source_pic_height <= $max_height)) {\n $tn_width = $source_pic_width;\n $tn_height = $source_pic_height;\n } elseif (($x_ratio * $source_pic_height) < $max_height) {\n $tn_height = ceil($x_ratio * $source_pic_height);\n $tn_width = $max_width;\n } else {\n $tn_width = ceil($y_ratio * $source_pic_width);\n $tn_height = $max_height;\n }\n \n if (!is_dir($destination_folder)) {\n mkdir($destination_folder, 0755);\n }\n\n switch ($image_info['mime']) {\n case 'image/gif':\n if (imagetypes() & IMG_GIF) {\n $src = imageCreateFromGIF($source_file);\n $destination_folder.=\"$filename.gif\";\n $namafile = \"$filename.gif\";\n }\n break;\n\n case 'image/jpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_file);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/pjpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_file);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/png':\n if (imagetypes() & IMG_PNG) {\n $src = imageCreateFromPNG($source_file);\n $destination_folder.=\"$filename.png\";\n $namafile = \"$filename.png\";\n }\n break;\n\n case 'image/wbmp':\n if (imagetypes() & IMG_WBMP) {\n $src = imageCreateFromWBMP($source_file);\n $destination_folder.=\"$filename.bmp\";\n $namafile = \"$filename.bmp\";\n }\n break;\n }\n \n $tmp = imagecreatetruecolor($tn_width, $tn_height);\n imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tn_width, $tn_height, $source_pic_width, $source_pic_height);\n\n //**** 100 is the quality settings, values range from 0-100.\n switch ($image_info['mime']) {\n case 'image/jpeg':\n imagejpeg($tmp, $destination_folder, 100);\n break;\n\n case 'image/gif':\n imagegif($tmp, $destination_folder, 100);\n break;\n\n case 'image/png':\n imagepng($tmp, $destination_folder);\n break;\n\n default:\n imagejpeg($tmp, $destination_folder, 100);\n break;\n }\n\n return ($namafile);\n}", "public function copy_image($image_id=null, $foreign_key=null) {\n\t // test function\n\t $this->Image->image_clone($image_id, $foreign_key);\n\t exit;\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "function copyImage($srcFile, $destFile, $w, $h, $quality = 75) {\n $tmpSrc = pathinfo(strtolower($srcFile));\n $tmpDest = pathinfo(strtolower($destFile));\n $size = getimagesize($srcFile);\n if ($tmpDest['extension'] == \"gif\" || $tmpDest['extension'] == \"jpg\" || $tmpDest['extension'] == \"jpeg\") {\n $destFile = substr_replace($destFile, 'jpg', -3);\n $dest = imagecreatetruecolor($w, $h);\n imageantialias($dest, TRUE);\n } elseif ($tmpDest['extension'] == \"png\") {\n $dest = imagecreatetruecolor($w, $h);\n // Make the background transparent\n imagealphablending($dest, false);\n imagesavealpha($dest, true);\n $transparentindex = imagecolorallocatealpha($dest, 255, 255, 255, 127);\n imagefill($dest, 0, 0, $transparentindex);\n //imageantialias($dest, TRUE);\n } else {\n return false;\n }\n switch ($size[2]) {\n //GIF\n case 1: $src = imagecreatefromgif($srcFile);\n break;\n //JPEG\n case 2: $src = imagecreatefromjpeg($srcFile);\n break;\n //PNG\n case 3: $src = imagecreatefrompng($srcFile);\n break;\n default: return false;\n break;\n }\n imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $h, $size[0], $size[1]);\n switch ($size[2]) {\n case 1:\n case 2: imagejpeg($dest, $destFile, $quality);\n break;\n case 3: imagepng($dest, $destFile);\n }return $destFile;\n}", "function copy(&$tmp, $applied_image, $x, $y) {\r\r\n\r\r\n\t\t// open\r\r\n\t\t//\r\r\n\t\t$ci = new Asido_Image;\r\r\n\t\tif (!@$ci->source($applied_image)) {\r\r\n\t\t\ttrigger_error(\r\r\n\t\t\t\tsprintf(\r\r\n\t\t\t\t\t'The image that is going to '\r\r\n\t\t\t\t\t\t. ' be copied \"%s\" is '\r\r\n\t\t\t\t\t\t. ' either missing or '\r\r\n\t\t\t\t\t\t. ' is not readable',\r\r\n\t\t\t\t\t$applied_image\r\r\n\t\t\t\t\t),\r\r\n\t\t\t\tE_USER_WARNING\r\r\n\t\t\t\t);\r\r\n\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t$ct = $this->prepare($ci);\r\r\n\r\r\n\t\tif (!$this->__copy($tmp, $ct, $x, $y)) {\r\r\n\t\t\ttrigger_error(\r\r\n\t\t\t\t'Failed to copy the image',\r\r\n\t\t\t\tE_USER_WARNING\r\r\n\t\t\t\t);\r\r\n\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t$this->__destroy_source($ct);\r\r\n\t\t$this->__destroy_target($ct);\r\r\n\r\r\n\t\treturn true;\r\r\n\t\t}", "public function originalImage($override = true) {\n // check remote url is set\n $remote_url = $this->remote_url;\n if (empty($remote_url))\n throw new Exception ('Please set Remote Url first');\n \n // get file name\n $file_name = end(explode('/', $remote_url));\n \n // if we do not allow override, skip it\n if (!$override && is_file($this->original_img_dir.$file_name)) {\n //$this->log('Skip to copy original image '.$remote_url);\n return;\n } \n \n // proxy for external url \n $proxy = 'tcp://infpapxvip.it.unsw.edu.au:8080'; \n $aContext = array(\n 'http' => array(\n \t'proxy' => $proxy,\n \t'request_fulluri' => True,\n \t),\n ); \n $context = stream_context_create($aContext); \n \n // copy from remote\n if ($content = file_get_contents($remote_url, false, $context)) {\n if (file_put_contents($this->original_img_dir.$file_name, $content)) {\n //$this->log('Succeed to copy original image '.$remote_url);\n } else {\n throw new Exception ('Fail to copy remote image, '.$remote_url.' to '.$this->original_img_dir);\n }\n }\n else\n throw new Exception ('Can not get file from remote address: '.$remote_url);\n }", "function CopyImage($oldImage, $newImage)\n {\n try\n {\n $copied = @copy($oldImage, $this->m_RootFolder.$newImage);\t//Copy image frm orginal path to new path\n if (!$copied)\n {\t//not copied\n return false;\n }\n else\n {\n return true;\n }//end of if (!$copied)\n }\n catch (Exception $ex)\n {\n return false;\n }\n }", "protected function copyImagesDirectory()\n\t{\n\t\t$params = $this->getParams();\n\n\t\tif ($params->path != '') {\n\t\t\t$date = JFactory::getDate()->toFormat('%Y%m%d');\n\n\t\t\t$src = JPATH_SITE.DS.'images';\n\t\t\t$dest = JPATH_SITE.DS.'images-backup-'.$date;\n\t\t\tJFolder::move($src, $dest);\n\n\t\t\t$src = $params->path.DS.'images';\n\t\t\t$dest = JPATH_SITE.DS.'images';\n\t\t\tJFolder::copy($src, $dest);\n\t\t}\n\t}", "function tc_file_system_copy($source, $destination, $overwrite = false, $mode = false){\r\n\t\r\n\t//initialize processed files object\r\n\t$processed_files = WPTC_Factory::get('processed-restoredfiles',true);\r\n\t$current_processed_files = array();\r\n\t\r\n\tglobal $wp_filesystem;\r\n\tif($wp_filesystem->method == 'direct'){\r\n\t\t// check if already processed ; if so dont copy\r\n\t\t$processed_file = $processed_files->get_file($source);\r\n\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----processed_file obj------- \".var_export($processed_file,true).\"\\n\",FILE_APPEND);\r\n\t\tif ( !($processed_file) ) {\r\n\t\t\t$copy_result = $wp_filesystem->move($source, $destination, $overwrite, $mode);\r\n\t\t\tif($copy_result)\r\n\t\t\t{\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ----adding details--------\\n\",FILE_APPEND);\r\n\t\t\t\t//if copied then add the details to DB\r\n\t\t\t\t$this_file_detail['file'] = $source;\r\n\t\t\t\t$this_file_detail['copy_status'] = true;\r\n\t\t\t\t$this_file_detail['revision_number'] = null;\r\n\t\t\t\t$this_file_detail['revision_id'] = null;\r\n\t\t\t\t$this_file_detail['mtime_during_upload'] = null;\r\n\t\t\t\t\r\n\t\t\t\t$current_processed_files[] = $this_file_detail;\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----current_processed_files------- \".var_export($current_processed_files,true).\"\\n\",FILE_APPEND);\r\n\t\t\t\t$processed_files->add_files($current_processed_files);\t\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ---any sql error------ \".var_export(mysql_error(),true).\"\\n\",FILE_APPEND);\r\n\t\t\t\t//set the in_progress option to false on final file copy\r\n\t\t\t}\r\n\t\t\treturn $copy_result;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\telseif($wp_filesystem->method == 'ftpext' || $wp_filesystem->method == 'ftpsockets'){\r\n\t\tif ( ! $overwrite && $wp_filesystem->exists($destination) )\r\n\t\t\treturn false;\r\n\t\t//$content = $this->get_contents($source);\r\n//\t\tif ( false === $content)\r\n//\t\t\treturn false;\r\n\t\t\t\r\n\t\t//put content\t\r\n\t\t//$tempfile = wp_tempnam($file);\r\n\t\t$source_handle = fopen($source, 'r');\r\n\t\tif ( ! $source_handle )\r\n\t\t\treturn false;\r\n\r\n\t\t//fwrite($temp, $contents);\r\n\t\t//fseek($temp, 0); //Skip back to the start of the file being written to\r\n\t\t\r\n\t\t$sample_content = fread($source_handle, (1024 * 1024 * 2));//1024 * 1024 * 2 => 2MB\r\n\t\tfseek($source_handle, 0); //Skip back to the start of the file being written to\r\n\r\n\t\t$type = $wp_filesystem->is_binary($sample_content) ? FTP_BINARY : FTP_ASCII;\r\n\t\tunset($sample_content);\r\n\t\tif($wp_filesystem->method == 'ftpext'){\r\n\t\t\t$ret = @ftp_fput($wp_filesystem->link, $destination, $source_handle, $type);\r\n\t\t}\r\n\t\telseif($wp_filesystem->method == 'ftpsockets'){\r\n\t\t\t$wp_filesystem->ftp->SetType($type);\r\n\t\t\t$ret = $wp_filesystem->ftp->fput($destination, $source_handle);\r\n\t\t}\r\n\r\n\t\tfclose($source_handle);\r\n\t\tunlink($source);//to immediately save system space\r\n\t\t//unlink($tempfile);\r\n\r\n\t\t$wp_filesystem->chmod($destination, $mode);\r\n\r\n\t\treturn $ret;\r\n\t\t\r\n\t\t//return $this->put_contents($destination, $content, $mode);\r\n\t}\r\n}", "function uploadFile($name)\n{\n // Gets the paths, full and local directory\n global $image_dir, $image_dir_path;\n if (isset($_FILES[$name])) {\n // Gets the actual file name\n $filename = $_FILES[$name]['name'];\n if (empty($filename)) {\n return;\n }\n // Get the file from the temp folder on the server\n $source = $_FILES[$name]['tmp_name'];\n // Sets the new path - images folder in this directory\n $target = $image_dir_path . '/' . $filename;\n // Moves the file to the target folder\n move_uploaded_file($source, $target);\n // Send file for further processing\n processImage($image_dir_path, $filename);\n // Sets the path for the image for Database storage\n $filepath = $image_dir . '/' . $filename;\n // Returns the path where the file is stored\n return $filepath;\n }\n}", "public function copy($path, $target)\n {\n \n }", "public static function copyFile($src, $dst) {\n\t\t$Src = new File($src);\n\t\tApp::uses('File', 'Utility');\n\n\t\t$success = $Src->copy($dst, true);\n\t\tif (!$success) {\n\t\t\tEasyLog::error($Src->errors());\n\t\t}\n\t\tself::dispatchAfterUpload($dst);\n\t\treturn $success;\n\t}", "public function copy($path, $newpath)\n {\n }", "public function cp($sSrcPath, $sDstPath, $blCleanDst = true) {\n $sSrcPath = $this->getFullPath($sSrcPath);\n $sDstPath = $this->getFullPath($sDstPath);\n // check\n if (!$this->isReadable($sSrcPath, true)) {\n throw MLException::factory('update', 'Path `{#path#}` is not readable.', 1423819826)->setData(array('path' => $sSrcPath));\n }\n if (!$this->isWritable($sDstPath)) {\n throw MLException::factory('update', 'Path `{#path#}` is not writable.', 1407759765)->setData(array('path' => $sDstPath));\n }\n // clean destination path\n if ($blCleanDst) {\n try {\n $this->rm($sDstPath);\n } catch (Exception $oEx) {\n if (is_dir($sDstPath)) {\n throw $oEx;\n }\n }\n }\n try {\n // create destination folder\n $this->write(is_dir($sSrcPath) ? $sDstPath : dirname($sDstPath));\n } catch (Exception $oEx) {\n \n }\n // excecute\n if (is_dir($sSrcPath)) {\n $blResult = true;// otherwise throws exception\n foreach($this->readDir($sSrcPath, array()) as $sPath) {\n $sSubPath = basename($sPath);\n $this->cp($sSrcPath.'/'.$sSubPath, $sDstPath.'/'.$sSubPath);\n }\n } else {\n $blResult = @copy($sSrcPath, $sDstPath);\n }\n $this->clearStatCache($sDstPath);\n // check\n if (!file_exists($sDstPath) || !$blResult) {\n throw MLException::factory(\n 'update', \n 'Can\\t copy `{#srcPath#}` to `{#dstPath#}`.', \n 1407761504\n )->setData(array(\n 'srcPath' => $sSrcPath, \n 'dstPath' => $sDstPath,\n ));\n } else {\n return $this;\n }\n }", "function uploadFile($name) {\r\n // Gets the paths, full and local directory\r\n global $image_dir, $image_dir_path;\r\n if (isset($_FILES[$name])) {\r\n // Gets the actual file name\r\n $filename = $_FILES[$name]['name'];\r\n if (empty($filename)) {\r\n return;\r\n }\r\n // Get the file from the temp folder on the server\r\n $source = $_FILES[$name]['tmp_name'];\r\n // Sets the new path - images folder in this directory\r\n $target = $image_dir_path . '/' . $filename;\r\n // Moves the file to the target folder\r\n move_uploaded_file($source, $target);\r\n // Send file for further processing\r\n processImage($image_dir_path, $filename);\r\n // Sets the path for the image for Database storage\r\n $filepath = $image_dir . '/' . $filename;\r\n // Returns the path where the file is stored\r\n return $filepath;\r\n }\r\n }", "function DNUI_copy($source, $dest) {\r\n if (file_exists($source)) {\r\n return copy($source, $dest);\r\n }else{\r\n return false;\r\n }\r\n}", "public function setImage() {\n\t\t$target_dir = UPROOT;\n\t\t$target_name = basename($_FILES['image']['name']);\n\t\t$tmp_name = $_FILES['image']['tmp_name'];\n\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\t\t//just in case file already exist ill append time and date\n\t\t$timeStamp = date(\"Y-m-d_H:i:s\");\n\t\t//checking if file with the same name already exists\n\t\t$append = $this->clean($timeStamp);\n\t\tif (file_exists($target_file)) {\n\t\t\t//renaming the new file by exploding it\n\t\t\t$fileName = explode('.', $target_name);\n\t\t\t$target_name = $fileName[0] . '.' . $append . '.' . $fileName[1];\n\t\t\t//reassign the folder path\n\t\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\n\t\t}\n\t\t$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));\n\t\t$check = getimagesize($tmp_name);\n\t\t$size = $_FILES[\"image\"][\"size\"];\n\t\t$img = [\n\t\t\t'name' => $target_name,\n\t\t\t'fileType' => $imageFileType,\n\t\t\t'tmp_name' => $tmp_name,\n\t\t\t'target_file' => $target_file,\n\t\t\t'check' => $check,\n\t\t\t'size' => $size,\n\t\t];\n\t\treturn $img;\n\t}", "function upload_travel_image() {\n if ($_FILES['travel_image']['size'] > 0) {\n $dir = '../images/travel_images';\n $filename1 = $_FILES['travel_image']['name'];\n $srcfile = $_FILES['travel_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "function upload_trip_image() {\n if ($_FILES['trip_image']['size'] > 0) {\n $dir = '../images/trip_images';\n $filename1 = $_FILES['trip_image']['name'];\n $srcfile = $_FILES['trip_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "private function copyToStorage(Image $image) {\n \t$attrs = $image->attributesToArray();\n\t $this->command->info(\"Copying '{$attrs['path']}' to public folder\");\n \t$filePath = dirname(__FILE__).\"/Images/{$attrs['path']}\";\n \tStorage::put(\"public/images/{$attrs['id']}/{$attrs['path']}\", file_get_contents($filePath));\n }", "abstract public function copyLocalFile($from, $to);", "function tep_copy_uploaded_file($filename, $target) {\n if (substr($target, -1) != '/') $target .= '/';\n\n $target .= $filename['name'];\n //if (!file_exists($target)) {\n //@mkdir($target);\n //@chmod($target, 0777);\n //}\n move_uploaded_file($filename['tmp_name'], $target);\n chmod($target, 0666);\n}", "function UploadPhoto($image,$imageName,$path, $tmpName)\n {\n $errors=0;\n if ($image)\n {\n $extension = $this->getExtension($image);\n $extension = @strtolower($extension);\n if (($extension != \"jpg\") && ($extension != \"jpeg\") && ($extension != \"png\") && ($extension != \"gif\") && ($extension != \"pdf\"))\n $errors=1;\n\n if($errors !=1)\n {\n $size\t\t=\t@filesize($tmpName);\n\n $image_name\t=\t$imageName;\n $newname\t=\t$path.$image_name;\n $copied \t= \t@copy($tmpName, $newname);\n if (!$copied)\n {\n $errors=1;\n }\n else\n {\n return $image_name;\n }\n }\n }\n }", "public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}", "public function load($path)\n {\n // copy file and get thumb\n \\Acelle\\Library\\Tool::xcopy($path, $this->getUploadDir());\n $this->image = $this->getUploadDir().'/thumb.png';\n $this->replaceHtmlUrl('/'.$this->getUploadUri().'/');\n $this->untransform();\n $this->save();\n }", "public function doUploadBySize($width = 170, $height = 170, $isDelSrcImg = true, $isCopyImg = false)\n {\n $result = false;\n try {\n $field = $this->_config['field'];\n $imagefile = $_FILES[$field]['tmp_name'];\n $truename = $_FILES[$field]['name'];\n\n require_once 'MyLib/Image/Validate.php';\n $validate = new MyLib_Image_Validate();\n\n if (!$validate->isValid($imagefile, $truename)) {\n return false;\n }\n\n //$path = $this->_getPath();\n //if (!empty($this->_path)) {\n // return $this->_path;\n //}\n\n $id = $this->_config['id'];\n $dir0 = $id % 10000;\n $dir1 = $dir0 % 100;\n $dir2 = $dir0 - $dir1 * 100;\n if ($dir2 < 0) {\n $dir2 = 0;\n }\n\n $path = 'apps/';\n switch ($this->_config['section']) {\n\n case 1 :\n $path .= 'scripteditor/' . $dir2 . '/' . $dir1 . '/';\n break;\n case 2 :\n\t $path .= 'slave/' . $dir2 . '/' . $dir1 . '/';\n\t break;\n default :\n $path .= 'tmp/';\n break;\n }\n $this->_path = $path;\n\n $result = $this->_upload->upfileBySize($this->_config['field'],\n array('baseFolder' => $this->_config['basefolder'], 'path' => $path, 'id' => $this->_config['id'],\n 'width' => $width, 'height' => $height, 'imageName' => $imageName, 'isDelSrcImg' => $isDelSrcImg,\n 'isCopyImg' => $isCopyImg));\n }\n catch (Exception $e) {\n\n }\n return $result;\n }", "public function copyPath($filePath, $newPath);", "function duplicateFile( $src, $dst, $replaceFileTarget=false , &$result)\n\t{\n\t if( strpos( $dst, $src ) === 0 ){\n\t \t// if the copy is not into the same folder\n\t \tif($src != $dst )\n\t \t{\n\t\t \t$result['state'] = 'ERROR';\n\t\t \t$result['message'] = 'Non puoi copiare una cartella dentro se stessa o una cartella figlia!';\n\t\t \treturn;\n\t \t}\n\t } \n\t \n\t if ( file_exists($dst) )\n\t {\n\t \t// if we want replace the target\n\t \tif($replaceFileTarget)\n\t \t{\n\t \t\tif($src == $dst ) return; // cna't replace self\n\t \t\t$this->removeFile($dst); // remove file or folder\n\t \t}\n\t \telse\n\t \t{\n\t \t\t// if the copy is made into the same folder\n\t \t\tif($src == $dst )\n\t \t\t{\n\t \t\t\t$path_parts = pathinfo($dst);\n\t \t\t\t$fileExtension = '';\n\t \t\t\tif( isset( $path_parts['extension'] )) $fileExtension = '.'.$path_parts['extension'];\n\t\t\t\t \n\t \t\t\t// append 'copy' at the end of the filename\n\t \t\t\tif( is_file($dst) )\n\t \t\t\t{\n\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy'.$fileExtension;\n\t\t\t\t\t$num = 1;\n\t\t\t\t\twhile( file_exists( $dst ) ) { \t\t\t\n\t\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy '.$num.$fileExtension;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\telse if( is_dir($dst) )\n\t \t\t\t{\n\t \t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy';\n\t\t\t\t\t$num = 1;\n\t\t\t\t\twhile( file_exists( $dst ) ) { \t\t\t\n\t\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy '.$num;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t// add the paths to the list of existents files ( to send to the client for replacing request )\n\t \t\t\t$result['state'] = 'EXISTENT_FILES';\n\t\t\t \t$fileToReplace = array();\n\t\t\t \t$fileToReplace['sourcePath'] = $src;\n\t\t\t \t$fileToReplace['targetPath'] = $dst;\n\t\t\t \tarray_push( $result['existentFiles'] , $fileToReplace );\n\t\t\t \treturn;\n\t \t\t}\n\n\t \t}\n\t } \n\t \n\t if (file_exists($src))\n\t {\n\t\t if (is_dir($src))\n\t\t {\n\t\t if( ! mkdir($dst)) exit;\n\t\t $files = scandir($src);\n\t\t foreach ($files as $file)\n\t\t {\n\t\t \tif ($file != \".\" && $file != \"..\") $this->duplicateFile(\"$src/$file\", \"$dst/$file\", $replaceFileTarget , $result);\n\t\t }\n\t\t \n\t\t }\n\t\t else if (is_file($src))\n\t\t {\n\t\t \tif( ! copy($src, $dst) ) exit;\n\t\t }\n\t } \n\t \n\n}", "public function move_photo(){\n move_uploaded_file($this->tmp_path, '/home/a1031316/public_html/uploaded_images/'.$this->name);\n\n }", "function import_external_image($url){\n\n global $id;\n\n // get current source ( server ) path\n $L = preg_split( \"/\\//\", \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\");\n\n $path=\"\";\n\n for( $i=0; $i<count($L)-1; $i++ ){\n if( $path != \"\" ) $path.=\"/\";\n $path.=$L[$i];\n }\n\n\n if( $url == \"\" ){\n // if url of image is empty then remove file only and return\n unlink(\"icons/\".$id.\".*\"); return \"\";\n } else {\n // if file not exists then return without any action\n if( checkExternalFile($url) == false ) return \"\";\n }\n\n // get file extension from url\n $T=preg_split(\"/\\./\",$url);\n $file_extension = $T[ count($T)-1 ];\n\n // copy external image file into folder icons\n $ch = curl_init( $url );\n $fp = fopen(\"icons/\".$id.\".\".$file_extension , \"wb\");\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);\n curl_exec($ch);\n curl_close($ch);\n fclose($fp);\n\n // return the new path of imported image\n return $path.\"/icons/\".$id.\".\".$file_extension;\n}", "function upload_image($dst, $src) {\n global $amazonconfig;\n $s3 = new S3($amazonconfig->api->access_key, $amazonconfig->api->secret);\n\n $parts = explode('/', $dst);\n $bucket = $parts[1];\n $path = str_replace(\"/$bucket/\", '', $dst);\n $filename = $parts[sizeof($parts)-1];\n\n try{\n if(!$s3->putBucket($bucket, S3::ACL_PUBLIC_READ)) {\n return false;\n }\n\n if(filter_var($src, FILTER_VALIDATE_URL)){\n $newsrc = \"/tmp/$filename\";\n if(!file_put_contents($newsrc, file_get_contents($src))) {\n return false;\n }\n $src = $newsrc;\n }\n\n $server = $amazonconfig->api->s3->url;\n if ($s3->putObject($s3->inputFile($src, false), $bucket, $path, S3::ACL_PUBLIC_READ)) {\n return $server.\"/\".$bucket.\"/\".$path;\n }else {\n return false;\n }\n } catch (Exception $e) {\n return false;\n }\n\n}", "private function copy_image( $image_url, $new_file_name ) {\n\t\t$upload_folder = FrmSigAppController::get_signature_file_directory();\n\t\t$file_name = wp_unique_filename( $upload_folder, $new_file_name );\n\t\t$path = trailingslashit( $upload_folder );\n\n\t\t$ch = curl_init( str_replace( array( ' ' ), array( '%20' ), $image_url ) );\n\t\t$fp = fopen( $path . $file_name, 'wb' );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\t\tcurl_setopt( $ch, CURLOPT_FILE, $fp );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, 0 );\n\t\t$user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) );\n\t\tcurl_setopt( $ch, CURLOPT_USERAGENT, $user_agent );\n\t\t$result = curl_exec( $ch );\n\t\t$code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\tcurl_close( $ch );\n\t\tfclose( $fp );\n\n\t\tif ( ! $result || $code !== 200 ) {\n\t\t\t// Failed to download image\n\t\t\tunlink( $path . $file_name );\n\t\t\t$file_name = '';\n\t\t}\n\n\t\treturn $file_name;\n\t}", "function smartCopy($source, $dest, $options=array('folderPermission'=>0755, 'filePermission'=>0755)) \r\n{ \r\n\t$result=false; \r\n\t \r\n\tif (is_file($source)) \r\n\t{ \r\n\t\tif ($dest[strlen($dest)-1]=='/') \r\n\t\t{ \r\n\t\t\tif (!file_exists($dest)) \r\n\t\t\t{ \r\n\t\t\t\t cmfcDirectory::makeAll($dest,$options['folderPermission'],true); \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$__dest = $dest . \"/\" . basename($source); \r\n\t\t}\r\n\t\telse \r\n\t\t{ \r\n\t\t\t$__dest=$dest; \r\n\t\t}\r\n\t\t\r\n\t\t$result=copy($source, $__dest); \r\n\t\t\r\n\t\tchmod($__dest,$options['filePermission']); \r\n\t\t \r\n\t } elseif(is_dir($source)) { \r\n\t\tif ($dest[strlen($dest)-1]=='/') { \r\n\t\t\tif ($source[strlen($source)-1]=='/') { \r\n\t\t\t\t//Copy only contents \r\n\t\t\t} else { \r\n\t\t\t\t//Change parent itself and its contents \r\n\t\t\t\t$dest=$dest.basename($source); \r\n\t\t\t\t@mkdir($dest); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} \r\n\t\t} else { \r\n\t\t\tif ($source[strlen($source)-1]=='/') { \r\n\t\t\t\t//Copy parent directory with new name and all its content \r\n\t\t\t\t@mkdir($dest,$options['folderPermission']); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} else { \r\n\t\t\t\t//Copy parent directory with new name and all its content \r\n\t\t\t\t@mkdir($dest,$options['folderPermission']); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\t$dirHandle=opendir($source); \r\n\t\twhile($file=readdir($dirHandle)) \r\n\t\t{ \r\n\t\t\tif($file!=\".\" && $file!=\"..\") \r\n\t\t\t{ \r\n\t\t\t\tif(!is_dir($source.\"/\".$file)) { \r\n\t\t\t\t\t$__dest=$dest.\"/\".$file; \r\n\t\t\t\t} else { \r\n\t\t\t\t\t$__dest=$dest.\"/\".$file; \r\n\t\t\t\t} \r\n\t\t\t\t//echo \"$source/$file ||| $__dest<br />\"; \r\n\t\t\t\t$result=smartCopy($source.\"/\".$file, $__dest, $options); \r\n\t\t\t} \r\n\t\t} \r\n\t\tclosedir($dirHandle); \r\n\t\t \r\n\t} else { \r\n\t\t$result=false; \r\n\t} \r\n\treturn $result; \r\n}", "function upload_region_image() {\n if ($_FILES['region_image']['size'] > 0) {\n $dir = '../images/region_images';\n $filename1 = $_FILES['region_image']['name'];\n $srcfile = $_FILES['region_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "public function copy($sourcePath, $destinationPath) {\n\n $sourceNode = $this->getNodeForPath($sourcePath);\n $destinationParent = $this->getNodeForPath(dirname($destinationPath));\n\n try {\n $destinationNode = $destinationParent->getChild(basename($destinationPath));\n\n // If we got here, it means the destination exists, and needs to be overwritten\n $destinationNode->delete();\n\n } catch (Sabre_DAV_FileNotFoundException $e) {\n\n // If we got here, it means the destination node does not yet exist\n\n }\n\n $this->copyNode($sourceNode,$destinationParent,basename($destinationPath));\n\n }", "public function saveImage(Request $request){\n $x = explode('/', __DIR__);\n $path = [];\n for($i = 0; $i < count($x); $i++){\n if($x[$i] != 'app')\n array_push($path, $x[$i]);\n else\n break;\n }\n array_push($path, 'public', 'images', 'temp'. $request->ip(). '.jpg');\n $path = implode('/', $path);\n if(!file_exists($path)){\n fopen($path, 'w');\n }\n copy($request->image, $path);\n return response()->json(['code' => 200, 'message' => 'success', 'response' => $path])->header('Cache-control', 'no-cache');\n\n }", "function uploadImg($arquivo, $arquivo_temp, $tamanho_arquivo){\n $arquivos_permitidos = array(\".jpg\", \".jpeg\", \".png\");\n $diretorio = \"img/\";\n\n \n // pegando o nome do aquivo e o tamnho do arquivo que vai ser upado para o servidor\n \n // convertendo o valor de bites em kbites\n $tamanho_arquivo = round($tamanho_arquivo/1240);\n // echo $tamanho_arquivo;\n\n //pega a extancao do arquivo strrch() => pega uma string e peha a partir do caracter \"x\".\n $extencao_arquivo = strrchr($arquivo,\".\");\n // echo $extencao_arquivo;\n\n // para pegar somente o nome do arquivo ultilizamos a biblioteca pathinfo(); \n $nome_arquivo = pathinfo($arquivo, PATHINFO_FILENAME);\n // echo $nome_arquivo;\n\n\n // gerar nome unico para cada imagem que for salva, uniqid() gera sequencia aleatoria de numero de hora, minuto e segundos;\n $arquivo_criptografado = md5(uniqid(time()).$nome_arquivo);\n // echo $arquivo_criptografado;\n // var_dump($_FILES[\"flefotos\"]);\n\n\n\n if(in_array($extencao_arquivo, $arquivos_permitidos)){\n if($tamanho_arquivo <= 9000){\n // criamos o nome com a extenção do arquivo que sera enviado para o servidor\n $foto = $arquivo_criptografado.$extencao_arquivo;\n\n \n\n // função que move um arquivo para outro lugar, pedindo o arquivo horigem e o destino\n if(move_uploaded_file($arquivo_temp, $diretorio.$foto)){\n return $diretorio.$foto;\n\n }else{\n return false;\n }\n\n }else{\n return false;\n\n\n }\n }else{\n return false;\n }\n }", "function save_image_local_dir($image_url){\n $day = date('d');\n $month_m = date('M');\n $year = date('Y');\n $pathname = 'snippet-images/'.$year.'/'.$month_m.'/'.$month_m.'-'.$day;\n $ext = get_file_extension($image_url);\n if(!is_dir($pathname)){\n mkdir($pathname);\n }\n $rand_num = md5(mt_rand());\n $rand = md5($image_url);\n \n @$raw_image = file_get_contents($image_url);\n $path = $pathname. '/' .$rand_num .'.'. $ext;\n $dest = $pathname. '/'. $rand . '.'.$ext;\n \n if($raw_image)\n {\n file_put_contents($path,$raw_image);\n $file = check_and_compress($path,$dest);\n $image_address = \"snippets/\".$file;\n return $image_address;\n }\n else\n {\n return $image_url;\n }\n }", "function copyUploadedFile( $source, $destination = \"\", $thumbnail = false, $resizeScale = null ){\n \t\n \t$this->source \t= $source;\n// \t$this->name\t\t= str_replace( \" \", \"_\", $source[ \"name\" ] ); //\tsubstituindo os espacos em branco.\n// \t$this->name\t\t= htmlentities( $this->name );\n\t\t$this->name\t\t= $this->renameFile( $source[ 'name' ] );\n \t$this->newName\t= $this->name;\n \t\n \t//\tDestino completo\n $this->path \t\t\t= $this->path . $destination . DS;\n $this->thumbnailPath\t= $this->thumbnailPath . $destination . DS;\n \n //\tVerifica se arquivo é permitido\n if( $this->verifyUpload( $source ) ){\n \n \t$filename = $this->verifyFileExists( $this->name );\n \t\n\t if( move_uploaded_file( $source[ \"tmp_name\" ], $this->path . $filename ) ){\n\t\t\t\t\n\t \t$this->setLog();\n\t \t\n\t \tif( $thumbnail )\n\t \t\t$this->createThumbnail();\n\t \t\n\t \tif( $resizeScale )\n\t \t\t$this->resizeImage( $filename, $resizeScale );\n\t \t\t\n\t \t$this->uploaded = true;\n\t \n\t \treturn true;\n\t \t\n\t } else {\n\t \n\t $this->setLog(); \n\t \t$this->setLog( \"-> Erro ao enviar arquivo<br />\" );\n\t $this->setLog( \" Obs.: \" . $this->getErrorUpload( $source[ \"error\" ] ) . \"<br />\" );\n\t\n\t return false;\n\t }\n\t \n } else {\n \t\n \t$this->setLog();\n $this->setLog( \"-> O arquivo que você está tentando enviar não é permitido pelo administrador<br />\" );\n $this->setLog( \" Obs.: Apenas as extensões \" . $this->viewExt() . \" são permitidas.<br />\" );\n\n return false;\n }\n }", "function fileUpload($fileName, $fileUploadPath = \"\", $maxSize = 1000000, $allowedFileTypes = array()) {\r\n if ($this->checkValidFileUpload($fileName, $fileUploadPath, $maxSize, $allowedFileTypes)) {\r\n if (!is_dir($fileUploadPath) && $fileUploadPath) {\r\n mkdir($fileUploadPath);\r\n }\r\n $destinationFileName = time() . \"_\" . $fileName[\"name\"];\r\n $destinationPath = $fileUploadPath . $destinationFileName;\r\n if (move_uploaded_file($fileName[\"tmp_name\"], $destinationPath)) {\r\n $destinationPath = $fileUploadPath . $destinationFileName;\r\n $fileExt = $this->getFileExtension($destinationPath);\r\n if (in_array($fileExt, array(\"jpg\", \"gif\", \"png\"))) {\r\n $newFileName = substr($destinationFileName, 0, strlen($destinationFileName) - strlen($fileExt) - 1);\r\n require_once(dirname(__FILE__) . \"/library/abeautifulsite/SimpleImage.php\");\r\n $img = new SimpleImage();\r\n if (isset($this->imageDimensions)) {\r\n foreach ($this->imageDimensions as $width => $height) {\r\n $resizeImg = $newFileName . \"_\" . $width . \"_\" . $height . \".\" . $fileExt;\r\n $newImage = $img->load($destinationPath)->resize($width, $height)->save($fileUploadPath . $resizeImg);\r\n }\r\n }\r\n \r\n if (isset($this->watermark)) {\r\n $img->load($destinationPath)->overlay($this->watermark[\"overlay\"], $this->watermark[\"position\"], $this->watermark[\"opacity\"], $this->watermark[\"xOffset\"], $this->watermark[\"yOffset\"])->save($destinationPath);\r\n }\r\n\r\n if (isset($this->imageFlip)) {\r\n $img->load($destinationPath)->flip($this->imageFlip)->save($destinationPath);\r\n }\r\n \r\n if (isset($this->imageThumbnail)) {\r\n $img->load($destinationPath)->thumbnail($this->imageThumbnail[\"width\"], $this->imageThumbnail[\"height\"], $this->imageThumbnail[\"focal\"])->save($destinationPath);\r\n }\r\n \r\n if (isset($this->imageCrop)) {\r\n $img->load($destinationPath)->crop($this->imageCrop[\"x1\"], $this->imageCrop[\"y1\"], $this->imageCrop[\"x2\"],$this->imageCrop[\"y2\"])->save($destinationPath);\r\n }\r\n\r\n if (isset($this->imageText)) {\r\n $imgText = $this->imageText;\r\n $img->load($destinationPath)->text($imgText[\"text\"], $imgText[\"font_file\"], $imgText[\"font_size\"], $imgText[\"color\"], $imgText[\"position\"], $imgText[\"x_offset\"], $imgText[\"y_offset\"], $imgText[\"stroke_color\"], $imgText[\"stroke_size\"], $imgText[\"alignment\"], $imgText[\"letter_spacing\"])->save($destinationPath);\r\n }\r\n }\r\n return $this->settings[\"uploadURL\"] . $destinationFileName;\r\n } else\r\n return false;\r\n }\r\n\r\n return false;\r\n }", "function image_crop(){\n\n\t\t\t$imgUrl = $_POST['imgUrl'];\n\t\t\t/*explored image URL and get image name*/\n\t\t\t$expImgUrl=explode(\"/\", $imgUrl);\n\t\t\t$LengthOfArray = sizeof($expImgUrl);\n\t\t\t$imageName = $LengthOfArray-1;\n\t\t\t$imgName = $expImgUrl[$imageName];\n\t\t\t$imgInitW = $_POST['imgInitW'];\n\t\t\t$imgInitH = $_POST['imgInitH'];\n\t\t\t$imgW = $_POST['imgW'];\n\t\t\t$imgH = $_POST['imgH'];\n\t\t\t$imgY1 = $_POST['imgY1'];\n\t\t\t$imgX1 = $_POST['imgX1'];\n\t\t\t$cropW = $_POST['cropW'];\n\t\t\t$cropH = $_POST['cropH'];\n\n\t\t\t$jpeg_quality = 100;\n\t\t\t$rand = rand();\n\t\t\t$output_filename = \"../webroot/img/uploads/croppedImg_\".$rand;\n\t\t\t$oname = \"img/uploads/croppedImg_\".$rand;\n\t\t\t$Pname = \"img/uploads/\";\n\t\t\t$path = BASE_PATH;\n\n\t\t\t$what = getimagesize($Pname.\"/\".$imgName);\n\t\t\t\n\t\t\tswitch(strtolower($what['mime']))\n\t\t\t{\n\t\t\t\tcase 'image/png':\n\t\t\t\t\t$img_r = imagecreatefrompng($Pname.\"/\".$imgName);\n\t\t\t\t\t$source_image = imagecreatefrompng($Pname.\"/\".$imgName);\n\t\t\t\t\t$type = '.png';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/jpeg':\n\t\t\t\t\t$img_r = imagecreatefromjpeg($Pname.\"/\".$imgName);\n\t\t\t\t\t$source_image = imagecreatefromjpeg($Pname.\"/\".$imgName);\n\t\t\t\t\t$type = '.jpeg';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/gif':\n\t\t\t\t\t$img_r = imagecreatefromgif($Pname.\"/\".$imgName);\n\t\t\t\t\t$source_image = imagecreatefromgif($Pname.\"/\".$imgName);\n\t\t\t\t\t$type = '.gif';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: die('image type not supported');\n\t\t\t}\n\t\t\t\t\n\t\t\t$resizedImage = imagecreatetruecolor($imgW, $imgH);\n\t\t\timagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW, \n\t\t\t\t\t\t$imgH, $imgInitW, $imgInitH);\t\n\t\t\t\n\t\t\t\n\t\t\t$dest_image = imagecreatetruecolor($cropW, $cropH);\n\t\t\timagecopyresampled($dest_image, $resizedImage, 0, 0, $imgX1, $imgY1, $cropW, \n\t\t\t\t\t\t$cropH, $cropW, $cropH);\t\n\n\n\t\t\timagejpeg($dest_image, $output_filename.$type, $jpeg_quality);\n\t\t\t\n\t\t\t$response = array(\n\t\t\t\t\t\"status\" => 'success',\n\t\t\t\t\t\"url\" => $oname.$type, \n\t\t\t\t\t\"base\" => $path \n\t\t\t\t );\n\t\t\t print json_encode($response);\n\t\t\t exit;\n\t}", "function saveImage() {\n $_UPLOADS = $GLOBALS[\"server_upload_folder\"];\n $uploadOk = 1;\n\n $filePath = $_UPLOADS . basename($_FILES[\"image\"][\"name\"]);\n $imageFileType = pathinfo($filePath, PATHINFO_EXTENSION);\n\n // Check if file already exists\n if (file_exists($filePath)) {\n $uploadOk = 0;\n }\n\n // Check file size\n if ($_FILES[\"image\"][\"size\"] > 500000) {\n $uploadOk = 0;\n }\n\n // Allow certain file formats\n if($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\" && $imageFileType != \"gif\" ) {\n $uploadOk = 0;\n }\n\n // If everything is ok, try to upload file\n if($uploadOk == 1) {\n\n if (move_uploaded_file($_FILES[\"image\"][\"tmp_name\"], $filePath)) {\n return $filePath;\n }\n }\n}", "function uploadFile($uploadFile, $uploadDir, $fileName = null) {\n if (empty($uploadDir)) {\n $this->farrErrors[] = \"File upload dir not set\";\n return false;\n }\n\n if (array_key_exists($uploadFile, $_FILES) &&\n !is_array($_FILES[$uploadFile])) {\n $this->farrErrors[] = \"File upload error. Please try again\";\n return false;\n }\n\n if (!@file_exists($_FILES[$uploadFile]['tmp_name'])) {\n $this->farrErrors[] = \"File upload error. Please try again\";\n return false;\n }\n\n if ($uploadDir[strlen($uploadDir) - 1] != \"/\" ||\n $uploadDir[strlen($uploadDir) - 1] != \"\\\\\") {\n $uploadDir .= \"/\";\n }\n\n if (!empty($fileName)) {\n $destFilePath = $uploadDir.$fileName;\n } else {\n $destFilePath = $uploadDir.basename($_FILES[$uploadFile]['name']);\n }\n\n $counter = 1;\n $path = pathinfo($destFilePath);\n $dir = $path['dirname'].\"/\";\n $extension = '.'.$path['extension'];\n $name = basename($destFilePath, $extension);\n $mimeType = $_FILES[$uploadFile]['type'];\n\n /** not working on any random machine\n if (function_exists('mime_content_type')) {\n $mimeType = mime_content_type($_FILES[$uploadFile]['tmp_name']);\n }\n */\n\n if (!empty($this->farrAllowedMimeTypes) && !array_key_exists($mimeType,\n array_flip($this->farrAllowedMimeTypes))) {\n $this->farrErrors[] = \"File type not allowed\";\n return false;\n }\n\n while (@file_exists($destFilePath)) {\n $destFilePath = $dir.$name.'_'.$counter.$extension;\n $counter++;\n }\n\n if (@move_uploaded_file($_FILES[$uploadFile]['tmp_name'],\n $destFilePath)) {\n $oImage = new Image();\n if ($oImage->initialize($destFilePath,\n $name.$extension, $name, $mimeType)) {\n return $oImage;\n } else {\n $farrErrors[] = 'Image upload error';\n return false;\n }\n\n } else {\n $farrErrors[] = 'Image upload error';\n return false;\n }\n\n }", "public function copyImage($destination_path)\n\t{\n\t\t$this->image->toFile($destination_path);\n\n\t\treturn $this;\n\t}", "function file_copy_to_folder($source_file, $destination_folder, $filename)\n{\n $arrext = explode('.', $source_file['name']);\n $jml = count($arrext) - 1;\n $ext = $arrext[$jml];\n $ext = strtolower($ext);\n $ret = false;\n if (!is_dir($destination_folder)) {\n mkdir($destination_folder, 0755);\n }\n $destination_folder .= $filename . '.' . $ext;\n\n if (@move_uploaded_file($source_file['tmp_name'], $destination_folder)) {\n $ret = $filename . \".\" . $ext;\n }\n return $ret;\n}", "public function imageManipulations($image, $destinationPath): string\n {\n Image::configure(['driver' => $this->driver]);\n\n $this->image = Image::make($image->getRealPath());\n\n $file_name = pathinfo($image->getClientOriginalName(), PATHINFO_FILENAME);\n\n if ($this->convert) {\n $this->image->encode('webp');\n $imageName = time() . \"_\" . $file_name . '.webp';\n } else {\n $imageName = $image->getClientOriginalName();\n }\n\n if ($this->fitWidth || $this->fitHeight) {\n $this->fitMagic();\n }\n\n if ($this->widenResize) {\n $this->widenResizeMagic();\n }\n\n if ($this->watermark && $this->watermarkPath) {\n $this->watermarkMagic();\n }\n\n if ($this->cropWidth || $this->cropHeight) {\n $this->cropMagic();\n }\n\n if ($this->resizeWidth || $this->resizeHeight) {\n $this->resizeMagic();\n }\n\n if ($this->disk) {\n $destinationPath = Storage::disk($this->disk)->path('');\n }\n\n if (!empty($this->customUploadDirectory)) {\n $this->url = '/' . $this->customUploadDirectory . '/' . $imageName;\n } else if ($this->disk) {\n $this->diskSpecified($imageName);\n } else {\n $this->url = '/storage/imagic/' . $this->directory->year . '/' . $this->directory->month . '/' . $this->directory->day . '/' . $imageName;\n }\n\n $this->image->save($destinationPath . $imageName, $this->quality, $this->convert === false ? null : 'webp');\n\n $this->image->destroy();\n\n return $this->url;\n }", "private function intern_save ($targetPath = null)\n\t{\n\t\tif ($this->newImage == null) $this->newImage = $this->srcImage;\n\n\t\tif ($targetPath == null) $targetPath = $this->srcPath;\n\t\telse\n\t\t{\n\t\t\tif (Pathfinder::isAbsolute($targetPath)) $targetPath = $targetPath;\n\t\t\t$targetPath = $this->dataRootPath . $this->getRelativePath($targetPath);\n\t\t}\n\n\t\t// create folders if necessary\n\t\t$this->setUpFolder($targetPath);\n\t\t// remove file from folder with same name\n\t\t$this->intern_removePrevious($targetPath);\n\n\t\t// save\n\t\tswitch($this->srcInfo['extension']) {\n\t\t\tcase 'jpg':\n\t\t\tcase 'jpeg':\n\t\t\t\timagejpeg ( $this->newImage, $targetPath);\n\t\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t\timagepng ( $this->newImage, $targetPath);\n\t\t\t\tbreak;\n\t\t\tcase 'gif':\n\t\t\t\timagegif ( $this->newImage, $targetPath);\n\t\t}\n\t\t$this->intern_end();\n\t}", "public static function copy($src, $dst, $options = null) {\n\t\tEasyLog::log(\"Starting Upload copy\");\n\t\t$options = array_merge(array(\n\t\t\t'filename' => null,\t\t\t// Preferred name of the new file\n\t\t\t'oldFilename' => null,\t\t// Existing filename that will be deleted before copying\n\t\t\t'isImage' => false,\t\t\t// If this file is an image\n\t\t\t'randomPath' => false,\t\t// Adds an additional set of random paths between the directory and file name\n\t\t), $options);\n\t\t\n\t\t// Accepts a $_POST data array or single string\n\t\tif (is_array($src)) {\n\t\t\t$filename = $src['name'];\n\t\t\t$src = $src['tmp_name'];\n\t\t} else {\n\t\t\t$filename = array_pop(explode(DS, $src));\n\t\t}\n\n\t\t$src = self::_dsFixFile($src);\n\t\t$TmpFile = new File($src);\n\t\t\t\t\t\t\n\t\t$File = new File($filename);\n\t\t$ext = $File->ext();\n\t\t\n\t\t// Finds the destination filename\n\t\tif (isset($options['filename']) && $options['filename'] != '') {\n\t\t\t$filename = $options['filename'];\n\t\t}\n\n\t\tif (!empty($ext) && strpos($filename, '.') === false) {\n\t\t\t//Adds an extension if none has been provided\n\t\t\t$filename .= '.' . $ext;\n\t\t}\n\t\t$filename = self::_dsFixFile($filename);\n\n\t\tif (!is_array($dst)) {\n\t\t\t$dst = array($dst);\n\t\t}\n\n\t\t$results = array();\n\t\tforeach ($dst as $dir => $conversionRules) {\n\t\t\tif (is_int($dir)) {\n\t\t\t\t$dir = $conversionRules;\n\t\t\t\t$conversionRules = array();\n\t\t\t}\n\n\t\t\t$dir = self::_dsFixFile($dir);\n\t\t\t$dirParts = explode(DS, $dir);\n\t\t\t$lastDirItem = array_pop($dirParts);\n\n\t\t\t// Checks if the directory contains a filename\n\t\t\tif (strpos($lastDirItem, '.') !== false) {\n\t\t\t\t$dstFilename = $lastDirItem;\n\t\t\t\t$dir = implode(DS, $dirParts);\n\t\t\t} else {\n\t\t\t\t$dstFilename = $filename;\n\t\t\t}\n\n\t\t\t// Adds random path if necessary\n\t\t\tif (!empty($options['randomPath'])) {\n\t\t\t\tif ($options['randomPath'] !== true) {\n\t\t\t\t\t$randomPath = self::randomPath($filename, $options['randomPath']);\n\t\t\t\t} else {\n\t\t\t\t\t$randomPath = self::randomPath($filename);\n\t\t\t\t}\n\t\t\t\t$dir = Folder::addPathElement($dir, $randomPath);\n\t\t\t}\n\t\t\tif (strpos($dstFilename, DS)) {\n\t\t\t\t$filenameDirs = explode(DS, $dstFilename);\n\t\t\t\t$dstFilename = array_pop($filenameDirs);\n\t\t\t\t$dir = Folder::slashTerm(Folder::addPathElement($dir, implode(DS, $filenameDirs)));\n\t\t\t}\n\n\t\t\t// Makes sure directory exists\n\t\t\tif (!is_dir( $dir)) {\n\t\t\t\tEasyLog::log('Creating directory: ' . $dir);\n\t\t\t\tif (!mkdir($dir, 0777, true)) {\n\t\t\t\t\tEasyLog::error('Upload file directory, ' . $dir . ' does not exist and could not be created');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Removes old existing file\n\t\t\tif (!empty($options['oldFilename'])) {\n\t\t\t\t$oldFile = $dir . $options['oldFilename'];\n\t\t\t\tif (is_file($oldFile)) {\n\t\t\t\t\tunlink($oldFile);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$dst = $dir . $dstFilename;\n\n\t\t\tif ($options['isImage']) {\n\t\t\t\t$success = self::copyImage($src, $dst, $conversionRules);\n\t\t\t} else {\n\t\t\t\t$success = self::copyFile($src, $dst);\n\t\t\t}\n\n\t\t\t$result = compact('dst', 'src', 'success');\n\n\t\t\tif (!$success) {\n\t\t\t\tEasyLog::error(\"Could not upload file $dstFilename to directory $dir\");\n\t\t\t} else {\n\t\t\t\t$result += array(\n\t\t\t\t\t'filename' => $dstFilename,\n\t\t\t\t\t'size' => $TmpFile->size(),\n\t\t\t\t\t'type' => !empty($data['type']) ? $data['type'] : null,\n\t\t\t\t\t'ext' => $ext,\n\t\t\t\t\t'location' => $dst,\n\t\t\t\t);\n\t\t\t\t@chmod($dst, 0777);\n\t\t\t}\n\n\t\t\t$results[] = $result;\n\t\t}\n\n\t\t$return = compact('results') + array(\n\t\t\t'log' => array(\n\t\t\t\t'msgs' => EasyLog::getLog(),\n\t\t\t\t'errors' => EasyLog::getErrors()\n\t\t\t)\n\t\t);\n\t\tEasyLog::log(\"Finished Upload copy\");\n\t\treturn $return;\n\t}", "function FTPupload($origen,$destino='',$borrar=true,&$id_ftp=false){\n\t//colocar ruta relativa de origen y destino, incluyendo carpetas.\n\t//si se omite destino se copia con la misma ruta del origen.\n\t//por defecto se elimina la imagen original\n\tif($destino=='') $destino=$origen;\n\t$count=preg_match('/(.+\\/)*/',$destino,$path);\n\tif(!NOFPT){\n\t\tif(!$id_ftp){\n\t\t\t$id_ftp=ftp_connect(FTPSERVER,21);\n\t\t\tftp_login($id_ftp,FTPACCOUNT,FTPPASS);\n\t\t\tftp_pasv($id_ftp,false);\n\t\t}\n\t\t//Movilizacion a subcarpetas. Si no existen las crea.\n\t\t//$count=preg_match('/(.+\\/)(.+\\/)*/',$path[1],$path);\n\t\t$path=$path[1];\n\t\twhile(($pos=strpos($path,'/'))!==false){\n\t\t\t$folder=substr($path,0,$pos);\n\t\t\t@ftp_mkdir($id_ftp,$folder);\n\t\t\tif(ftp_chdir($id_ftp,$folder)){\n\t\t\t\t@ftp_put($id_ftp,'index.html',RELPATH.'img/index.html',FTP_BINARY);\n\t\t\t}else{\n\t\t\t\tftp_quit($id_ftp);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$path=substr($path,$pos+1);\n\t\t}\n\t\t$file=end(explode('/',$destino));\n\t\tif($file!=''){\n\t\t\tftp_put($id_ftp,$file,RELPATH.'img/'.$origen,FTP_BINARY);\n\t\t\tftp_quit($id_ftp);\n\t\t}\n\t\tif($borrar){\n\t\t\t@unlink(RELPATH.$origen);\n\t\t}\n\t}elseif($destino!=$origen){\n\t\tmkdir(substr($path[1],0,-1),0777,true);\n\t\tif($borrar)\n\t\t\trename(RELPATH.'img/'.$origen,RELPATH.'img/'.$destino);\n\t\telse\n\t\t\tcopy(RELPATH.'img/'.$origen,RELPATH.'img/'.$destino);\n\t}\n}", "public function resizeInSquareFromFile($src_name,$dest_name,$newwidth,$newheight,$background,$ext)\n {\n //Check extension of file\n if(empty($ext))\n {\n $ext = $this->options[parent::IMAGE_ITEM_DEFAULT_TYPE];\n }\n\n //Create image source from file name\n $source_image = $this->createSourceImage($src_name,$ext);\n \n //Check source\n if(!$source_image)\n {\n return false;\n }\n\n //Check background\n if(empty($background))\n {\n $background = $this->options[self::IMAGE_ITEM_BACKGROUND];\n }\n\n //Check new height\n if(empty($newheight))\n {\n $newheight = $newwidth;\n }\n\n //Get old size\n $old_x = imagesx($source_image);\n $old_y = imagesy($source_image);\n\n //Check have correct site\n if($old_x <= $newwidth && $old_y <= $newheight)\n {\n //Destroy image source\n imagedestroy($source_image);\n\n //Return image file\n return copy($src_name,$dest_name);\n }\n\n //Resize keep width\n if($old_x < $newwidth)\n {\n //Check size\n $newwidth = $old_x;\n if($newwidth > $newheight)\n {\n $newwidth = $newheight;\n }\n\n //Crop image \n $dest_image = imagecreatetruecolor($newwidth, $newheight);\n imagecopyresampled($dest_image, $source_image, 0, 0, 0, 0, $newwidth , $newheight, $newwidth, $newheight);\n }\n else\n {\n $newheight = ceil((($newwidth*$old_y)/$old_x));\n $dest_image = imagecreatetruecolor($newwidth, $newwidth);\n list($r,$g,$b) = explode(\",\",$background);\n $color= imagecolorallocate($dest_image, $r, $g, $b);\n $move_space =0;\n if($old_x > $old_y )\n {\n $move_space = ceil(($newwidth - $newheight)/2);\n }\n\n //Check size\n if($old_y < $newwidth)\n {\n $newwidth = $old_y;\n $newheight = $newwidth;\n } \n\n //Crop image\n imagefill($dest_image,0,0,$color);\n imagecopyresampled($dest_image, $source_image, 0, -$move_space, 0, 0, $newwidth , $newheight, $old_x, $old_y);\n }\n\n //Put binary string\n imagejpeg($dest_image,$dest_name,$this->options[parent::IMAGE_ITEM_QUALITY]);\n\n //Destroy images\n imagedestroy($dest_image);\n imagedestroy($source_image);\n\n //Return boolean\n return true;\n }", "function uploadfile($fileName,$source,$type,$valid,$path) \n\t{ \n \n\t$rand=rand(5,10000);\n\t$getName=$rand.'-'.$fileName;\n\t$getSource=$source;\n\t$getType=$type;\n\t$getValid=$valid;\n\t$getPath=$path;\n\tif(in_array($getType,$getValid))\n\t\t\t{\n\t\t\t\tif(is_uploaded_file($getSource))\n\t\t\t\t{\n\t\t\t\t\t$targetpath=$getPath .$getName;\n\t\t\t\t\t$move_image=move_uploaded_file($getSource,$targetpath);\n\t\t\t\t\t\tif($move_image)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\treturn $getName;\n\t\t\t\t\t\t\t$upload_images_status=1;\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$error.=\"<li>Image Not Uploaded.</li>\";\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t \n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t}\n\t}", "public static function copy($s_source,$s_destination)\n {\n $r_directory = opendir($s_source);\n while(($s_file=readdir($r_directory))!==false)\n {\n if($s_file==='.'||$s_file==='..'||$s_file==='.idea'||$s_file==='.svn')\n continue;\n\n $s_destination_file = $s_destination.'/'.$s_file;\n\n if(is_dir($s_source.'/'.$s_file))\n {\n if(!is_dir($s_destination_file))\n mkdir($s_destination_file);\n static::copy($s_source.'/'.$s_file,$s_destination_file);\n }\n else\n {\n copy($s_source.'/'.$s_file,$s_destination_file);\n }\n }\n closedir($r_directory);\n }", "function smartCopy($source, $dest, $folderPermission=0755,$filePermission=0644){\r\n# source=file & dest=file / not there yet => copy file from source-dir to dest and overwrite a file there, if present\r\n\r\n# source=dir & dest=dir => copy all content from source to dir\r\n# source=dir & dest not there yet => copy all content from source to a, yet to be created, dest-dir\r\n $result=false;\r\n \r\n if (is_file($source)) { # $source is file\r\n if(hb_is_dir($dest)) { # $dest is folder\r\n if ($dest[strlen($dest)-1]!='/') # add '/' if necessary\r\n $__dest=$dest.\"/\";\r\n $__dest .= basename($source);\r\n }\r\n else { # $dest is (new) filename\r\n $__dest=$dest;\r\n }\r\n $result=copy($source, $__dest);\r\n chmod($__dest,$filePermission);\r\n }\r\n elseif(hb_is_dir($source)) { # $source is dir\r\n if(!hb_is_dir($dest)) { # dest-dir not there yet, create it\r\n @mkdir($dest,$folderPermission);\r\n chmod($dest,$folderPermission);\r\n }\r\n if ($source[strlen($source)-1]!='/') # add '/' if necessary\r\n $source=$source.\"/\";\r\n if ($dest[strlen($dest)-1]!='/') # add '/' if necessary\r\n $dest=$dest.\"/\";\r\n\r\n # find all elements in $source\r\n $result = true; # in case this dir is empty it would otherwise return false\r\n $dirHandle=opendir($source);\r\n while($file=readdir($dirHandle)) { # note that $file can also be a folder\r\n if($file!=\".\" && $file!=\"..\") { # filter starting elements and pass the rest to this function again\r\n# echo \"$source$file ||| $dest$file<br />\\n\";\r\n $result=smartCopy($source.$file, $dest.$file, $folderPermission, $filePermission);\r\n }\r\n }\r\n closedir($dirHandle);\r\n }\r\n else {\r\n $result=false;\r\n }\r\n return $result;\r\n }", "function copie_image($gl,$path,$name,$mw,$mh,$type) {\n\tglobal $msg;\n\t$msg = '';\n\t\n\t$jpg_quality = 100;\n\n\t$tmp_name = $gl['tmp_name'];\n\n\t$type_f = '';\t\n\tif ($gl['type'] == 'image/jpeg' or $gl['type'] == 'image/pjpeg') { $type_f = \"jpg\"; \t}\n\tif ($gl['type'] == 'image/gif') { $type_f = \"gif\"; }\n\tif ($gl['type'] == 'image/png') { $type_f = \"png\"; }\n\t\n\t// MAUVAIS TYPE -> RENVOI\n\tif ($type_f == '') { $msg = \"Mauvais type de fichier, impossible de copier l'image.\"; return;}\n\n\t// IMAGE SIMPLE REDIMENSIONNE A mw et mh\t\n\tif ($type == 'simple') {\n\t\n\t\t// VERIF DE LA TAILLE\n\t\t$size = GetImageSize($tmp_name);\n\t\t$ow = $size[0];\n\t\t$oh = $size[1];\n\t\tif ($ow > $mw or $oh > $mh) {\n\t\t\t// REDIMENSIONNE \n\t\t\t// CALCUL LES RATIOS\n\t\t\t$rw = $mw/$ow;\n\t\t\t$rh = $mh/$oh;\n\t\t\t\n\t\t\tif ($rw<=$rh) {\n\t\t\t\t// W > H;\n\t\t\t\t$ratio = $rw;\n\t\t\t} else {\n\t\t\t\t// H > W;\n\t\t\t\t$ratio = $rh;\n\t\t\t}\n\t\t\t// CALCUL LES NOUVELLES DIMENSIONS\n\t\t\t$nw = round($ow*$ratio);\n\t\t\t$nh = round($oh*$ratio);\n\t\t\t// CREATION DE LA NOUVELLE IMAGE\n\t\t\tif ($type_f == 'jpg') {\n\t\t\t\t$img = imagecreatefromjpeg($tmp_name);\n\t\t\t\t$img_dest = imagecreatetruecolor($nw,$nh);\n\t\t\t\t//COPIE\n\t\t\t\t$copy = imagecopyresampled($img_dest,$img,0,0,0,0,$nw,$nh,$ow,$oh);\n\t\t\t\timagejpeg($img_dest,$path.$name.\".\".$type_f);//, $jpg_quality);\n\t\t\t}\n\t\t\tif ($type_f == 'gif') {\n\t\t\t\t$img = imagecreatefromgif($tmp_name);\n\t\t\t\t$img_dest = imagecreatetruecolor($nw,$nh);\n\t\t\t\t//COPIE\n\t\t\t\t$copy = imagecopyresampled($img_dest,$img,0,0,0,0,$nw,$nh,$ow,$oh);\n\t\t\t\timagegif($img_dest,$path.$name.\".\".$type_f);\n\t\t\t}\n\t\t\tif ($type_f == 'png') {\n\t\t\t\t$img = imagecreatefrompng($tmp_name);\n\t\t\t\t$img_dest = imagecreatetruecolor($nw,$nh);\n\t\t\t\t//COPIE\n\t\t\t\t$copy = imagecopyresampled($img_dest,$img,0,0,0,0,$nw,$nh,$ow,$oh);\n\t\t\t\timagepng($img_dest,$path.$name.\".\".$type_f);\n\t\t\t}\n\t\t\t// DESTRUCTION\n\t\t\timagedestroy($img_dest);\n\t\t\treturn $type_f;\n\t\t} else {\n\t\t\t// COPIE SIMPLE (LA TAILLE EST DEJA BONNE)\n\t\t\tif (!@copy($tmp_name, $path.$name.\".\".$type_f)) {\n\t\t\t\t$msg = \"Impossible de copier l'image.\";\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\treturn $type_f;\n\t\t\t}\n\t\t}\n\t}\n\n\t// COPY SANS CONTROLE\n/*\tif ($type == 'unique') {\t\n\t\tif (!@copy($tmp_name, $path.$name.\".\".$type_f)) {\n\t\t\t$msg = \"Impossible de copier l'image.\";\n\t\t\treturn;\n\t\t} else {\n\t\t\treturn $type_f;\n\t\t}\n\t}\n*/\t\n\t// COPY SANS CONTROLE\n\tif ($type == 'unique') {\t\n\t\tif (!@copy($tmp_name, $path.$name)) {\n\t\t\t$msg = \"Impossible de copier l'image.\";\n\t\t\treturn;\n\t\t} else {\n\t\t\treturn $type_f;\n\t\t}\n\t}\n\t\n}", "public function StaticImageUpload(){\n $design_id = $_POST['new_filename'];\n $uid = $_POST['uid'];\n $uid = empty($uid) ? 0 : $uid;\n $exp = explode(\".\", $_FILES[\"file\"][\"name\"])[1];\n $filename = $design_id.'.'.$exp;\n $new_file = 'public://files/'.$uid.'/kmds/images/static_image/' . $filename;\n $uploaded_image = file_get_contents($_FILES[\"file\"][\"tmp_name\"]);\n file_put_contents($new_file, $uploaded_image);\n $source_original = array(\"src\" => file_create_url($new_file));\n return new JsonResponse($source_original);\n }", "function copy_fichier($file, $path) {\n\t\t if (!$id_erreur=copy(\"vide.htm\", $path . $file . \".htm\")) echo(\"Erreur d'ouverture du fichier\");\n\t\t else return(1);\n}", "function GrabImage($url,$originname,$dir1, $dir2) {\n\tglobal $_SC;\n\tif($url==\"\"|| $originname==\"\") return false; \n\tchdir(dirname(dirname(dirname(__FILE__))));//change to the ihome dir.\n\tchdir($_SC['attachdir'].$dir1.'/'.$dir2);\n\t//echo $_SC['attachdir'].$dir1.'/'.$dir2;exit();\n\t$ext=strrchr($url,\".\"); \n\tif($ext!=\".gif\" && $ext!=\".jpg\" && $ext!=\".jpeg\" && $ext!=\".png\") return false; \n\t$filename=\"foreign\".$originname; \n\n\tob_start(); \n\treadfile($url); \n\t$img = ob_get_contents(); \n\tob_end_clean(); \n\t$size = strlen($img); \n\n\t$fp2=@fopen($filename, \"a\"); \n\tfwrite($fp2,$img); \n\tfclose($fp2); \n\n\treturn $filename; \n}", "public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }", "function copy_file($from_loc, $to_loc)\n\t{\n\t\tglobal $phpbb_root_path;\n\n\t\t$from_loc = ((strpos($from_loc, $phpbb_root_path) !== 0) ? $phpbb_root_path : '') . $from_loc;\n\t\t$to_loc = $this->root_path . str_replace($phpbb_root_path, '', $to_loc);\n\n\t\tif (!file_exists($from_loc))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = $this->overwrite_file($from_loc, $to_loc);\n\n\t\treturn $result;\n\t}", "public static function copy ($srcPath, $dstPath) {\n\t\t\\copy($srcPath, $dstPath);\n\t}", "public function uploadFile($input_file,$destinationPath,$file_type = 'image',$fileName){\n if($file_type == 'image'){\n $img = Image::make($input_file->getRealPath());\n $img->resize(100, 100, function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationPath.'/thumbs/'.$fileName);\n }\n chmod($destinationPath, 0777); //changed to add the zero\n $input_file->move($destinationPath, $fileName); // uploading file to given path\n return $fileName;\n }", "public function UploadImage() {\n switch ($this->File['type']):\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/pjpeg':\n $this->Image = imagecreatefromjpeg($this->File['tmp_name']);\n break;\n case 'image/png':\n case 'image/-x-png':\n $this->Image = imagecreatefrompng($this->File['tmp_name']);\n break;\n case 'image/gif':\n $this->Image = imagecreatefromgif($this->File['tmp_name']);\n break;\n endswitch;\n\n if (!$this->Image):\n $this->Result = false;\n $this->Error = 'Tipo de arquivo inválido, envie imagens JPG, PNG ou GIF';\n else:\n $Largura_original = imagesx($this->Image);\n $Altura_original = imagesy($this->Image);\n $Largura_alvo = ($this->Width < $Largura_original ? $this->Width : $Largura_original);\n $Altura_nova = ($Largura_alvo * $Altura_original) / $Largura_original;\n\n $NewImage = imagecreatetruecolor($Largura_alvo, $Altura_nova);\n imagealphablending($NewImage, false);\n imagesavealpha($NewImage, true);\n imagecopyresampled($NewImage, $this->Image, 0, 0, 0, 0, $Largura_alvo, $Altura_nova, $Largura_original, $Altura_original);\n\n switch ($this->File['type']):\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/pjpeg':\n imagejpeg($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n case 'image/png':\n case 'image/-x-png':\n imagepng($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n case 'image/gif':\n imagegif($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n endswitch;\n\n if (!$NewImage):\n $this->Result = false;\n $this->Error = 'Tipo de arquivo inválido, envie imagem nos formatos, jpg, png ou gif';\n else:\n $this->Result = $this->Send . $this->Name;\n $this->Error = null;\n\n endif;\n\n imagedestroy($this->Image);\n imagedestroy($NewImage);\n endif;\n }", "public function copy($source) {}", "function upload_image()\n {\n $file = $this->request->getFile('image');\n $fileName = $file->getRandomName();\n $file->move('./assets/img/beranda/post/inside', $fileName);\n echo base_url('assets/img/beranda/post/inside') . '/' . $fileName;\n }", "public function copyImageToMediaDirectory($sampleFilePath, $mediaPath)\n {\n try {\n $imagePath = $sampleFilePath;\n $newPath = $mediaPath;\n $ext = '.png';\n $newName = $newPath.\"/wk-mp-ads-image\".$ext;\n $copied = copy($imagePath, $newName);\n } catch (\\Exception $e) {\n $this->_logger->critical($e->getMessage());\n }\n }", "function upload_activity_image() {\n if ($_FILES['activity_image']['size'] > 0) {\n $dir = '../images/activity_images';\n $filename1 = $_FILES['activity_image']['name'];\n $srcfile = $_FILES['activity_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "function upload_image ()\n\t{\n\t\tif (!isset($_FILES) || empty($_FILES))\n\t\t\treturn \"img/noImage.jpg\";\n\n\t\t$extentions = array(\"jpg\",\"jpeg\",\"gif\",\"png\");\n\t\t$filetypes = array(\"image/gif\",\"image/jpeg\",\"image/png\",\"image/pjpeg\");\n\n\t\t$extracted_ext = explode(\".\",$_FILES[\"file\"][\"name\"]);\n\t\t$extracted_ext = end($extracted_ext);\n\n\t\tif (!in_array($_FILES[\"file\"][\"type\"], $filetypes) || !in_array($extracted_ext, $extentions))\n\t\t\treturn \"img/noImage.jpg\";\n\n\t\tif (file_exists(\"img/\".$_FILES[\"file\"][\"name\"]))\n\t\t\treturn \"img/\" . $_FILES[\"file\"][\"name\"];\n\n\t\tmove_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"img/\".$_FILES[\"file\"][\"name\"]);\n\n\t\treturn \"img/\" . $_FILES[\"file\"][\"name\"];\n\t}", "function imageHandler($parametre){\r\n $type = end(explode(\".\", $parametre['name']));\r\n $name = explode(\".\", $parametre['name'])[0];\r\n $path = $parametre['tmp_name'];\r\n $newPath = \"C:\\\\xampp\\htdocs\\Kit-up\\assets\\books\\sales\";\r\n // echo $newPath;\r\n $allow = ['jpg', 'jpeg', 'png'];\r\n $newName = \"\";\r\n if(in_array($type,$allow)){\r\n $newName = md5(uniqid(mt_rand(), true)) . \".\" . $type;\r\n move_uploaded_file($path, $newPath.'\\\\'.$newName);\r\n return $newPath.'\\\\'.$newName ;\r\n }else{\r\n echo \"Sorry. Not supported type!\";\r\n }\r\n }", "function save_image($inPath,$outPath)\n{ //Download images from remote server \n echo sprintf(\"FROM: %s TO ===> %s <br />\", $inPath, $outPath);\n \n /*\n $in=fopen($inPath, \"rb\");\n $out=fopen($outPath, \"wb\");\n while ($chunk = fread($in,8192))\n {\n $res = fwrite($out, $chunk, 8192);\n var_dump($res); \n }\n fclose($in);\n fclose($out);\n */\n\n $ch = curl_init($inPath);\n $fp = fopen($outPath, 'wb');\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_exec($ch);\n curl_close($ch);\n fclose($fp); \n}", "private function grabImage( $_image_src, $_file_name = NULL ) {\n\t\t$_final_name = NULL; $_ext = NULL;\n\t\tif( $_image_src == NULL ) {\n\t\t\treturn NULL;\t\t\t\n\t\t}\n\t\t$_final_name = strtolower( end( explode( '/', $_image_src ) ) );\n\t\tif( $_file_name === NULL ) {\n\t\t\t/* 'Img'.date( \"YmdHis\" ).'.'.$_ext */\n\t\t\t$_file_name = $_final_name;\n\t\t}\n\t\tif( in_array( $_file_name, self::$_accompImg ) ) {\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t$_ext = strtolower( end( explode( '.', $_image_src ) ) );\t\t\n\t\tif( ! in_array( $_ext, self::$_imgAccept ) ) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( ! is_dir( self::$_savePath ) ) {\n\t\t\tmkdir( self::$_savePath, 0777 );\n\t\t}\n\t\tif( ! is_readable( self::$_savePath ) ) {\n\t\t\tchmod( self::$_savePath, 0777 );\n\t\t}\n\t\t\n\t\t$_Length = count( self::$_accompImg );\n\t\t$_prefix = isset( self::$_CapSite['partition_name'] ) ? self::$_CapSite['partition_name'] : '';\n\t\t$_dir = self::$_savePath.$_prefix.( intval( $_Length / self::$_CapSite['dir_file_limit'] ) ).DIRECTORY_SEPARATOR;\n\t\tif( file_exists( $_dir ) === FALSE ) {\n\t\t\tmkdir( $_dir, 0777 );\n\t\t}\n\t\t$_file_path = $_dir.$_file_name;\n\t\t\n\t\t$this->_mark = FALSE;\n\t\t\n\t\tob_start();\n\t\treadfile( $_image_src );\n\t\t$_img = ob_get_contents();\n\t\tob_end_clean();\n\t\t$_size = strlen( $_img );\n\t\t\n\t /**\n\t\t * equals:\n\t\t * \t $_fp = fopen( $_file_path, 'wb' );\n\t\t * $_return_size = fwrite( $_fp, $_img, $_size );\n\t\t * fclose( $_fp );\n\t\t */ \n\t\t$_return_size = OperateFile::setText( $_file_path, $_img );\n\t\t\n\t\tif( $_return_size === $_size ) {\n\t\t\t$this->_mark = TRUE; \n\t\t}\n\t\t\n\t\tself::$_accompImg[] = $_file_name;\n\t\tif( count( self::$_accompImg ) % self::$_CapSite['serialize_img_size'] == 0 ) {\n\t\t\tOperateFile::setText( self::$_Config['accompImg'], serialize( self::$_accompImg ) );\n\t\t}\n\t\t\n\t\treturn $_file_path;\n\t}", "function upload_image($path,$name,$tmp){\n\t\t$target_path = $path . basename($name); \n\t\tif(move_uploaded_file($tmp, $target_path)){\n\t\t\treturn true;\n\t\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t\t}\n\t}", "function move_uploaded_file($filename, $destination)\n{\n return copy($filename, $destination);\n}", "function save_image($inPath,$outPath)\n{\n $in= fopen($inPath, \"rb\");\n $out= fopen($outPath, \"wb\");\n while ($chunk = fread($in,8192))\n {\n fwrite($out, $chunk, 8192);\n }\n fclose($in);\n fclose($out);\n}", "function upload_testimonial_image() {\n if ($_FILES['testimonial_image']['size'] > 0) {\n $dir = '../images/testimonial_images';\n $filename1 = $_FILES['testimonial_image']['name'];\n $srcfile = $_FILES['testimonial_image']['tmp_name'];\n $targetfile = $dir . '/' . $filename1;\n if (move_uploaded_file($srcfile, $targetfile)) {\n return $filename1;\n } else {\n return $filename1;\n }\n }\n }", "function rex_com_mediaccess_copyfile($file, $source, $target)\n{\n global $REX;\n\n if(!rex_is_writable($target))\n {\n echo rex_warning('Keine Schreibrechte für das Verzeichnis \"'.$target.'\" !');\n return false;\n }\n\n if(!is_file($source.$file))\n {\n echo rex_warning('Datei \"'.$source.$file.'\" ist nicht vorhanden und kann nicht kopiert werden!');\n return false;\n }\n\n if(is_file($target.$file))\n {\n if(!rename($target.$file,$target.date(\"d.m.y_H.i.s_\").$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht umbenannt werden!');\n return false;\n }\n }\n\n if(!copy($source.$file,$target.$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht geschrieben werden!');\n return false;\n }\n\n if(!chmod($target.$file,$REX['FILEPERM']))\n {\n echo rex_warning('Rechte für \"'.$target.$file.'\" konnten nicht gesetzt werden!');\n return false;\n }\n\n echo rex_info('Datei \"'.$target.$file.'\" wurde erfolgreich angelegt.');\n return true;\n}", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function cropAvatarAction()\n {\n // TODO: swap web dir to product path\n //$imgRealPath = '/Users/leonqiu/www/choumei.me/Symfony/web/' . $_POST['imageSource'];\n $imgRealPath = dirname(__FILE__) . '/../../../../web/' . $_POST['imageSource'];\n list($width, $height) = getimagesize($imgRealPath);\n \n $viewPortW = $_POST[\"viewPortW\"];\n\t $viewPortH = $_POST[\"viewPortH\"];\n $pWidth = $_POST[\"imageW\"];\n $pHeight = $_POST[\"imageH\"];\n $tmp = explode(\".\",$_POST[\"imageSource\"]);\n $ext = end(&$tmp);\n $function = $this->returnCorrectFunction($ext);\n //$image = $function($_POST[\"imageSource\"]);\n $image = $function($imgRealPath);\n $width = imagesx($image);\n $height = imagesy($image);\n \n // Resample\n $image_p = imagecreatetruecolor($pWidth, $pHeight);\n $this->setTransparency($image,$image_p,$ext);\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $pWidth, $pHeight, $width, $height);\n\t\timagedestroy($image);\n\t\t$widthR = imagesx($image_p);\n\t\t$hegihtR = imagesy($image_p);\n\t\t\n\t\t$selectorX = $_POST[\"selectorX\"];\n\t\t$selectorY = $_POST[\"selectorY\"];\n\t\t\n\t\tif($_POST[\"imageRotate\"]){\n\t\t $angle = 360 - $_POST[\"imageRotate\"];\n\t\t $image_p = imagerotate($image_p,$angle,0);\n\t\t \n\t\t $pWidth = imagesx($image_p);\n\t\t $pHeight = imagesy($image_p);\n\t\t \n\t\t //print $pWidth.\"---\".$pHeight;\n\t\t\n\t\t $diffW = abs($pWidth - $widthR) / 2;\n\t\t $diffH = abs($pHeight - $hegihtR) / 2;\n\t\t \n\t\t $_POST[\"imageX\"] = ($pWidth > $widthR ? $_POST[\"imageX\"] - $diffW : $_POST[\"imageX\"] + $diffW);\n\t\t $_POST[\"imageY\"] = ($pHeight > $hegihtR ? $_POST[\"imageY\"] - $diffH : $_POST[\"imageY\"] + $diffH);\n\t\t\n\t\t \n\t\t}\n\t\t\n\t\t$dst_x = $src_x = $dst_y = $dst_x = 0;\n\t\t\n\t\tif($_POST[\"imageX\"] > 0){\n\t\t $dst_x = abs($_POST[\"imageX\"]);\n\t\t}else{\n\t\t $src_x = abs($_POST[\"imageX\"]);\n\t\t}\n\t\tif($_POST[\"imageY\"] > 0){\n\t\t $dst_y = abs($_POST[\"imageY\"]);\n\t\t}else{\n\t\t $src_y = abs($_POST[\"imageY\"]);\n\t\t}\n\t\t\n\t\t\n\t\t$viewport = imagecreatetruecolor($_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t$this->setTransparency($image_p,$viewport,$ext);\n\t\t\n\t\timagecopy($viewport, $image_p, $dst_x, $dst_y, $src_x, $src_y, $pWidth, $pHeight);\n\t\timagedestroy($image_p);\n\t\t\n\t\t\n\t\t$selector = imagecreatetruecolor($_POST[\"selectorW\"],$_POST[\"selectorH\"]);\n\t\t$this->setTransparency($viewport,$selector,$ext);\n\t\timagecopy($selector, $viewport, 0, 0, $selectorX, $selectorY,$_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t\n\t\t//$file = \"tmp/test\".time().\".\".$ext;\n\t\t// TODO: generate file name\n\t\t$fileName = uniqid() . \".\" . $ext;\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$avatarFile = dirname(__FILE__).'/../../../../web/uploads/avatar/'.$user->getId(). '/' .$fileName;\n\t\t$avatarUrl = '/uploads/avatar/'. $user->getId() . '/' . $fileName;\n\t\t$this->parseImage($ext,$selector,$avatarFile);\n\t\timagedestroy($viewport);\n\t\t//Return value\n\t\t//update avatar\n $em = $this->getDoctrine()->getEntityManager();\n $user->setAvatar($avatarUrl);\n $em->persist($user);\n $em->flush();\n\t\techo $avatarUrl;\n\t\texit;\n }", "public function ieditor_crop ($sImagePath){\n\n\t\t\tclearstatcache();\n\t\t\t$iSelectionLeft = intval(getRequest('x1')) ? intval(getRequest('x1')) : 0;\n\t\t\t$iSelectionTop = intval(getRequest('y1')) ? intval(getRequest('y1')) : 0;\n\t\t\t$iSelectionWidth = intval(getRequest('width'));\n\t\t\t$iSelectionHeight = intval(getRequest('height'));\n\t\t\t$iScale = floatval(getRequest('scale')) ? floatval(getRequest('scale')) : 1;\n\n\t\t\tif ($iScale < 1) {\n\t\t\t\t$iSelectionLeft = round($iSelectionLeft / $iScale);\n\t\t\t\t$iSelectionTop = round($iSelectionTop / $iScale);\n\t\t\t\t$iSelectionWidth = round($iSelectionWidth / $iScale);\n\t\t\t\t$iSelectionHeight = round($iSelectionHeight / $iScale);\n\t\t\t}\n\n\t\t\t$sNewOriginalImagePath = $this->generateOriginalImagePath(pathinfo($sImagePath), array($iSelectionWidth, $iSelectionHeight, $iSelectionLeft, $iSelectionTop));\n\n\t\t\t$arOriginalImages = $this->findOriginalImages($sImagePath);\n\n\t\t\tif (empty($arOriginalImages)) {\n\t\t\t\t$bCopyResult = @copy($sImagePath, $sNewOriginalImagePath);\n\t\t\t\tif (!$bCopyResult || !file_exists($sNewOriginalImagePath)) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$bRenameResult = @rename($arOriginalImages[0], $sNewOriginalImagePath);\n\t\t\t\tif (!$bRenameResult || !file_exists($sNewOriginalImagePath)) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sTmpImagePath = $this->getIeditorImagesPath(true) . '/__ieditor_tmp';\n\t\t\tif (file_exists($sTmpImagePath)) {\n\t\t\t\t@unlink($sTmpImagePath);\n\t\t\t}\n\n\t\t\t@copy($sNewOriginalImagePath, $sTmpImagePath);\n\t\t\tif (!file_exists($sTmpImagePath)) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * UMIRU CUSTOM - START\n\t\t\t */\n\t\t\ttry {\n\t\t\t\t$oImagemagic = $this->getImageMagic();\n\t\t\t\tif (!$oImagemagic->crop($sNewOriginalImagePath, $iSelectionLeft, $iSelectionWidth, $iSelectionTop, $iSelectionHeight)) {\n\t\t\t\t\tthrow new Exception('Failed to crop image by ImageMagic');\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t/**\n\t\t\t * UMIRU CUSTOM - END\n\t\t\t */\n\n\t\t\t$oImage = new umiImageFile($sNewOriginalImagePath);\n\t\t\ttry {\n\t\t\t\t$oImage->crop($iSelectionLeft, $iSelectionWidth, $iSelectionTop, $iSelectionHeight);\n\t\t\t} catch (coreException $e) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * UMIRU CUSTOM - START\n\t\t\t */\n\t\t\t}\n\t\t\t/**\n\t\t\t * UMIRU CUSTOM - END\n\t\t\t */\n\n\t\t\t@unlink($sImagePath);\n\t\t\t@copy($sNewOriginalImagePath, $sImagePath);\n\t\t\t@unlink($sNewOriginalImagePath);\n\t\t\t@rename($sTmpImagePath, $sNewOriginalImagePath);\n\n\t\t\treturn str_replace(CURRENT_WORKING_DIR, '', $sImagePath);\n\n\t\t}", "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "private function setPostImg() {\n\n // Files needed features\n $fileName = $_FILES['postImg']['name'];\n $tmp_name = $_FILES['postImg']['tmp_name'];\n $fileSize = $_FILES['postImg']['size'];\n $fileError = $_FILES['postImg']['error'];\n $fileType = $_FILES['postImg']['type'];\n\n // Seperating & detecting the Extentions\n $fileExt = explode('.', $fileName);\n // Get the last piece of an array\n $fileActualExt = strtolower(end($fileExt));\n // Extenstions which can be upload\n $allowedExt = array('jpg', 'jpeg', 'png');\n\n if (in_array($fileActualExt, $allowedExt)) {\n if ($fileError == 0 && $fileSize < $this->imgSize) {\n // Create new name \n $fileNewName = uniqid('', true) . \".\" . $fileActualExt;\n $fileDestination = '../assest/img/postUploadImgs/' . $fileNewName;\n $moved = move_uploaded_file($tmp_name, $fileDestination);\n\n // If successfully image was moved\n if ($moved) {\n return $fileNewName;\n } else {\n return false;\n }\n \n } else {\n // Making an alert pop up \n flash('imgSize', 'Image size should not be more than 30mb');\n return false;\n }\n }\n }", "public function copy_file_to_device($local_file_path, $local_file_name, $destination_file_path, $destination_file_name)\r\n\t{\r\n\t\tif ($this->_device_type == 'cisco') {\r\n\r\n\t\t} elseif ($this->_device_type == 'bairos') {\r\n\r\n\t\t} elseif ($this->_device_type == 'directvstb') {\r\n\r\n\t\t} elseif ($this->_device_type == 'routeros') {\r\n\t\t\t\r\n\t\t\t$upload_file = new Thelist_Routeros_command_uploadfile($this, $local_file_path, $local_file_name, $destination_file_path, $destination_file_name);\r\n\t\t\treturn $upload_file->execute();\r\n\r\n\t\t} elseif ($this->_device_type == 'linuxserver') {\r\n\t\t\t\r\n\t\t\t$upload_file = new Thelist_Linuxserver_command_uploadfile($this, $local_file_path, $local_file_name, $destination_file_path, $destination_file_name);\r\n\t\t\treturn $upload_file->execute();\r\n\r\n\t\t} else {\r\n\t\r\n\t\t\t$trace = debug_backtrace();\r\n\t\t\t$method = $trace[0][\"function\"];\r\n\t\r\n\t\t\tthrow new exception(\"\".$method.\" is not defined for \".$this->_device_type.\"\", 1200);\r\n\t\t}\r\n\t}", "function copiar_archivo($tipo,$id_file,$origen,$destino,$id_usuario) {\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$data=$this->datos_archivo_repositorio($id_file);\n\t\t$dir=$this->datos_directorio($destino,$id_usuario);\n\t\t\n\t\t$ssql = \"INSERT INTO repositorio_archivos\n\t\t(file_name,id_directorio,id_palabra,id_imagen,id_simbolo,id_tipo_imagen,fecha_creacion,ruta_file,id_usuario) \n\t\tVALUES ('\".$data['file_name'].\"','$destino','\".$data['id_palabra'].\"','\".$data['id_imagen'].\"','\".$data['id_simbolo'].\"','\".$data['id_tipo_imagen'].\"','\".$data['fecha_creacion'].\"','\".$data['ruta_file'].\"','$id_usuario')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\t$extension = strtolower(substr(strrchr($data['file_name'], \".\"), 1));\n\t\t\t\t\n\t\t\t\tif ($tipo==1) {\t\t\n\t\t\t\t\tcopy ('../../../usuarios/'.$data['ruta_file'].'/'.$data['file_name'],'../../../usuarios/'.$dir['ruta_dir'].'/'.$ultimo_id.'.'.$extension.'');\n\t\t\t\t\t\n\t\t\t\t\t$nombre_archivo=$ultimo_id.'.'.$extension;\n\t\t\t\t\t$directorio=$dir['ruta_dir'];\n\t\t\t\t\t\n\t\t\t\t\t$UpdateRecords = \"UPDATE repositorio_archivos SET file_name='$nombre_archivo', ruta_file='$directorio' WHERE file_id='$ultimo_id'\";\n\t\t\t\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\t$result = mysql_query($UpdateRecords); \t\n\t\t\t\t}\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $ultimo_id;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}" ]
[ "0.6911289", "0.665955", "0.6550622", "0.6444078", "0.64309424", "0.6393903", "0.6331234", "0.625029", "0.6242332", "0.6148443", "0.61207306", "0.60888773", "0.6075748", "0.60580474", "0.60503244", "0.6035944", "0.602541", "0.59552026", "0.59525466", "0.59483725", "0.59213084", "0.59203905", "0.5913673", "0.58719665", "0.5861524", "0.5842998", "0.582157", "0.58162457", "0.58157825", "0.58098865", "0.57907206", "0.57680345", "0.5760625", "0.57334197", "0.57201487", "0.57125455", "0.57115924", "0.5705241", "0.5703661", "0.56997806", "0.56988174", "0.56946284", "0.5686296", "0.5684144", "0.56777", "0.56762815", "0.56692207", "0.566583", "0.56610996", "0.565478", "0.56535476", "0.5645958", "0.56455547", "0.56415415", "0.56334484", "0.5631333", "0.5630954", "0.56307495", "0.5627325", "0.5622118", "0.5618681", "0.56179357", "0.5607473", "0.56060976", "0.5599264", "0.5599264", "0.55976033", "0.55949855", "0.5582197", "0.558152", "0.55781496", "0.5568122", "0.55654824", "0.5563208", "0.55620235", "0.5560776", "0.5555391", "0.5555092", "0.5550259", "0.55501837", "0.5545385", "0.55425876", "0.5540396", "0.55403316", "0.5538843", "0.5538383", "0.55373204", "0.5534735", "0.55343485", "0.5528884", "0.5515964", "0.5511214", "0.55048406", "0.54983765", "0.5496931", "0.5491992", "0.54827327", "0.54817057", "0.54702705", "0.54692876" ]
0.6267914
7
Display a listing of the resource.
public function index() { $ds = AccountService::all(); $gr = DB::table('service_groups')->get(); return view('BE.account.show', compact('ds','gr')); }
{ "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['type_service'] = DB::table("service_types")->select("service_type_id", "service_type_name")->get(); $data['group_service'] = DB::table("service_groups")->select("service_group_id", "service_group_name")->get(); return view('BE.hosting.create',$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) { // store ajax rồi }
{ "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) { // }
{ "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['type_service'] = DB::table("service_types")->select("service_type_id", "service_type_name")->get(); $data['group_service'] = DB::table("service_groups")->select("service_group_id", "service_group_name")->get(); $row = AccountService::find($id); $data['price'] =DB::table('service_price')->where('sku',$row->sku)->get(); return view('BE.account.edit',compact('row'),$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 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 edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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() {\n return view('routes::edit');\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($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 $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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 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($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 \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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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() \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 }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $sp = AccountService::find($id); $fileimg = $request->file('image'); // tạo biến lấy dữ liệu từ input if ($fileimg){ $fileimg = $request->file('image'); // tạo biến lấy dữ liệu từ input $filename = $fileimg->getClientOriginalName(); // lấy tên theo tên gốc của file $pathimg = $fileimg->move(public_path().'/image/', $filename); //chỗ chứa file $sp->account_image = $filename; $sp->name = $request->get('name'); $sp->slug =\Str::slug($request->get('name')); $sp->service_group_id = $request->get('getgroup'); $sp->service_type_id = $request->get('gettype'); $sp->sku = AccountService::find($id)->sku; $sp->display = $request->get('display'); $sp->account_info = $request->get('account_info'); } else{ $sp->name = $request->get('name'); $sp->slug =\Str::slug($request->get('name')); $sp->service_group_id = $request->get('getgroup'); $sp->service_type_id = $request->get('gettype'); $sp->sku = AccountService::find($id)->sku; $sp->display = $request->get('display'); $sp->account_info = $request->get('account_info'); } $prices = $request->get('price'); $times = $request->get('time'); if(isset($prices) && isset($times)){ $value = array_combine($times,$prices); foreach($value as $key => $packs){ $combo = new Price; $combo->service_group_id = $sp->service_group_id; $combo->service_type_id = $sp->service_type_id; $combo->sku = $sp->sku; $combo->service_price = $packs; $combo->service_time = $key; $combo->save(); }} $name = Auth::user()->name; $namedv = $sp->name; $log = new LogAdmin([ 'id_user' => Auth::user()->id, 'task' => " $name sửa cập nhật lại tài khoản $namedv ", ]); $log->save(); $sp->save(); toast('Cập Nhật Tài Khoản Thành Công!','success'); return redirect()->route('account.index'); }
{ "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) { $sp = AccountService::find($id); $sp->delete(); $delprice = DB::table('service_price')->where('sku',$sp->sku)->delete(); alert()->success('Thành công','Đã xóa Tài Khoản'); $name = Auth::user()->name; $namedv = $sp->name; $log = new LogAdmin([ 'id_user' => Auth::user()->id, 'task' => " $name đã xóa tài khoản $namedv ", ]); $log->save(); return redirect()->route('account.index'); }
{ "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
The Simple PHP Blog is released under the GNU Public License. You are free to use and modify the Simple PHP Blog. All changes must be uploaded to SourceForge.net under Simple PHP Blog or emailed to apalmo bigevilbrain com Form Validation Functions
function isInt($value, $empty) { if (strlen($value) == 0) { return $empty; } return preg_match('!^\d+$!', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_blog_form()\n {\n }", "public function validateMakeBlog(){\n\n }", "function validate_blog_signup()\n {\n }", "function publicDefault() {\n\t\n\t\t// if admin rights, redirect to admin page\n\t\tif ($GLOBALS['objUser']->hasAccess(5)) {\n\t\t\tTznUtils::redirect(CMS_WWW_URI.'admin/special.php?module=blog&action=edit&item='.intval($_REQUEST['item']));\n\t\t}\n\t\n\t\t$this->intro = new BlogPostIntro();\n\t\t$this->intro->loadContent($GLOBALS['objPage']->id);\n\t\t\n\t\tif ($this->intro->getOption('member_only') && !$GLOBALS['objUser']->isLoggedIn()) {\n\t\t\n\t\t\t$this->more = new CmsContent();\n\t\t\t$this->more->loadContent($GLOBALS['objPage']->id, 'noaccess');\n\t\t\n\t\t} else {\n\t\t\n\t\t\t// decide submit modes\n\t\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\t\t\n\t\t\t// initialize object content\n\t\t\t$this->content = new ContentBlog();\n\t\t\t\n\t\t\t// load item if editing\n\t\t\tif ($pItemId = intval($_REQUEST['item'])) {\n\t\t\t\t// error_log('editing #'.$pItemId);\n\t\t\t\t$this->content->loadByFilter('contentId='.$pItemId);\n\t\t\t}\n\t\t\t\n\t\t\t// initialize editor\n\t\t\tif ($GLOBALS['confModule']['blog_post']['post_full']) {\n\t\t\t\t$this->content->initAdmin('Full',2);\n\t\t\t} else {\n\t\t\t\t$this->content->initAdmin('Default',1);\n\t\t\t}\n\t\t\t\n\t\t\t$this->success = false;\n\t\t\t\n\t\t\tif ($GLOBALS['objCms']->submitMode) {\n\t\t\t\n\t\t\t\t$this->content->setHttpAuto();\n\t\t\t\tif ($this->content->check()) {\n\t\t\t\t\t$this->content->pageId = $GLOBALS['objPage']->id;\n\t\t\t\t\t$this->content->_join->setDtm('postDate','NOW');\n\t\t\t\t\t$this->content->save();\n\t\t\t\t\t$this->more = new CmsContent();\n\t\t\t\t\t$this->more->loadContent($GLOBALS['objPage']->id, 'confirm');\n\t\t\t\t\t$this->success = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!$this->success) {\n\t\t\t\t// get form labels translations\n\t\t\t\t//include CMS_MODULE_PATH.'blog/language/fr.php';\n\t\t\t\t\n\t\t\t\t// set script for form\n\t\t\t\t$GLOBALS['objHeaders']->add('css','form.css');\n\t\t\t\t$GLOBALS['objHeaders']->add('jsScript','common.js');\n\t\t\t\t$GLOBALS['objHeaders']->add('jsScript','admin.js');\n\t\t\t\t$GLOBALS['objHeaders']->add('jsCalendar',array('cms_begin','cms_end'));\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t$this->setView('public');\n\t\n\t}", "public function saveBlogPost() {\r\n\t\t\r\n\t\t//$this->verifyID($toid);\r\n\t\t$html_tags = '<b><p><br></br><u><ul><li><table><tr><th><td><i>';\r\n\r\n\t\t// controleer of submit gepost is\r\n\t\tif (isset($_POST['admblogsubmit'])) {\r\n\t\t\t\r\n\t\t\t// check: velden voor titel en content zijn niet leeg\r\n\t\t\tif (!empty($_POST[\"admblogtitle\"] && $_POST['admblogcontent'])) {\r\n\r\n\t\t\t\t// schrijf post inputs weg naar variabelen\r\n\t\t\t\t$admblogtitle = strip_tags($_POST[\"admblogtitle\"], $html_tags);\r\n\t\t\t\t$admblogintro = strip_tags($_POST[\"admblogintro\"], $html_tags);\r\n\t\t\t\t$admblogcontent = strip_tags($_POST[\"admblogcontent\"], $html_tags);\r\n\t\t\t\t$admurl = strtolower(preg_replace('/[[:space:]]+/', '-', $_POST['admblogtitle']));\r\n\t\t\t\t\r\n\t\t\t\t// maak PDO connectie om weg te schrijven + set attributes voor error meldingen\r\n\t\t\t\t$stmt = new PDO(\"mysql:host=localhost;dbname=demo\", 'root', '');\r\n\t\t\t\t$stmt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t\t\r\n\t\t\t\t// try query\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\t$query = $stmt->prepare(\"INSERT INTO `evdnl_blog_posts_yc` (create_date, modify_date, title, intro, content, dashedtitle) VALUES(CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '$admblogtitle', '$admblogintro', '$admblogcontent', '$admurl')\");\r\n\t\t\t\t\t\t$query->execute();\r\n\t\t\t\t\t\t$this->createBlogPostFile();\r\n\r\n\t\t\t\t\t\t// sluit PDO connectie\r\n\t\t\t\t\t\t$query = NULL;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t// catch error\r\n\t\t\t\t\tcatch (PDOException $e) {\r\n\t\t\t\t\t\techo $e->getMessage();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "function validate_forms()\r\n{\r\n\tglobal $alert,$db;\r\n\tif($_REQUEST['dont_save']!=1)\r\n\t{\r\n\t\t//Validations\r\n\t\t$alert = '';\r\n\t\t$fieldRequired \t\t= array($_REQUEST['review_author']);\r\n\t\t$fieldDescription \t= array('Review Author');\r\n\t\t$fieldEmail \t\t= array();\r\n\t\t$fieldConfirm \t\t= array();\r\n\t\t$fieldConfirmDesc \t= array();\r\n\t\t$fieldNumeric \t\t= array();\r\n\t\t$fieldNumericDesc \t= array();\r\n\t\t\r\n\t\t\r\n\t\tserverside_validation($fieldRequired, $fieldDescription, $fieldEmail, $fieldConfirm, $fieldConfirmDesc, $fieldNumeric, $fieldNumericDesc);\r\n\t}\r\n}", "function make_form($action) {\n\tswitch ($action) {\n\t\tcase 'add':\n\t\t\t$form_action = '/administrate/blog/add';\n\t\t\t$submit_word = 'Add';\n\t\t\tbreak;\n\n\t\tcase 'edit':\n\t\t\t$form_action = '/administrate/blog/' . $_GET['name'] . '/edit';\n\t\t\t$submit_word = 'Edit';\n\n\t\t\t$sql = \"SELECT * FROM posts WHERE url_title = '\" . mysql_real_escape_string($_GET['name']) . \"' LIMIT 1\";\n\t\t\t$result = mysql_query($sql) or show_mysql_error(mysql_error(), __LINE__);\n\n\t\t\tif (mysql_num_rows($result) == 0) {\n\t\t\t\tdie('This post doesn\\'t exist.');\n\t\t\t}\n\n\t\t\t$blog = mysql_fetch_assoc($result);\n\n\t\t\t$_POST['title'] = $blog['title'];\n\t\t\t$_POST['url_title'] = $blog['url_title'];\n\t\t\t$_POST['content'] = $blog['content_markdown'];\n\t\t\t$_POST['publish'] = $blog['publish'];\n\t\t\tbreak;\n\t}\n\n\t$form = '\n\t\t<form action=\"' . $form_action . '\" method=\"post\">\n\t\t\t<div class=\"form_column\">\n\t\t\t\t<strong>Title</strong><br />\n\t\t\t\t<input type=\"text\" name=\"title\" value=\"' . htmlentities($_POST['title']) . '\" /><br /><br />\n\n\t\t\t\t<strong>URL title</strong><br />\n\t\t\t\t<input type=\"text\" name=\"url_title\" value=\"' . htmlentities($_POST['url_title']) . '\" /><br /><br />\n\n\t\t\t\t<strong>Content</strong><br />\n\t\t\t\t<textarea name=\"content\" rows=\"24\" cols=\"80\">' . htmlentities($_POST['content']) . '</textarea><br /><br />\n\n\t\t\t\t<strong>Publish</strong><br />\n\t\t\t\t<input type=\"checkbox\" name=\"publish\" value=\"1\" ' . ($_POST['publish'] == '1' ? 'checked=\"checked\"' : '') . ' />\n\t\t\t</div>\n\n\t\t\t<div class=\"form_submit\">\n\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"' . $submit_word . ' Post\" />\n\t\t\t</div>\n\t\t</form>\n\t';\n\n\treturn $form;\n}", "function validate_wysiwyg_field($field)\n {\n }", "function ms_deprecated_blogs_file()\n {\n }", "function sb_rcb_blog2html( $inData ){\n $patterns = array(\n \"@(\\r\\n|\\r|\\n)?\\\\[\\\\*\\\\](\\r\\n|\\r|\\n)?(.*?)(?=(\\\\[\\\\*\\\\])|(\\\\[/list\\\\]))@si\",\n\t\t\t\n // [b][/b], [i][/i], [u][/u], [mono][/mono]\n \"@\\\\[b\\\\](.*?)\\\\[/b\\\\]@si\",\n \"@\\\\[i\\\\](.*?)\\\\[/i\\\\]@si\",\n \"@\\\\[u\\\\](.*?)\\\\[/u\\\\]@si\",\n \"@\\\\[mono\\\\](.*?)\\\\[/mono\\\\]@si\",\n\t\t\t\n // [color=][/color], [size=][/size]\n \"@\\\\[color=([^\\\\]\\r\\n]*)\\\\](.*?)\\\\[/color\\\\]@si\",\n \"@\\\\[size=([0-9]+)\\\\](.*?)\\\\[/size\\\\]@si\",\n\t\t\t\n // [quote=][/quote], [quote][/quote], [code][/code]\n \"@\\\\[quote=&quot;([^\\r\\n]*)&quot;\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/quote\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[quote\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/quote\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[code\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/code\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [center][/center], [right][/right], [justify][/justify],\n // [centerblock][/centerblock] (centers a left-aligned block of text)\n \"@\\\\[center\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/center\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[right\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/right\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[justify\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/justify\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[centerblock\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/centerblock\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [list][*][/list], [list=][*][/list]\n \"@\\\\[list\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=1\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=a\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=A\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=i\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=I\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n //\t\t\t\"@(\\r\\n|\\r|\\n)?\\\\[\\\\*\\\\](\\r\\n|\\r|\\n)?([^\\\\[]*)@si\",\n\t\t\t\n // [url=][/url], [url][/url], [email][/email]\n \"@\\\\[url=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/url\\\\]@si\",\n \"@\\\\[url\\\\](.*?)\\\\[/url\\\\]@si\",\n \"@\\\\[urls=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/urls\\\\]@si\",\n \"@\\\\[urls\\\\](.*?)\\\\[/urls\\\\]@si\",\n \"@\\\\[email\\\\](.*?)\\\\[/email\\\\]@si\",\n \"@\\\\[a=([^\\\\]\\r\\n]+)\\\\]@si\",\n\n // [youtube]c6zjwPiOHtg[/youtube]\n \"@\\\\[youtube\\\\](.*?)\\\\[/youtube\\\\]@si\",\n\n \n // using soundcloud's wordpress code\n // [soundcloud url=\"http://api.soundcloud.com/tracks/15220750\" ...]\n \"@\\\\[soundcloud\\s+url=&quot;http://api\\.soundcloud\\.com/tracks/(\\d+)&quot;[^\\]]*\\\\]@si\",\n\n \n // [img][/img], [img=][/img], [clear]\n \"@\\\\[img\\\\](.*?)\\\\[/img\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgl\\\\](.*?)\\\\[/imgl\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgr\\\\](.*?)\\\\[/imgr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[img=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/img\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgl=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/imgl\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgr=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/imgr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[clear\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [hr], \\n\n \"@\\\\[hr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@(\\r\\n|\\r|\\n)@\");\n\t\t\n $replace = array(\n '<li>$3</li>',\n\t\t\t\n\t\t// [b][/b], [i][/i], [u][/u], [mono][/mono]\n '<b>$1</b>',\n '<i>$1</i>',\n '<span style=\"text-decoration:underline\">$1</span>',\n '<span class=\"mono\">$1</span>',\n\t\t\n // [color=][/color], [size=][/size]\n '<span style=\"color:$1\">$2</span>',\n '<span style=\"font-size:$1px\">$2</span>',\n\n // [quote][/quote], [code][/code]\n '<div class=\"quote\"><span style=\"font-size:0.9em;font-style:italic\">$1 wrote:<br /><br /></span>$3</div>',\n '<div class=\"quote\">$2</div>',\n '<div class=\"code\">$2</div>',\n\t\t\t\n // [center][/center], [right][/right], [justify][/justify],\n // [centerblock][/centerblock]\n '<div style=\"text-align:center\">$2</div>',\n '<div style=\"text-align:right\">$2</div>',\n '<div style=\"text-align:justify\">$2</div>',\n '<CENTER><TABLE BORDER=0><TR><TD>$2</TD></TR></TABLE></CENTER>',\n\t\t\t\n // [list][*][/list], [list=][*][/list]\n '<ul>$2</ul>',\n '<ol style=\"list-style-type:decimal\">$2</ol>',\n '<ol style=\"list-style-type:lower-alpha\">$2</ol>',\n '<ol style=\"list-style-type:upper-alpha\">$2</ol>',\n '<ol style=\"list-style-type:lower-roman\">$2</ol>',\n '<ol style=\"list-style-type:upper-roman\">$2</ol>',\n //\t\t\t'<li />',\n\t\t\t\n // [url=][/url], [url][/url], [email][/email]\n '<a href=\"$1\" rel=\"external\">$2</a>',\n '<a href=\"$1\" rel=\"external\">$1</a>',\n '<a href=\"$1\">$2</a>',\n '<a href=\"$1\">$1</a>',\n '<a href=\"mailto:$1\">$1</a>',\n '<a name=\"$1\"></a>',\n\n // [youtube]c6zjwPiOHtg[/youtube]\n '<iframe width=\"560\" height=\"349\" '.\n 'src=\"http://www.youtube.com/embed/$1\" '.\n 'frameborder=\"0\" allowfullscreen></iframe>',\n\n // [soundcloud url=\"http://api.soundcloud.com/tracks/15220750\" ...]\n // where $1 is the track code, extracted above\n '<object height=\"81\" width=\"100%\"> <param name=\"movie\" value=\"http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&amp;show_comments=false&amp;auto_play=false&amp;color=ff7700\"></param> <param name=\"allowscriptaccess\" value=\"always\"></param> <embed allowscriptaccess=\"always\" height=\"81\" src=\"http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&amp;show_comments=false&amp;auto_play=false&amp;color=ff7700\" type=\"application/x-shockwave-flash\" width=\"100%\"></embed> </object>',\n\n \n // [img][/img], [img=][/img], [clear]\n '<center><img border=0 src=\"$1\" alt=\"$1\" /></center>',\n '<img border=0 align=\"left\" src=\"$1\" alt=\"$1\" />',\n '<img border=0 align=\"right\" src=\"$1\" alt=\"$1\" />',\n '<img border=0 src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<img border=0 align=\"left\" src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<img border=0 align=\"right\" src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<div style=\"clear:both\"></div>',\n\t\t\t\n // [hr], \\n\n '<hr />',\n '<br />');\n return preg_replace($patterns, $replace, $inData );\n }", "function acf_validate_save_post()\n {\n }", "function acf_validate_save_post()\n {\n }", "function acf_validate_save_post()\n {\n }", "function acf_validate_save_post()\n {\n }", "function commentFormFields() {\n \tglobal $LePress;\n \t$current_user = wp_get_current_user();\n \t/* Return false if not multisite OR current_user is blog owner */\n \tif(!is_multisite() || $LePress->getBlogOwnerUser()->ID == $current_user->ID) { return false; }\n \t\n \t/* Otherwise carry on */\n \t$post = get_queried_object();\n \t$cat_ID_found = 0;\n \t$post_cat_url = '';\n \tif($post && $post->post_type == 'post') {\n \t\t$cats = wp_get_post_categories($post->ID);\n \t\tforeach($cats as $cat_ID) {\n \t\t\t$course_meta = new CourseMeta($cat_ID);\n \t\t\tif($course_meta->getIsCourse()) {\n \t\t\t\t$cat_ID_found = $cat_ID;\n \t\t\t\t$post_cat_url = get_category_link($cat_ID_found);\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \t\n \t/* Category ID found, let's move forward */\n \tif($cat_ID_found > 0) {\n \t\tif($course_meta->getStudentSubscriptionByEmail($current_user->user_email)) {\n \t\t\t$comment = $LePress->fetchComment($post->ID, $current_user->user_email, 'LePressStudent');\n\t\t\t\t$meta_data = get_post_meta($post->ID, '_lepress-student-'.md5($post->ID.$current_user->user_email), true);\n\t\t\t\tif(!$comment) {\n\t\t\t\t\techo '<p><strong>LePress</strong></p>';\n\t\t\t\t\trequire_once('student_include/class-my_subscriptions.php');\n\t\t\t\t\t$user_blogs = get_blogs_of_user($current_user->ID);\n\t\t\t\t\tglobal $blog_id;\n\t\t\t\t\t$current_blog_id = $blog_id;\n\t\t\t\t\t$found_blog = false;\n\t\t\t\t\t//Iterate through all the user's blogs\n\t\t\t\t\tforeach($user_blogs as $blog) {\n\t\t\t\t\t\tswitch_to_blog($blog->userblog_id);\n\t\t\t\t\t\tif($LePress->isStudentFeatures()) {\n\t\t\t\t\t\t\t//Let's check, if this is the one blog, where student is subscribed also\n\t\t\t\t\t\t\t$subscriptions = new StudentSubscriptions();\n\t\t\t\t\t\t\t$course_found = $subscriptions->getActiveCourseByURL($post_cat_url);\n\t\t\t\t\t\t\t//We have found the blog with specified course, break the foreach cycle\n\t\t\t\t\t\t\tif($course_found) {\n\t\t\t\t\t\t\t\t$found_blog = $blog;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//Revert to current blog\n\t\t\t\t\tswitch_to_blog($current_blog_id);\n\t\t\t\t\tif($found_blog) {\n\t\t\t\t\t\techo '<p>'.sprintf(__('You are trying to post a comment into LePress assignment post. Please note that you still haven\\'t submitted your work. If you like to submit your work, please submit it %s; you will be redirected to your LePress dashboard.', lepress_textdomain), '<a href=\"'.add_query_arg(array('p' => $post->ID, 'c' => $course_found->ID), $found_blog->siteurl.'/wp-admin/post-new.php').'\">'.__('clicking here', lepress_textdomain).'</a>', '<a href=\"'.$found_blog->siteurl.'\">'.$found_blog->blogname.'</a>').'</p>';\n\t\t\t\t\t\techo '<p>'.sprintf(__('Assignment deadline: %s', lepress_textdomain), $LePress->date_i18n_lepress(strtotime(get_post_meta($post->ID, '_lepress-assignment-end-date', true)))).'</p>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "function blog() {\n\n\t$labels = array(\n\t\t'name' => _x( 'blogs', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'blog', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'blog', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'blog', 'text_domain' ),\n\t\t'description' => __( 'Post Type Description', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'blog', $args );\n\n}", "function check_content(){\r\n if(!(strlen($_POST['first_name']) > 0 && strlen($_POST['last_name']) > 0 && strlen($_POST['email']) > 0 && strlen($_POST['headline']) > 0 && strlen($_POST['summary']) > 0)){\r\n\treturn 'All fields are required';\r\n }\r\n for($i = 1; $i<10 ; $i++ ){\r\n\tif(isset($_POST['year'.$i])){\r\n\t error_log('$_POST[year'.$i.']: '.$_POST['year'.$i]);\r\n\t if(strlen($_POST['year'.$i]) == 0){\r\n\t\treturn 'All fields are required';\r\n\t }\r\n\t if(!is_numeric($_POST['year'.$i])){\r\n\t\treturn 'Year must be a number';\r\n\t }\r\n\t}\r\n\tif(isset($_POST['desc'.$i]) && strlen($_POST['desc'.$i]) == 0){\r\n\t error_log('$_POST[desc'.$i.']: '.$_POST['desc'.$i]);\r\n\t return 'All fields are required';\r\n\t}\r\n\tif(isset($_POST['edu_year'.$i])){\r\n\t error_log('$_POST[edu_year'.$i.']: '.$_POST['edu_year'.$i]);\r\n\t if(strlen($_POST['edu_year'.$i]) == 0){\r\n\t\treturn 'All fields are required';\r\n\t }\r\n\t if(!is_numeric($_POST['edu_year'.$i])){\r\n\t\treturn 'Year must be a number';\r\n\t }\r\n\t}\r\n\tif(isset($_POST['edu_school'.$i]) && strlen($_POST['edu_school'.$i]) == 0){\r\n\t error_log('$_POST[edu_school'.$i.']: '.$_POST['edu_school'.$i]);\r\n\t return 'All fields are required';\r\n\t}\r\n }\r\n if(strpos($_POST['email'], '@') === false){\r\n\treturn 'Email address must contain @';\r\n }\r\n return true;\r\n}", "public function run () {\n $session = Session::getInstance ();\n $user = $session->getUser ();\n\n if (!$user || !$user->isAdmin ()) {\n $session->setMessage (\"Do not have permission to access\", Session::MESSAGE_ERROR);\n header (\"Location: \" . BASE_URL);\n return;\n }\n \n $form_errors = array ();\n $form_values = array (\"title\" => \"\", \"content\" => \"\", \"postDate\" => \"\", \"published\" => \"\", \"tags\" => \"\");\n $articleDAO = ArticleDAO::getInstance ();\n $tagDAO = ArticleTagDAO::getInstance ();\n\n if (!empty ($_POST)) {\n $form_values[\"title\"] = isset ($_POST[\"title\"]) ? trim ($_POST[\"title\"]) : \"\";\n $form_values[\"content\"] = isset ($_POST[\"content\"]) ? trim ($_POST[\"content\"]) : \"\";\n $form_values[\"postDate\"] = isset ($_POST[\"postDate\"]) ? trim ($_POST[\"postDate\"]) : \"\";\n $form_values[\"published\"] = isset ($_POST[\"published\"]) ? trim ($_POST[\"published\"]) : \"\";\n $form_values[\"tags\"] = isset ($_POST[\"tags\"]) ? trim ($_POST[\"tags\"]) : \"\";\n\n if (empty ($form_values[\"title\"])) {\n $form_errors[\"title\"] = \"No title specified\";\n }\n if (empty ($form_values[\"content\"])) {\n $form_errors[\"content\"] = \"No content specified\";\n }\n if (empty ($form_values[\"postDate\"])) {\n $form_errors[\"postDate\"] = \"No post date specified\";\n }\n else if (strtotime ($_POST[\"postDate\"]) == 0) {\n $form_errors[\"postDate\"] = \"An invalid post date was specified\";\n $form_values[\"postDate\"] = \"\";\n }\n if ($form_values[\"published\"] != \"true\" && $form_values[\"published\"] != \"false\") {\n $form_errors[\"published\"] = \"Invalid published choice\";\n }\n\n if (empty ($form_errors)) {\n $article = new Article ();\n $article->setTitle ($form_values[\"title\"]);\n $article->setContent ($form_values[\"content\"]);\n $article->setPostDate (strtotime ($form_values[\"postDate\"]));\n $article->setUpdateDate (0);\n $published = ($form_values[\"published\"] == \"true\") ? 1: 0;\n $article->setPublished ($published);\n $article->setUserId ($user->id);\n //$article->setTags ($form_values[\"tags\"]);\n $sorted_tag_array = ArticleTag::tagsFromString ($form_values[\"tags\"]);\n $sorted_tags = implode (\" \", $sorted_tag_array);\n $article->setTags ($sorted_tags);\n\n if ($articleDAO->insert ($article)) {\n $tagDAO->updateTags ($article);\n $session->setMessage (\"Article details saved\");\n header (\"Location: edit_article.php?id={$article->id}\");\n return;\n }\n else {\n $session->setMessage (\"Article details could not be saved\", Session::MESSAGE_ERROR);\n }\n \n }\n }\n\n $this->template->render (array (\n \"title\" => \"Create Article\",\n \"extra_header\" => joinPath (\"headers\", \"jscal_header_tpl.php\"),\n \"main_page\" => \"create_article_tpl.php\",\n \"session\" => $session,\n \"form_errors\" => $form_errors,\n \"form_values\" => $form_values,\n ));\n }", "function thinkup_input_blogmeta() {\n\n// Get theme options values.\n$thinkup_blog_date = thinkup_var ( 'thinkup_blog_date' );\n$thinkup_blog_author = thinkup_var ( 'thinkup_blog_author' );\n$thinkup_blog_comment = thinkup_var ( 'thinkup_blog_comment' );\n$thinkup_blog_category = thinkup_var ( 'thinkup_blog_category' );\n$thinkup_blog_tag = thinkup_var ( 'thinkup_blog_tag' );\n\n\t\tif ( $thinkup_blog_date !== '1' or \n\t\t\t$thinkup_blog_author !== '1' or \n\t\t\t$thinkup_blog_comment !== '1' or \n\t\t\t$thinkup_blog_category !== '1' or \n\t\t\t$thinkup_blog_tag !== '1') {\n\n\t\t\techo '<div class=\"entry-meta\">';\n\t\t\t\tif ( is_sticky() && is_home() && ! is_paged() ) { thinkup_input_sticky(); }\n\n\t\t\t\tif ($thinkup_blog_date !== '1') { thinkup_input_blogdate(); }\n\t\t\t\tif ($thinkup_blog_author !== '1') { thinkup_input_blogauthor(); }\n\t\t\t\tif ($thinkup_blog_category !== '1') { thinkup_input_blogcategory(); }\n\t\t\t\tif ($thinkup_blog_tag !== '1') { thinkup_input_blogtag(); }\n\t\t\t\tif ($thinkup_blog_comment !== '1') { thinkup_input_blogcomment(); }\n\t\t\techo '</div>';\n\t\t}\n}", "function wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta = array())\n {\n }", "function ms_deprecated_blogs_file() {}", "function update_blog_public($old_value, $value)\n {\n }", "function validate_save_post()\n {\n }", "function handle_basic_posting_data($check = false, $page = 'blog', $mode = 'add')\n{\n\tglobal $auth, $blog_attachment, $blog_id, $config, $db, $template, $user, $phpbb_root_path, $phpEx, $category_ary;\n\n\t$submit = (isset($_POST['submit'])) ? true : false;\n\t$preview = (isset($_POST['preview'])) ? true : false;\n\t$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise'])) ? true : false;\n\t$submitted = ($submit || $preview || $refresh) ? true : false; // shortcut for any of the 3 above\n\n\tif ($check)\n\t{\n\t\t$error = array();\n\n\t\t// check the captcha\n\t\tif ($mode == 'add')\n\t\t{\n\t\t\tif (!handle_captcha('check'))\n\t\t\t{\n\t\t\t\t$error[] = $user->lang['CONFIRM_CODE_WRONG'];\n\t\t\t}\n\t\t}\n\n\t\t// check the form key\n\t\tif (!check_form_key('postform'))\n\t\t{\n\t\t\t$error[] = $user->lang['FORM_INVALID'];\n\t\t}\n\n\t\treturn $error;\n\t}\n\telse\n\t{\n\t\t$above_subject = $above_message = $above_submit = $panel_data = '';\n\n\t\t$panels = array(\n\t\t\t'options-panel'\t\t\t=> $user->lang['OPTIONS'],\n\t\t);\n\n\t\tif ($page == 'blog')\n\t\t{\n\t\t\t$category_list = make_category_select($category_ary);\n\n\t\t\tif ($category_list)\n\t\t\t{\n\t\t\t\t$panels['categories-panel'] = $user->lang['CATEGORIES'];\n\t\t\t}\n\n\t\t\t$panels['poll-panel'] = $user->lang['ADD_POLL'];\n\n\t\t\tif ($user->data['is_registered'])\n\t\t\t{\n\t\t\t\t// Build permissions box\n\t\t\t\tpermission_settings_builder(true, $mode);\n\t\t\t\t$panels['permissions-panel'] = $user->lang['PERMISSIONS'];\n\t\t\t}\n\n\t\t\t// Some variables\n\t\t\t$template->assign_vars(array(\n\t\t\t\t'CATEGORY_LIST'\t\t\t\t=> $category_list,\n\n\t\t\t\t'S_CAT_0_SELECTED'\t\t\t=> (is_array($category_ary) && in_array(0, $category_ary)),\n\t\t\t\t'S_SHOW_POLL_BOX'\t\t\t=> true,\n\t\t\t));\n\t\t}\n\n\t\tif ($mode == 'add')\n\t\t{\n\t\t\t// setup the captcha\n\t\t\thandle_captcha('build');\n\t\t}\n\n\t\t// Subscriptions\n\t\tif ($config['user_blog_subscription_enabled'] && $user->data['is_registered'])\n\t\t{\n\t\t\t$panels['subscriptions-panel'] = $user->lang['SUBSCRIPTION'];\n\n\t\t\t$subscription_types = get_blog_subscription_types();\n\t\t\t$subscribed = array();\n\n\t\t\tif ($page == 'blog' && $mode == 'add' && !$submitted)\n\t\t\t{\n\t\t\t\t// check default subscription settings from user_settings\n\t\t\t\tglobal $user_settings;\n\t\t\t\tget_user_settings($user->data['user_id']);\n\n\t\t\t\tif (isset($user_settings[$user->data['user_id']]))\n\t\t\t\t{\n\t\t\t\t\tforeach ($subscription_types as $type => $name)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Bitwise check\n\t\t\t\t\t\tif ($user_settings[$user->data['user_id']]['blog_subscription_default'] & $type)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$subscribed[$type] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!$submitted)\n\t\t\t{\n\t\t\t\t// check set subscription settings\n\t\t\t\t$sql = 'SELECT * FROM ' . BLOGS_SUBSCRIPTION_TABLE . '\n\t\t\t\t\tWHERE sub_user_id = ' . $user->data['user_id'] . '\n\t\t\t\t\t\tAND blog_id = ' . intval($blog_id);\n\t\t\t\t$result = $db->sql_query($sql);\n\t\t\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t\t\t{\n\t\t\t\t\t$subscribed[$row['sub_type']] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($subscription_types as $type => $name)\n\t\t\t{\n\t\t\t\t$template->assign_block_vars('subscriptions', array(\n\t\t\t\t\t'TYPE'\t\t=> 'subscription_' . $type,\n\t\t\t\t\t'NAME'\t\t=> ((isset($user->lang[$name])) ? $user->lang[$name] : $name),\n\t\t\t\t\t'S_CHECKED'\t=> ((($submitted && request_var('subscription_' . $type, false)) || isset($subscribed[$type])) ? true : false),\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t// Attachments\n\t\t$attachment_data = $blog_attachment->attachment_data;\n\t\t$filename_data = $blog_attachment->filename_data;\n\t\t$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || @ini_get('file_uploads') == '0' || !$config['allow_attachments'] || !$auth->acl_get('u_attach')) ? '' : ' enctype=\"multipart/form-data\"';\n\t\tposting_gen_inline_attachments($attachment_data);\n\t\tif (($auth->acl_get('u_blogattach')) && $config['allow_attachments'] && $form_enctype)\n\t\t{\n\t\t\t$allowed_extensions = $blog_attachment->obtain_blog_attach_extensions();\n\n\t\t\tif (sizeof($allowed_extensions['_allowed_']))\n\t\t\t{\n\t\t\t\t$blog_attachment->posting_gen_attachment_entry($attachment_data, $filename_data);\n\n\t\t\t\t$panels['attach-panel'] = $user->lang['ADD_ATTACHMENT'];\n\t\t\t}\n\t\t}\n\n\t\t// Add the forum key\n\t\tadd_form_key('postform');\n\n\t\t// Generate smiley listing\n\t\tgenerate_smilies('inline', false);\n\n\t\t// Build custom bbcodes array\n\t\tdisplay_custom_bbcodes();\n\n\t\t$temp = compact('page', 'mode', 'panels', 'panel_data', 'above_subject', 'above_message', 'above_submit');\n\t\tblog_plugins::plugin_do_ref('function_handle_basic_posting_data', $temp);\n\t\textract($temp);\n\n\t\t$template->assign_vars(array(\n\t\t\t'EXTRA_ABOVE_SUBJECT'\t\t=> $above_subject,\n\t\t\t'EXTRA_ABOVE_MESSAGE'\t\t=> $above_message,\n\t\t\t'EXTRA_ABOVE_SUBMIT'\t\t=> $above_submit,\n\t\t\t'EXTRA_PANELS'\t\t\t\t=> $panel_data,\n\t\t\t'JS_PANELS_LIST'\t\t\t=> \"'\" . implode(\"', '\", array_keys($panels)) . \"'\",\n\n\t\t\t'UA_PROGRESS_BAR'\t\t\t=> append_sid(\"{$phpbb_root_path}posting.$phpEx\", \"mode=popup\", false),\n\n\t\t\t'S_BLOG'\t\t\t\t\t=> ($page == 'blog') ? true : false,\n\t\t\t'S_REPLY'\t\t\t\t\t=> ($page == 'reply') ? true : false,\n\t\t\t'S_CLOSE_PROGRESS_WINDOW'\t=> (isset($_POST['add_file'])) ? true : false,\n\t\t\t'S_FORM_ENCTYPE'\t\t\t=> $form_enctype,\n\t\t));\n\n\t\tforeach ($panels as $name => $title)\n\t\t{\n\t\t\t$template->assign_vars(array(\n\t\t\t\t'S_' . strtoupper(str_replace('-', '_', $name))\t\t=> true,\n\t\t\t));\n\t\t\t$template->assign_block_vars('panel_list', array(\n\t\t\t\t'NAME'\t\t=> $name,\n\t\t\t\t'TITLE'\t\t=> $title,\n\t\t\t));\n\t\t}\n\t}\n}", "public static function validationBlog($request)\n {\n $request->validate([\n 'name' => 'required',\n 'title' => 'required',\n 'info' => 'required',\n 'description' => 'required',\n 'author' => 'required',\n 'status' => 'required',\n ], [\n 'name.required' => config('langVN.validation.article.name.required'),\n 'title.required' => config('langVN.validation.article.title.required'),\n 'info.required' => config('langVN.validation.article.info.required'),\n 'description.required' => config('langVN.validation.article.description.required'),\n 'author.required' => config('langVN.validation.article.author.required'),\n 'status.required' => config('langVN.validation.article.status.required'),\n ]);\n }", "public static function run () {\n\t\t\t$form = new FormHandler();\n\n\t\t\t$form->addValuesArray($_POST);\n\n\t\t\t# Add all the fields\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'title', \n\t\t\t\t'title'\t\t=> Lang::get('Site Title'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'url', \n\t\t\t\t'title'\t\t=> Lang::get('URL'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'thumb_url', \n\t\t\t\t'title'\t\t=> Lang::get('URL to Thumbnail')\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'content', \n\t\t\t\t'title'\t\t=> Lang::get('Description'), \n\t\t\t\t'type'\t\t=> 'textarea',\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'author', \n\t\t\t\t'title'\t\t=> Lang::get('Your Name'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'email', \n\t\t\t\t'title'\t\t=> Lang::get('And E-mail'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'add_site_submit', \n\t\t\t\t'type'\t\t=> 'hidden', \n\t\t\t\t'value'\t\t=> '1'\n\t\t\t));\n\n\t\t\t# User is submitting form\n\t\t\t# Make sure form is valid (true => check for spam as well)\n\t\t\tif (isset($_POST['add_site_submit']) and $form->validate(true)) {\n\t\t\t\t# Add new site\n\t\t\t\tSites::insert(array(\n\t\t\t\t\t'author'\t\t=> $_POST['author'], \n\t\t\t\t\t'email'\t\t\t=> $_POST['email'], \n\t\t\t\t\t'title'\t\t\t=> $_POST['title'], \r\n\t\t\t\t\t'content'\t\t=> $_POST['content'], \r\n\t\t\t\t\t'thumb_url'\t\t=> isset($_POST['thumb_url']) ? $_POST['thumb_url'] : '', \r\n\t\t\t\t\t'url'\t\t\t=> $_POST['url'], \r\n\t\t\t\t\t'url_str'\t\t=> Router::urlize($_POST['title']), \n\t\t\t\t\t'pub_date'\t\t=> date('Y-m-d H:i:s')\n\t\t\t\t));\n\n\t\t\t\t# Redirect after POST\n\t\t\t\tredirect('?added_site');\r\n\t\t\t}\n\n\t\t\t# Form has been submitted\n\t\t\tif (isset($_GET['added_site'])) {\n\t\t\t\tself::$tplFile = 'ThankYou';\n\t\t\t}\n\t\t\t# Form has NOT been submitted\n\t\t\telse {\n\t\t\t\t# Assign form HTML to template vars\n\t\t\t\tself::$tplVars['form_html'] = $form->asHTML();\n\t\t\t}\n\t\t}", "function df_fields($fields) {\r\n\t$fields['author'] = '<p class=\"comment-form-author\"><label>'.__(\"Name:\",THEME_NAME).'<span>*</span></label><input type=\"text\" placeholder=\"'.__(\"Name..\",THEME_NAME).'\" name=\"author\" id=\"author\">';\r\n\t$fields['email'] = '<p class=\"comment-form-email\"><label>'.__(\"E-mail:\",THEME_NAME).'<span>*</span></label><input type=\"text\" placeholder=\"'.__(\"E-mail..\",THEME_NAME).'\" name=\"email\" id=\"email\"><div class=\"clear\"></div>';\r\n\t$fields['url'] = '';\r\n\r\n\treturn $fields;\r\n}", "function is_main_blog()\n {\n }", "function is_blog_admin()\n {\n }", "function acf_validate_save_post($show_errors = \\false)\n{\n}", "function pb_allow_blognames_with_hyphens_underscores($result){\n$error_name = $result['errors']->get_error_message('blogname');\nif (!empty($error_name) && $error_name == __('Site names can only contain lowercase letters (a-z) and numbers.') || $error_name == __('Sorry, site names must have letters too!') && preg_match('/[^-_a-z0-9]+/', $result['blogname'])) \n{\nunset ($result['errors']->errors['blogname']);\nreturn $result;\n}\nreturn $result;\n}", "function form_new_post($post) {\n $a = array(\n 'article_title' => '^[\\w\\s\\!\\?\\:\\.\\-\\\\\\/\\'\\\" -à]{1,254}$',\n 'article_content' => '.*' \n );\n \n return _form($post, $a);\n}", "function content_form($post_type,$post_id = '',$action='',$thankyou = array()){\n\t$app = \\Jolt\\Jolt::getInstance();\n\t//\tgrab blueprint based on content type..\n\t$blueprint = $app->store('blueprints');\n\t$blueprint = $blueprint[ $post_type ];\n//\tprint_r( $blueprint );\n\t$nonce = generate_nonce();\n\n\tif( isset($_POST['title']) ){\n//\t\tprint_r($_POST);\n\t\t$c_url = site_url().$_SERVER['REQUEST_URI'];\n\t\t$post \t\t\t\t= array();\n\t\t$post['title'] \t\t= $_POST['title'];\n\t\t$post['name'] \t\t= new_slug( slugify( $_POST['title'] ) );\n\t\t$post['type'] \t\t= $post_type;\n\t\t$post['user_id'] \t= '';\n\t\t$post['date'] \t\t= date('Y-m-d H:i:s');\n\t\t$post['modified']\t= date('Y-m-d H:i:s');\n\t\t$post['password'] \t= '';\n\t\t$post['status'] \t= 'draft';\t//\tregardless of post type, we never want a post actually published from here..\n\t\t$post['parent'] \t= 0;\n\t\t$post['guid'] \t\t= generate_uuid();\n\t\t$post['category'] \t= '';\n\t\t$restricted = array('_id','title','name','user_id','date','modified','guid','type','status','parent','password');\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\t//\tThere are fields we don't want to change... This makes sure we don't...\n\t\t\tif( in_array($restricted,$fname) )\tcontinue;\n\t\t\tif( !isset($_POST[ $fname ]) ){\n\t\t\t\tif( $field['type'] == 'related' ){\n\t\t\t\t\t$_POST[ $fname ] = array();\n\t\t\t\t}else{\n\t\t\t\t\t$_POST[ $fname ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($_POST as $k=>$v){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t$post[$k] = $v;\n\t\t}\n\t\tif( isset($_FILES) ){\n\t\t\tforeach($_FILES as $k=>$file){\n\t\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t\t$uploaddir = $this->app->store('upload_path');\n\t\t\t\t$uploadfile = $uploaddir . basename($file['name']);\n\t\t\t\t$uploadurl = $this->app->store('upload_url') . basename($file['name']);\n\t\t\t\tif( file_exists($uploadfile) ){\n\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t}else{\n\t\t\t\t\tif ( move_uploaded_file($file['tmp_name'], $uploadfile) ) {\n\t\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$app->db->insert('post', $post );\n\t\tunset($_POST);\n\t\tif( isset($thankyou['url']) ){\n\t\t\techo '<script>top.location.href=\"'.$thankyou['url'].'\";</script>';\n\t\t}else if( isset($thankyou['msg']) ){\n\t\t\techo '<p>'.$thankyou['msg'].'</p>';\n\t\t}else{\n\t\t\techo '<p><strong>Thank you, your post has been saved.</strong></p>';\n\t\t}\n\t}\n?>\n\t<form role=\"form\" method=\"POST\" action=\"<?php echo $action?>\" enctype=\"multipart/form-data\">\n\t<input type=\"hidden\" name=\"nonce\" value=\"<?php echo $nonce?>\" />\n\t<fieldset>\n\t\t<div class=\"form-group\">\n\t\t\t<label for=\"title\"><?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Title\")?></label>\n\t\t\t<input type=\"text\" class=\"form-control\" id=\"title\" name=\"title\" placeholder=\"<?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Enter Title\")?>\" value=\"<?php echo ( isset($post) ? $post['title'] : '');?>\" required>\n\t\t</div>\n<?php\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( $field['adminonly'] )\tcontinue;\n\t\t\tform_field($fname,$field,$post);\n\t\t}\n?>\n\t\t<button type=\"submit\" class=\"btn btn-primary\">Save</button>\n\t</fieldset>\n\t</form>\n<?php\n}", "function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password)\n {\n }", "function blog()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('blog', $data)\n );\n $this->output($ret);\n }", "public function process_request( $request )\n\t{\n\t\t\t\t\t\t\n\t\t$qa_content=qa_content_prepare();\n\t\t$qa_content['body_header']=markdownSupport();\n\t\t$errors = array();\n\t\tif (qa_clicked('docancel'))\tqa_redirect('blog');\n\t\telse if (qa_clicked('dosaveoptions')) {\n\t\t\t\t\n\t\t\t\t$in=array();\n\t\t\tqa_get_post_content('editor', 'content', $in['editor'], $in['content'], $in['format'], $in['text']);\n\t\t\t$in['title']=qa_post_text('title');\n\t\t\t\t\t\t$in['category']=qa_post_text('category');\n\t\t\tif (strlen($in['title']) < 10 || strlen($in['content']) < 50 ||\n\t\t\t($in['category'] !== 'cat_0' &&\t$in['category'] !== 'cat_1' && $in['category'] !== 'cat_2' &&\t$in['category'] !== 'cat_3' && $in['category'] !== 'cat_4' && $in['category'] !== 'cat_5')) \n\t\t\t\n\t\t\t\t\t\n\t\t\t{\n\t\t\t\tif (strlen($in['title']) < 10) $errors['title'] = qa_lang('qa_blog_lang/error_title');\n\t\t\t\tif (strlen($in['content']) < 50) $errors['content'] = qa_lang('qa_blog_lang/error_content');\n\t\t\t\tif ($in['category'] !== 'cat_0' && $in['category'] !== 'cat_1' && $in['category'] !== 'cat_2' &&\t$in['category'] !== 'cat_3' && $in['category'] !== 'cat_4' && $in['category'] !== 'cat_5')\t$errors['type'] = 'Invalid category';\n\t\t\t} \n\t\t\telse {\n\t\t\t\t$type = 0;\n\t\t\t\tif ($in['category'] === 'cat_1') $type = 1;\n\t\t\t\telse if ($in['category'] === 'cat_2') $type = 2;\n\t\t\t\telse if ($in['category'] === 'cat_3') $type = 3;\n\t\t\t\telse if ($in['category'] === 'cat_4') $type = 4;\n\t\t\t\telse if ($in['category'] === 'cat_5') $type = 5;\n\n\t\t\t\tqa_db_query_sub('INSERT INTO ^blog_posts (postid, userid, posted, title, type, content, views,format) \n\t\t\t\tVALUES (0,#,NOW(),$,#,$,0,$)',qa_get_logged_in_userid(),$in['title'],$type,$in['content'],'markdown');\n\t\t\t\theader('location:'.qa_path_to_root().'/user/'.qa_get_logged_in_handle().'/articles');\n\t\t\t}\n\t\t\t}\n\t\telse if (qa_clicked('doarticle')) { \n\t\t\t\n\t\t\t$in=array();\n\t\t\tqa_get_post_content('editor', 'content', $in['editor'], $in['content'], $in['format'], $in['text']);\n\t\t\t$in['title']=qa_post_text('title');\n\t\t\t$in['category']=qa_post_text('category');\n\t\t\tif (strlen($in['title']) < 10 || strlen($in['content']) < 50 ||\n\t\t\t($in['category'] !== 'cat_0' &&\t$in['category'] !== 'cat_1' && $in['category'] !== 'cat_2' &&\t$in['category'] !== 'cat_3' && $in['category'] !== 'cat_4' && $in['category'] !== 'cat_5')) \n\t\t\t\n\t\t\t\t\t\n\t\t\t{\n\t\t\t\tif (strlen($in['title']) < 10) $errors['title'] = qa_lang('qa_blog_lang/error_title');\n\t\t\t\tif (strlen($in['content']) < 50) $errors['content'] = qa_lang('qa_blog_lang/error_content');\n\t\t\t\tif ($in['category'] !== 'cat_0' && $in['category'] !== 'cat_1' && $in['category'] !== 'cat_2' &&\t$in['category'] !== 'cat_3' && $in['category'] !== 'cat_4' && $in['category'] !== 'cat_5')\t$errors['type'] = 'Invalid category';\n\t\t\t} \n\t\t\telse {\n\t\t\t\t$type = 0;\n\t\t\t\tif ($in['category'] === 'cat_1') $type = 1;\n\t\t\t\telse if ($in['category'] === 'cat_2') $type = 2;\n\t\t\t\telse if ($in['category'] === 'cat_3') $type = 3;\n\t\t\t\telse if ($in['category'] === 'cat_4') $type = 4;\n\t\t\t\telse if ($in['category'] === 'cat_5') $type = 5;\n\t\t\t\t\n\t\t\t$result = qa_db_query_sub('INSERT INTO ^blog_posts (postid, userid, posted, title, type, content, views,format) \n\t\t\t\tVALUES (0,#,NOW(),$,#,$,0,$)',qa_get_logged_in_userid(),$in['title'],$type,$in['content'],'markdown');\n\t\t\t header('location:'.qa_path_to_root().'/blog/'.$article['postid']);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\tif(qa_is_logged_in())\n\t\t{\n\t\t\t$qa_content['title'] = qa_lang('qa_blog_lang/articles_page');\n\t\t\t\n\t\t\t$editorname=isset($in['editor']) ? $in['editor'] : qa_opt('qa_blog_editor');\n\t\t\t$editor=qa_load_editor(@$in['content'], @$in['format'], $editorname);\n\t\t\t\n\t\t\t$field=qa_editor_load_field($editor, $qa_content, @$in['content'], @$in['format'], 'content', 12, false);\n\t\t\t$field['label']='';\n\t\t\t$field['error']=qa_html(@$errors['content']);\n\t\n\t\t\t$qa_content['custom']= qa_lang('qa_blog_lang/default_blog_tagline');\n\t\t\t\n\t\t\t$cat_1 = qa_opt('qa_blog_cat_1');\n\t\t\t$cat_2 = qa_opt('qa_blog_cat_2'); \n\t\t\t$cat_3 = qa_opt('qa_blog_cat_3'); \n\t\t\t$cat_4 = qa_opt('qa_blog_cat_4'); \n\t\t\t$cat_5 = qa_opt('qa_blog_cat_5');\n\t\t\t/*\n\t\t\tif (!qa_opt('qa_blog_cat_2')) $cat_2 = ''; \n\t\t\tif (!qa_opt('qa_blog_cat_3')) $cat_3 = ''; \n\t\t\tif (!qa_opt('qa_blog_cat_4')) $cat_4 = ''; \n\t\t\tif (!qa_opt('qa_blog_cat_5')) $cat_5 = '';\n\t\t\t*/\n\t\t\t$typeoptions = array($cat_1, $cat_2, $cat_3, $cat_4, $cat_5);\n\t\t\t\t\t\n\t\t\t$qa_content['form']=array(\n\t\t\t\t'tags' => 'name=\"blog\" method=\"post\" action=\"'.qa_self_html().'\"',\n\t\t\t\t\t\t\t\t\n\t\t\t\t'style' => 'tall',\n\t\t\t\t\t\t\t\t\n\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t'label' => qa_lang('qa_blog_lang/post_title'),\n\t\t\t\t\t\t'tags' => 'name=\"title\" id=\"title\" autocomplete=\"off\"',\n\t\t\t\t\t\t'value' => qa_html(@$in['title']),\n\t\t\t\t\t\t'error' => qa_html(@$errors['title']),\n\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t'similar' => array(\n\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t'html' => '<span id=\"similar\"></span>',\n\t\t\t\t\t),\n\t\t\t\n\t\t\t\t\t'content' => $field,\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'buttons' => array(\n\t\t\t\t'post' => array(\n\t\t\t\t'tags' => 'name=\"doarticle\" onclick=\"qa_show_waiting_after(this, false); '.\n\t\t\t\t\t(method_exists($editor, 'update_script') ? $editor->update_script('content') : '').'\"',\n\t\t\t\t'label' => qa_lang('qa_blog_lang/post_button'),\n\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t'save' => array(\n\t\t\t\t'tags' => 'name=\"dosaveoptions\" onclick=\"qa_show_waiting_after(this, false); '.\n\t\t\t\t\t(method_exists($editor, 'update_script') ? $editor->update_script('content') : '').'\"',\n\t\t\t\t'label' => qa_lang('qa_blog_lang/draft_button'),\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'cancel' => array(\n\t\t\t\t\t\t'tags' => 'name=\"docancel\"',\n\t\t\t\t\t\t'label' => qa_lang('qa_blog_lang/cancel_button'),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'hidden' => array(\n\t\t\t\t\t'editor' => qa_html($editorname),\n\t\t\t\t\t'code' => qa_get_form_security_code('article'),\n\t\t\t\t\t'doarticle' => '1',\n\t\t\t\t\t),\n\t\n\t\t\t);\n\t\t\t\n\t\t\tif (qa_opt('qa_blog_cat_1')) {\n\t\t\t\t$field=array(\n\t\t\t\t\t'label' => qa_lang('qa_blog_lang/post_cat'),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'tags' => 'name=\"category\"',\n\t\t\t\t\t\t'options' => $typeoptions,\n\t\t\t\t\t\t'error' => qa_html(@$errors['type']),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tqa_array_insert($qa_content['form']['fields'], 'content', array('category' => $field));\n\t\t\t\t}\n\t\t\t//else $field['options']['']='';\n\t\t\t\n\t\t\t$html = \"<h2>\".qa_lang('qa_blog_lang/past_post').\"</h2>\";\t\n\t\t\t$userid = qa_get_logged_in_userid();\n\t\t\t$result = qa_db_query_sub(\"SELECT * FROM ^blog_posts WHERE userid = '$userid' ORDER BY posted DESC\");\n\t\t\t\t\t\n\t\t\t$i=0;\n\t\t\twhile ($blob = mysql_fetch_array($result)) {\n\t\t\t$i++;\n\t\t\t$html .= '<ul><li><h3><a href=\"blog/'.$blob['postid'].'/'.seoUrl($blob['title']).'\">'.$blob['title'].'</a><h3></li></ul>';\n\t\t\t}\n\t\t\tif ($i==0) $html .= qa_lang('qa_blog_lang/post_null');\n\t\t\t$html .='';\n\t\t\t\t\t\n\t\t\t$qa_content['custom2'] = $html;\n\n\t\t}\n\telse\n\t{\n\t\t$qa_content['title']= qa_lang('qa_blog_lang/title_error');\n\t\t$qa_content['error'] = qa_insert_login_links( qa_lang('qa_blog_lang/access_error'),$request );\n\t}\t\t\t\n\t\treturn $qa_content;\n\n\t}", "function install_blog($blog_id, $blog_title = '')\n {\n }", "function Blogs_add(){\n\t\tif(!empty($_POST)){\n\t if(!empty($_FILES['avatar']['name'])){\n\t\t\t\t$picture = $this->UploadImage();\n\t\t\t}\n\t\t\t$userData = array(\n 'title' => strip_tags($this->input->post('title')),\n 'category' => strip_tags($this->input->post('category')),\n 'short' => strip_tags($this->input->post('short')),\n\t\t\t\t'content' => $this->input->post('content'),\n\t\t\t\t'status' => strip_tags($this->input->post('status')),\n 'image' => $picture \n );\n\t\t$insert = $this->Restaurant->InsertBlogpost($userData);\n\t\tif($insert){\n\t\t\tredirect('Admin/Blogs');\n\t\t}\n\t}\n\t\t$this->load->view('blogs-add-admin');\n\t}", "function contribute() {\n\tob_start();\n\trequire_once($_POST[\"rootpath\"]);\n\n\t$paragraph = \"<p>\".sanitize_text_field( $_POST[\"paragraph\"] ).\"</p>\";\n\t$paragraphIDTitle = wp_count_posts('post')->publish + 1;\t// paragraph IDs are gathered from post titles in order to have them humanly readable\n\t\n\t$chapter = $_POST[\"chapter\"];\n\t//$edition = $_POST[\"edition\"];\n\t$references = $_POST[\"references\"];\n\t\n\t// delete unused (legacy) posted references\n\tforeach($references as $i => $ref) {\n\n\t\tif($i >= substr_count($paragraph, \"[reference id=\")) {\n\t\t\tunset($references[$i]);\n\t\t}\n\t}\n\n\t$http_referer = $_POST[\"_wp_http_referer\"];\n\t$path = $_POST[\"rootpath\"];\n\t$nonce = $_POST[\"_wpnonce\"];\n\n\t//Load WordPress\n\trequire($path);\n\n\t//Verify the form fields\n\tif (! wp_verify_nonce($nonce) ) die('Security check');\n\t\n\t\tif( !isset($_POST[\"paragraph\"]) ) {\n\t\t\n\t\t\twp_redirect( bloginfo('url') . $http_referer );\t\n\t\t}\n\t\telse {\n\t\t\t\t\n\t\t\t// just in case to avoid duplicate titles (hope it works)\n\t\t\twhile( get_page_by_title($paragraphIDTitle, OBJECT, 'post') !== NULL ) {\n\t\n\t\t\t\t//\n\t\t\t\t$paragraphIDTitle++; //= wp_count_posts('post')+1;\n\t\t\t}\n\t\n\t\t\t// post Properties\n\t\t\t$new_post = array(\n\t\t\t\t'post_title'\t=>\t$paragraphIDTitle,\n\t\t\t\t'post_content' =>\t$paragraph,\n\t\t\t\t'post_category' =>\tarray($chapter),\t// Usable for custom taxonomies too\n\t\t\t\t//'tags_input'\t => array($edition),\n\t\t\t\t'post_status' \t=>\t'publish',\t\t\t // Choose: publish, preview, future, draft, etc.\n\t\t\t\t'post_type'\t\t=>\t'post',\t//'post',page' or use a custom post type if you want to\n\t\t\t\t'post_author'\t=>\t2 //Author ID\n\t\t\t);\n\t\n\t\t\t//save the new post\n\t\t\t$postID = wp_insert_post($new_post);\n\t\n\t\t\t//save reference info\n\t\t\tsave_references( $references, $postID );\n\t\n\t\n\t\t\tif( isset($postID) ) {\n\t\t\n\t\t\t\t// mark paragraph as collected\n\t\t\t\tupdateCollection( strval($paragraphIDTitle) );\n\t\t\t\twp_redirect(\"http://\" . $_SERVER[\"HTTP_HOST\"].$http_referer . \"#paragraph-\" . $paragraphIDTitle);\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo \"ERROR SUBMITTING!\";\n\t\t\t}\n\t\t}\n}", "function do_editorform($entry = array('ID'=>'0','title'=>'','shortname'=>'','content'=>'','content'=>'','author'=>'','posted'=>'','ptype'=>'public','section'=>'','comment_count'=>0,'comments_open'=>1,'tags'=>'','meta'=>'a:0:{}','meta'=>'a:0:{}')) {\n\tglobal $bj;\r\n\tob_start();\n\tif($entry['posted'] == '')\n\t\t$entry['posted'] = date('Y-m-d H:i:s'); #Fix for new posts. ?>\r\n\t\t\t<form name=\"edit-<?php echo $entry['ID']; ?>\" action=\"\" method=\"post\" class=\"editform\">\r\n\t\t\t\t<div class=\"column width25\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\r\n\t\t\t\t\t\t<p class=\"label\"><label for=\"comments_open\"><?php _e('Discussion'); ?></label></p>\r\n\t\t\t\t\t\t<p><label for=\"comments_open\"><input type=\"checkbox\" name=\"comments_open\" id=\"comments_open\"<?php bj_checked($entry['comments_open'],1); ?> /> <?php _e('Enable Comments'); ?></label></p>\r\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"label\"><label for=\"section\"><?php _e('Section'); ?></label></p>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<select name=\"section\" id=\"section\">\r\n<?php\r\n\t\t\t\t\t\t$sections = return_sections();\r\n\t\t\t\t\t\tforeach($sections as $section) { ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $section['ID']; ?>\"<?php bj_selected($section['ID'],$entry['section']); ?>><?php echo $section['title']; ?></option>\r\n<?php\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"label\"><?php _e('Tags'); ?></p>\n\t\t\t\t\t\t<p class=\"editortaginsert\"></p>\r\n\t\t\t\t\t\t<ul class=\"taglist\">\r\n\t\t\t\t\t\t\t<li id=\"headings\"></li>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$tags = return_all_tags();\r\n\t\t\t\t\t\t$return_tags = get_entry_tags();\r\n\t\t\t\t\t\tif($tags) {\n\t\t\t\t\t\t\tforeach($tags as $tag) { ?>\r\n\t\t\t\t\t\t\t<li><label for=\"tag-<?php echo $tag['ID']; ?>\"><input type=\"checkbox\" id=\"tag-<?php echo $tag['ID']; ?>\" name=\"tags[<?php echo $tag['ID']; ?>]\"<?php\r\n\t\t\t\t\t\t\t\tforeach($return_tags as $chtag) {\r\n\t\t\t\t\t\t\t\t\tbj_checked($tag['ID'],$chtag['ID']);\r\n\t\t\t\t\t\t\t\t} ?> /> <?php echo $tag['name']; ?></label></li>\r\n<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"label\"><label for=\"public_entry\"><?php _e('Entry Status'); ?></label></p>\r\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"public_entry\"><input type=\"radio\" name=\"ptype\" value=\"public\" id=\"public_entry\"<?php bj_checked($entry['ptype'],'public'); ?> /> <?php _e('Public'); ?></label><br />\r\n\t\t\t\t\t\t\t<label for=\"draft_entry\"><input type=\"radio\" name=\"ptype\" value=\"draft\" id=\"draft_entry\"<?php bj_checked($entry['ptype'],'draft'); ?> /> <?php _e('Draft'); ?></label>\n\t\t\t\t\t\t</p>\r\n<?php\r\n\t\t\t\t\trun_actions('end_editor_sidebar'); ?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width75\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"title\"><?php _e('Title'); ?></label></p>\r\n\t\t\t\t\t\t<p><input type=\"text\" name=\"title\" id=\"title\" value=\"<?php echo formatted_for_editing($entry['title']); ?>\" class=\"width100\" /></p>\n\t\t\t\t\t\t<p class=\"label\"><label for=\"stamp_month\"><?php _e('Date and Time'); ?></label></p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<select name=\"stamp_month\" id=\"stamp_month\">\n<?php\n\t\t\t\t\tfor($int=1;$int <= 12;$int++) {\n\t\t\t\t\t\t$num = (strlen($int) == 1) ? '0'.$int : $int; ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo $num; ?>\"<?php bj_selected(get_entry_date('m',$entry['posted']),$num); ?>><?php echo $bj->locale->month[$num]; ?></option>\r\n<?php\n\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select> \r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_date\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('d',$entry['posted']); ?>\" class=\"aligncenter\" /> \r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_year\" maxlength=\"4\" size=\"4\" value=\"<?php entry_date('Y',$entry['posted']); ?>\" class=\"aligncenter\" /> <?php _e('on'); ?> \r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_hour\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('H',$entry['posted']); ?>\" class=\"aligncenter\" /> :\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_min\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('i',$entry['posted']); ?>\" class=\"aligncenter\" /> :\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"stamp_sec\" maxlength=\"2\" size=\"2\" value=\"<?php entry_date('s',$entry['posted']); ?>\" class=\"aligncenter\" />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div id=\"editor\">\n\t\t\t\t\t\t\t<p class=\"label\"><label for=\"textarea\"><?php _e('Content'); ?></label></p>\r\n<?php bj_editbar(); ?>\r\n\t\t\t\t\t\t\t<textarea name=\"content\" id=\"textarea\"><?php echo formatted_for_editing($entry['content']); ?></textarea>\r\n\t\t\t\t\t\t</div>\r\n<?php\r\n\t\t\t\t\trun_actions('end_editor_main');\r\n\t\t\t\t\tif($entry['ID'] == \"0\") { ?>\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"new-entry-send\" value=\"yes\" />\r\n<?php\r\n\t\t\t\t\t} else { ?>\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"edit-entry-send\" value=\"yes\" />\r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"edit-entry-id\" value=\"<?php echo $entry['ID']; ?>\" />\r\n<?php\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<p class=\"submit\">\r\n<?php\r\n\t\t\t\t\tif($entry['ID'] != \"0\") { ?>\r\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"save-del\" value=\"<?php _e('Delete'); ?>\" class=\"button_deleteme\" />\r\n<?php\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"save-cont\" value=\"<?php _e('Save And Continue Editing'); ?>\" /> \r\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"save\" value=\"<?php _e('Save'); ?>\" />\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n<?php\n\tif(is_array(load_option('custom_fields'))) { ?>\n\t\t\t\t<div id=\"custom_fields\">\n\t\t\t\t\t<h3><?php _e('Custom Fields'); ?></h3>\n\t\t\t\t\t<table class=\"edit\">\n\t\t\t\t\t\t<tr id=\"metaheadings\" class=\"ths\">\n\t\t\t\t\t\t\t<th class=\"width40\"><?php _e('Key'); ?></th>\n\t\t\t\t\t\t\t<th class=\"width60\"><?php _e('Value'); ?></th>\n\t\t\t\t\t\t</tr>\n<?php\n\t\t$i = 1;\n\t\t$meta = unserialize($entry['meta']); #With convenience in mind. :D\n\t\tforeach(load_option('custom_fields') as $key) { ?>\n\t\t\t\t\t\t<tr id=\"entry-meta-<?php echo bj_shortname($key); ?>\" class=\"<?php tablealt($i); ?>\">\n\t\t\t\t\t\t\t<td class=\"aligncenter\">\n\t\t\t\t\t\t\t\t<?php echo $key; ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<textarea name=\"meta[<?php echo bj_shortname($key); ?>]\" class=\"metatextarea width100\"><?php echo formatted_for_editing($meta[bj_shortname($key)]); ?></textarea>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n<?php\n\t\t\t$i++;\n\t\t} ?>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n<?php\n\t} ?>\r\n\t\t\t</form>\r\n<?php\r\n\t$content = run_actions('entry_editor',ob_get_contents());\r\n\tob_end_clean();\r\n\techo $content;\r\n}", "private function _processBlog(&$aBlog)\n {\n $aBlog['user_image_path'] = Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aBlog['user_server_id'],\n 'user' => $aBlog,\n 'suffix' => '_75_square',\n 'return_url' => true\n )\n );\n $aBlog['time_stamp'] = Phpfox::getLib('date')->convertTime($aBlog['time_stamp']);\n $aBlog['text_html'] = $aBlog['text'];\n $aBlog['text'] = Phpfox::getService('accountapi.emoticon')->processEmoticon($aBlog['text']);\n $aBlog['short_text'] = $aBlog['text'];\n $aBlog['can_post_comment'] = Phpfox::getService('comment')->canPostComment($aBlog['user_id'], $aBlog['privacy_comment']);\n }", "function check_input ($form_array) {\n#--- debug start ---------#\n// echo \"<br> check_input form_array contents <br>\";\n// print_r($form_array);\n// echo \"<br> check_input continue form_array contents <br>\";\n#--- debug finish --------#\n if ($form_array['blogid']) {\n return 1;\n }\n else return 0;\n}", "function wppb_multiple_forms_publish_admin_hook(){\r\n\tglobal $post;\r\n\t\r\n\tif ( is_admin() && ( ( $post->post_type == 'wppb-epf-cpt' ) || ( $post->post_type == 'wppb-rf-cpt' ) ) ){\r\n\t\t?>\r\n\t\t<script language=\"javascript\" type=\"text/javascript\">\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\tjQuery(document).on( 'click', '#publish', function(){\r\n\t\t\t\t\tvar post_title = jQuery( '#title' ).val();\r\n\r\n\t\t\t\t\tif ( jQuery.trim( post_title ) == '' ){\r\n\t\t\t\t\t\talert ( '<?php _e( 'You need to specify the title of the form before creating it', 'profile-builder' ); ?>' );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tjQuery( '#ajax-loading' ).hide();\r\n\t\t\t\t\t\tjQuery( '.spinner' ).hide();\r\n\t\t\t\t\t\tjQuery( '#publish' ).removeClass( 'button-primary-disabled' );\r\n\t\t\t\t\t\tjQuery( '#save-post' ).removeClass('button-disabled' );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}\r\n}", "function show_form()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$raw_post = \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unconvert the saved post if required\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! isset($_POST['Post']) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// If we're using RTE, then just clean up html\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t{\n\t\t\t\t$raw_post = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\n\t\t\t\tif( intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$raw_post = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$raw_post = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $raw_post );\n\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $raw_post );\n\t\t\t\t}\n\n\t\t\t\tif( isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2 )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = str_replace( '&lt;br&gt;', \"<br />\", $raw_post );\n\t\t\t\t\t$raw_post = str_replace( '&lt;br /&gt;', \"<br />\", $raw_post );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstate'] = isset($this->orig_post['post_htmlstate']) ? $this->orig_post['post_htmlstate'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif( $this->parser->parse_html )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$this->orig_post['post'] = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $this->orig_post['post'] );\n\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = htmlspecialchars( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\tif( $this->parser->parse_nl2br )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br /&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$raw_post = $this->parser->pre_edit_parse( $this->orig_post['post'] );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $this->han_editor->method != 'rte' )\n\t\t\t{\n\t\t\t\t$_POST['Post'] = str_replace( '&', '&amp;', $_POST['Post'] );\n\t\t\t}\n\n\t\t\tif ( $this->ipsclass->input['_from'] == 'quickedit' )\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstatus'] = isset($this->orig_post['post_htmlstatus']) ? $this->orig_post['post_htmlstatus'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstatus']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->ipsclass->input['post_htmlstatus']) AND $this->ipsclass->input['post_htmlstatus'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $this->ipsclass->txt_stripslashes( $_POST['Post'] ) );\n\t\t\t\t\t\n\t\t\t\t\tforeach( $this->ipsclass->skin['_macros'] as $row )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $row['macro_value'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$raw_post = str_replace( \"<{\".$row['macro_value'].\"}>\", $row['macro_replace'], $raw_post );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$raw_post = str_replace( \"<#IMG_DIR#>\", $this->ipsclass->skin['_imagedir'], $raw_post );\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", $this->ipsclass->skin['_emodir'] , $raw_post );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Is this the first post in the topic?\n\t\t//-----------------------------------------\n\t\t\n\t\t$topic_title = \"\";\n\t\t$topic_desc = \"\";\n\t\t\n\t\tif ( $this->edit_title == 1 )\n\t\t{\n\t\t\t$topic_title = isset($_POST['TopicTitle']) ? $this->ipsclass->input['TopicTitle'] : $this->topic['title'];\n\t\t\t$topic_desc = isset($_POST['TopicDesc']) ? $this->ipsclass->input['TopicDesc'] : $this->topic['description'];\n\t\t\t\n\t\t\t$topic_title = $this->ipsclass->compiled_templates['skin_post']->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any posting errors?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( isset($this->obj['post_errors']) AND $this->obj['post_errors'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->errors( $this->ipsclass->lang[ $this->obj['post_errors'] ]);\n\t\t}\n\t\t\n\t\tif ( isset($this->obj['preview_post']) AND $this->obj['preview_post'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->preview( $this->show_post_preview( $this->post['post'], $this->post_key ) );\n\t\t}\n\t\t\n\t\t$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , '09' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2 => array( 't' , $this->topic['tid']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t3 => array( 'p' , $this->ipsclass->input['p'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t4 => array( 'st' , $this->ipsclass->input['st'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t5 => array( 'attach_post_key', $this->post_key )\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// START TABLE\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->table_structure();\n\t\t\n\t\t$start_table = $this->ipsclass->compiled_templates['skin_post']->table_top( \"{$this->ipsclass->lang['top_txt_edit']} {$this->topic['title']}\");\n\t\t\n\t\t$name_fields = $this->html_name_field();\n\t\t\n\t\t$post_box = $this->html_post_body( $raw_post );\n\t\t\t\n\t\t$mod_options = $this->edit_title == 1 ? $this->mod_options('edit') : '';\n\t\t\n\t\t$end_form = $this->ipsclass->compiled_templates['skin_post']->EndForm( $this->ipsclass->lang['submit_edit'] );\n\t\t\n\t\t$post_icons = $this->html_post_icons($this->orig_post['icon_id']);\n\t\t\n\t\t$upload_field = $this->can_upload ? $this->html_build_uploads($this->post_key,'edit',$this->orig_post['pid']) : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Still here?\n\t\t//-----------------------------------------\n\t\t\n\t\t$poll_box = \"\";\n\t\t\n\t\tif ( $this->can_add_poll )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Did someone hit preview / do we have\n\t\t\t// post info?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_questions = \"\";\n\t\t\t$poll_choices = \"\";\n\t\t\t$poll_votes = \"\";\n\t\t\t$show_open = 0;\n\t\t\t$is_mod = 0;\n\t\t\t$poll_only\t\t= \"\";\n\t\t\t$poll_multi\t\t= \"\";\t\t\t\n\t\t\t\n\t\t\tif ( isset($_POST['question']) AND is_array( $_POST['question'] ) and count( $_POST['question'] ) )\n\t\t\t{\n\t\t\t\tforeach( $_POST['question'] as $id => $question )\n\t\t\t\t{\n\t\t\t\t\t$poll_questions .= \"\\t{$id} : '\".str_replace( \"'\", '&#39;', $question ).\"',\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_question = $this->ipsclass->input['poll_question'];\n\t\t\t\t$show_open = 1;\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['choice'] as $id => $choice )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( isset($_POST['multi']) AND is_array( $_POST['multi'] ) and count( $_POST['multi'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['multi'] as $id => $checked )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_multi .= \"\\t{$id} : '{$checked}',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['votes'] ) and count( $_POST['votes'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['votes'] as $id => $vote )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$id}' : '\".$vote.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->vars['ipb_poll_only'] AND $this->ipsclass->input['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Load the poll from the DB\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'polls', 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t \t\t$this->poll_data = $this->ipsclass->DB->fetch_row();\n\t \t\t\n\t \t\t$this->poll_answers = $this->poll_data['choices'] ? unserialize(stripslashes($this->poll_data['choices'])) : array();\n\n \t\t//-----------------------------------------\n \t\t// Lezz go\n \t\t//-----------------------------------------\n \t\t\n \t\tforeach( $this->poll_answers as $question_id => $data )\n \t\t{\n \t\t\t$poll_questions .= \"\\t{$question_id} : '\".str_replace( \"'\", '&#39;', $data['question'] ).\"',\\n\";\n \t\t\t\n \t\t\t$data['multi']\t = isset($data['multi']) ? intval($data['multi']) : 0;\n \t\t\t$poll_multi \t.= \"\\t{$question_id} : '\".$data['multi'].\"',\\n\";\n \t\t\t\n \t\t\tforeach( $data['choice'] as $choice_id => $text )\n\t\t\t\t\t{\n\t\t\t\t\t\t$choice = $text;\n\t\t\t\t\t\t$votes = intval($data['votes'][ $choice_id ]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$question_id}_{$choice_id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$question_id}_{$choice_id}' : '\".$votes.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif ( $this->ipsclass->vars['ipb_poll_only'] AND $this->poll_data['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Trim off trailing commas (Safari hates it)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t\t$poll_question = $this->poll_data['poll_question'];\n\t\t\t\t$show_open = $this->poll_data['choices'] ? 1 : 0;\n\t\t\t\t$is_mod = $this->can_add_poll_mod;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print poll box\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_box = $this->ipsclass->compiled_templates['skin_post']->poll_box( $this->max_poll_questions, $this->max_poll_choices_per_question, $poll_questions, $poll_choices, $poll_votes, $show_open, $poll_question, $is_mod, $poll_multi, $poll_only );\n\t\t}\n\t\t\n\t\t$edit_option = \"\";\n\t\t\n\t\tif ($this->ipsclass->member['g_append_edit'])\n\t\t{\n\t\t\t$checked = \"\";\n\t\t\t$show_reason = 0;\n\t\t\t\n\t\t\tif ($this->orig_post['append_edit'])\n\t\t\t{\n\t\t\t\t$checked = \"checked\";\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->moderator['edit_post'] OR $this->ipsclass->member['g_is_supmod'] )\n\t\t\t{\n\t\t\t\t$show_reason = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$edit_option = $this->ipsclass->compiled_templates['skin_post']->add_edit_box( $checked, $show_reason, $this->ipsclass->input['post_edit_reason'] ? $this->ipsclass->input['post_edit_reason'] : $this->orig_post['post_edit_reason'] );\n\t\t}\n\t\t\n\t\t$this->output = str_replace( \"<!--START TABLE-->\" , $start_table , $this->output );\n\t\t$this->output = str_replace( \"<!--NAME FIELDS-->\" , $name_fields , $this->output );\n\t\t$this->output = str_replace( \"<!--POST BOX-->\" , $post_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POLL BOX-->\" , $poll_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POST ICONS-->\" , $post_icons , $this->output );\n\t\t$this->output = str_replace( \"<!--END TABLE-->\" , $end_form , $this->output );\n\t\t$this->output = str_replace( \"<!--UPLOAD FIELD-->\", $upload_field , $this->output );\n\t\t$this->output = str_replace( \"<!--MOD OPTIONS-->\" , $edit_option . $mod_options , $this->output );\n\t\t$this->output = str_replace( \"<!--FORUM RULES-->\" , $this->ipsclass->print_forum_rules($this->forum), $this->output );\n\t\t$this->output = str_replace( \"<!--TOPIC TITLE-->\" , $topic_title , $this->output );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add in siggy buttons and such\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->input['post_htmlstatus'] = $this->orig_post['post_htmlstate'];\n\t\t$this->ipsclass->input['enablesig']\t\t = $this->orig_post['use_sig'];\n\t\t$this->ipsclass->input['enableemo']\t\t = $this->orig_post['use_emo'];\n\t\t\n\t\t$this->html_checkboxes('edit', $this->topic['tid'], $this->forum['id']);\n\t\t\n\t\t$this->html_topic_summary( $this->topic['tid'] );\n\t\t\n\t\t$this->show_post_navigation();\n\t\t\t\t\t\t \n\t\t$this->title = $this->ipsclass->lang['editing_post'].' '.$this->topic['title'];\n\t\t\n\t\t$this->ipsclass->print->add_output( $this->output );\n\t\t\n $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].\" -> \".$this->title,\n \t\t\t\t\t \t 'JS' => 1,\n \t\t\t\t\t \t 'NAV' => $this->nav,\n \t\t\t\t\t ) );\n\t}", "public function onAfterValidate() {\nglobal $_LW;\nif ($_LW->page=='events_edit' || $_LW->page=='events_sub_edit') { // if saving from the events editor page\n\t/*\n\tif (!empty($_LW->_POST['sample_textarea']) && stripos($_LW->_POST['sample_textarea'], 'supercalifragilisticexpialidocious') !== false) { // optionally disallow the word \"supercalifragilisticexpialidocious\" from this custom field\n\t\t$_LW->REGISTERED_MESSAGES['failure'][] = 'Custom Field (Textarea) cannot contain the word supercalifragilisticexpialidocious.'; // register error\n\t};\n\t*/\n};\n}", "function admin_blogsBuild($data,$db) {\n\t$data->output['delete']='';\n\tif(empty($data->action[3]) || !is_numeric($data->action[3])) {\n\t\t$data->output['abort']=true;\n\t\t$data->output['abortMessage']='<h2>'.$data->phrases['core']['invalidID'].'</h2>';\n\t} else {\n\t\tif(checkPermission('postDelete','blogs',$data)) {\n\n\t\t\tif(!checkPermission('accessOthers','blogs',$data))\n\t\t\t{\n\t\t\t\t$qHandle=$db->prepare('getBlogByIdAndOwner','admin_blogs');\n\t\t\t\t$qHandle->execute(array(\n\t\t\t\t\t':id' => $data->action[3],\n\t\t\t\t\t':owner' => $data->user['id']\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$qHandle=$db->prepare('getBlogByPost','admin_blogs');\n\t\t\t\t$qHandle->execute(array(\n\t\t\t\t\t':postId' => $data->action[3]\n\t\t\t\t));\n\t\t\t}\n\t\t\tif(($data->output['thisBlog']=$qHandle->fetch())==FALSE)\n\t\t\t{\n\t\t\t\t$data->output['abort']=true;\n\t\t\t\t$data->output['abortMessage']='<h2>'.$data->phrases['core']['invalidID'].'</h2>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(isset($_POST['fromForm']) && $_POST['fromForm']==$data->action[3]) {\n\t\t\t\tif(!empty($_POST['delete'])) {\n\t\t\t\t\t$statement=$db->prepare('deleteBlogPostById','admin_blogs');\n\t\t\t\t\t$statement->execute(array(\n\t\t\t\t\t\t':id' => $data->action[3]\n\t\t\t\t\t));\n\t\t\t\t\t// now delete across other language tables\n\t\t\t\t\tcommon_deleteFromLanguageTables($data,$db,'blog_posts','id',$data->action[3]);\n\t\t\t\t\t\n\t\t\t\t\t$data->output['deleteCount']=$statement->rowCount();\n\t\t\t\t\tif($data->output['deleteCount']>0) {\n\t\t\t\t\t\t$data->output['delete']='deleted';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$data->output['rejectError']=$data->phrases['core']['databaseErrorHeading'];\n\t\t\t\t\t\t$data->output['rejectText']=$data->phrases['core']['databaseErrorMessage'];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/* from form plus not deleted must==cancelled. */\n\t\t\t\t\t$data->output['delete']='cancelled';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n $data->output['abort']=true;\n $data->output['abortMessage']='<h2>'.$data->phrases['core']['accessDeniedHeading'].'</h2>'.$data->phrases['core']['accessDeniedMessage'];\n\t\t}\n\t}\n}", "function thinkup_input_blogtext() {\nglobal $post;\n\n// Get theme options values.\n$thinkup_blog_postswitch = thinkup_var ( 'thinkup_blog_postswitch' );\n\n\t// Output full content - EDD plugin compatibility\n\tif( function_exists( 'EDD' ) and is_post_type_archive( 'download' ) ) {\n\t\tthe_content();\n\t\treturn;\n\t}\n\n\t// Output post content\n\tif ( is_search() ) {\n\t\tthe_excerpt();\n\t} else if ( ! is_search() ) {\n\t\tif ( ( empty( $thinkup_blog_postswitch ) or $thinkup_blog_postswitch == 'option1' ) ) {\n\t\t\tif( ! is_numeric( strpos( $post->post_content, '<!--more-->' ) ) ) {\n\t\t\t\tthe_excerpt();\n\t\t\t} else {\n\t\t\t\tthe_content();\n\t\t\t\twp_link_pages( array( 'before' => '<div class=\"page-links\">' . esc_html__( 'Pages:', 'ESTSB' ), 'after' => '</div>', ) );\n\t\t\t}\n\t\t} else if ( $thinkup_blog_postswitch == 'option2' ) {\n\t\t\tthe_content();\n\t\t\twp_link_pages( array( 'before' => '<div class=\"page-links\">' . esc_html__( 'Pages:', 'ESTSB' ), 'after' => '</div>', ) );\n\t\t}\n\t}\n}", "public function p_add() {\n\t\t\t#print_r($_POST);\n\t\t\t\n\t\t\t\n\t\t\t$_POST['created'] = Time::now();\n \t\t\t$_POST['modified'] = Time::now();\n\t\t\t$_POST['poster'] = $this->user->user_id;\n\t\t\t\n\t\t\t#Write Post to the Database\n\t\t $post_id= DB::instance(DB_NAME)->insert('posts', $_POST);\n\t\t\t#Call the parser to look for hashtags: \n\t\t\t$_POST['post'] = $this->parse(\"#\",$_POST['post'],$post_id);\n\t\t\t#Call the parser to look for mentions, and the 'reply_to' for the post\n\t\t\t$_POST['post'] = $this->parse(\"@\",$_POST['post'],$post_id);\n\t\t\t#Update the Post record with new post, updated in the parser:\n\t\t\tDB::instance (DB_NAME)->update('posts',$_POST,\"where post_id = '\".$post_id.\"'\");\t\n\t\t\t\n\t\t Router::redirect('/users/');\n\t\t\t\n\t\t\t\t\t\t\n\t\t}", "function thinkup_input_postmeta() {\n\n// Get theme options values.\n$thinkup_post_date = thinkup_var ( 'thinkup_post_date' );\n$thinkup_post_author = thinkup_var ( 'thinkup_post_author' );\n$thinkup_post_comment = thinkup_var ( 'thinkup_post_comment' );\n$thinkup_post_category = thinkup_var ( 'thinkup_post_category' );\n$thinkup_post_tag = thinkup_var ( 'thinkup_post_tag' );\n$thinkup_post_title = thinkup_var ( 'thinkup_post_title' );\n\n// Reset variable values to avoid php error\n$class_comment = NULL;\n\n\tif ( $thinkup_post_date !== '1' or \n\t\t$thinkup_post_author !== '1' or \n\t\t$thinkup_post_comment !== '1' or \n\t\t$thinkup_post_category !== '1' or \n\t\t$thinkup_post_tag !== '1' or \n\t\t$thinkup_post_title !== '1') {\n\n\n\t\t\t// Only output for blog layout 1\n\t\t\tif ( '0' != get_comments_number() and $thinkup_post_comment !== '1' ) {\n\t\t\t\t$class_comment = ' comment-icon';\n\t\t\t}\n\n\t\t\techo '<header class=\"entry-header' . $class_comment . '\">';\n\n\t\t\tif ($thinkup_post_title !== '1') { echo '<h3 class=\"post-title\">' . get_the_title() . '</h3>'; }\n\n\t\t\techo '<div class=\"entry-meta\">';\n\t\t\t\tif ($thinkup_post_date !== '1') { thinkup_input_blogdate(); }\n\t\t\t\tif ($thinkup_post_author !== '1') { thinkup_input_blogauthor(); }\n\t\t\t\tif ($thinkup_post_comment !== '1') { thinkup_input_blogcomment(); }\t\n\t\t\t\tif ($thinkup_post_category !== '1') { thinkup_input_blogcategory(); }\n\t\t\t\tif ($thinkup_post_tag !== '1') { thinkup_input_blogtag(); }\n\t\t\techo '</div>';\n\n\t\t\techo '<div class=\"clearboth\"></div></header><!-- .entry-header -->';\n\t}\n}", "function add_update_blog( $data, $files ) {\n $this->load_wp();\n if( isset( $data['pid'] ) && $data['pid'] != 0 ){\n $my_post = array( 'post_title' => wp_strip_all_tags( $data['txt_title'] ),\n 'post_content' => $data['txt_description'],\n 'post_status' => 'publish',\n 'post_author' => 1,\n 'post_category' => $data['txt_term'], \n 'ID' => $data['pid'] \n );\n $post_id = wp_update_post( $my_post );\n }else{\n $my_post = array( 'post_title' => wp_strip_all_tags( $data['txt_title'] ),\n 'post_content' => $data['txt_description'],\n 'post_status' => 'publish',\n 'post_author' => 1,\n 'post_category' => $data['txt_term'] \n );\n $post_id = wp_insert_post( $my_post );\n }\n if( isset( $files['featured_image']['tmp_name'] ) && $files['featured_image']['tmp_name'] != '' ){\n $this->thumbnail_url_field_save( $files, $post_id );\n }\n if( $post_id != '' ) {\n $post_data = get_post( $post_id );\n $this->result['success'] = TRUE;\n $this->result['message'] = '';\n $this->result['data'] = $post_data;\n }\n die( json_encode( $this->result ));\n }", "function hs_add_review_page( $review_page, $form, $entry ) {\n\t \n\t# Enable the review page\n\t$review_page['is_enabled'] = true;\n\t\n # First thing to do is put the form's fields in variables for easier handling afterwards\n # So far I haven't found a loop to handle this but my PHP skills don't go that far\n # Tip also is to give the variables a clear name. I chose for this set up:\n # f = field, cp/d1/d2 the different sections on the form and then the field identifier\n # the :1.3, :3, ... are the field shortcodes. You can get them by entering the needed fields on a GF form's confirmation page.\n\t\n\t# On the first page of the form, general data is collected about the person filling in the application.\n\t# Depending on how many persons they choose, the next page is formed and there the application's names and other details are filled in.\n \n\t$f_cp_voornaam = GFCommon::replace_variables( '{:1.3}', $form, $entry );\n\t$f_cp_achternaam = GFCommon::replace_variables( '{:1.6}', $form, $entry );\n\t$f_cp_email = GFCommon::replace_variables( '{:3}', $form, $entry );\n\t$f_cp_telefoon = GFCommon::replace_variables( '{:4}', $form, $entry );\n\t$f_cp_adres = GFCommon::replace_variables( '{:5}', $form, $entry );\n\t$f_cp_postcode = GFCommon::replace_variables( '{:45}', $form, $entry );\n\t$f_cp_plaats = GFCommon::replace_variables( '{:46}', $form, $entry );\n\t$f_cp_sportkamp = GFCommon::replace_variables( '{:47}', $form, $entry );\n\t$f_cp_picknick = GFCommon::replace_variables( '{:49}', $form, $entry );\n\t$f_cp_aantalpersonen = GFCommon::replace_variables( '{:16}', $form, $entry );\n\t$f_cp_pppersoon = GFCommon::replace_variables( '{:50}', $form, $entry );\n\t$f_cp_totaal = GFCommon::replace_variables( '{:52}', $form, $entry );\n\n\t$f_d1_voornaam = GFCommon::replace_variables( '{:18.3}', $form, $entry );\n\t$f_d1_achternaam = GFCommon::replace_variables( '{:18.6}', $form, $entry );\n\t$f_d1_geslacht = GFCommon::replace_variables( '{:21}', $form, $entry );\n\t$f_d1_geboortedatum = GFCommon::replace_variables( '{:22}', $form, $entry );\n\n\t$f_d2_voornaam = GFCommon::replace_variables( '{:20.3}', $form, $entry );\n\t$f_d2_achternaam = GFCommon::replace_variables( '{:20.6}', $form, $entry );\n\t$f_d2_geslacht = GFCommon::replace_variables( '{:23}', $form, $entry );\n\t$f_d2_geboortedatum = GFCommon::replace_variables( '{:24}', $form, $entry );\n\n\t$f_d3_voornaam = GFCommon::replace_variables( '{:26.3}', $form, $entry );\n\t$f_d3_achternaam = GFCommon::replace_variables( '{:26.6}', $form, $entry );\n\t$f_d3_geslacht = GFCommon::replace_variables( '{:27}', $form, $entry );\n\t$f_d3_geboortedatum = GFCommon::replace_variables( '{:28}', $form, $entry );\n\n\t$f_d4_voornaam = GFCommon::replace_variables( '{:30.3}', $form, $entry );\n\t$f_d4_achternaam = GFCommon::replace_variables( '{:30.6}', $form, $entry );\n\t$f_d4_geslacht = GFCommon::replace_variables( '{:31}', $form, $entry );\n\t$f_d4_geboortedatum = GFCommon::replace_variables( '{:32}', $form, $entry );\n\n\t$f_d5_voornaam = GFCommon::replace_variables( '{:37.3}', $form, $entry );\n\t$f_d5_achternaam = GFCommon::replace_variables( '{:37.6}', $form, $entry );\n\t$f_d5_geslacht = GFCommon::replace_variables( '{:38}', $form, $entry );\n\t$f_d5_geboortedatum = GFCommon::replace_variables( '{:39}', $form, $entry );\n\n\t$f_d6_voornaam = GFCommon::replace_variables( '{:41.3}', $form, $entry );\n\t$f_d6_achternaam = GFCommon::replace_variables( '{:41.6}', $form, $entry );\n\t$f_d6_geslacht = GFCommon::replace_variables( '{:42}', $form, $entry );\n\t$f_d6_geboortedatum = GFCommon::replace_variables( '{:44}', $form, $entry );\n\t\n\t# After you collected all the fields in variables, it's time to create the output of the page with all necessary divs and css-classes.\n\t# In the end, they need to be merged into 1 variable that's outputted by the function.\n\t# As you can see, you can use all kinds of PHP functions (like the strpos function) to make sure all the necessary data is displayed.\n\n\t$o_cp = '<div class=\"o-cp o-block\"><h2>Contactpersoon</h2><p><span class=\"o-titel\">Naam: </span>' . $f_cp_voornaam . ' ' . $f_cp_achternaam .\n\t'<br /><span class=\"o-titel\">Email: </span>' . $f_cp_email .\n\t'<br /><span class=\"o-titel\">Telefoon: </span>' . $f_cp_telefoon .\n\t'<br /><span class=\"o-titel\">Adres: </span>' . $f_cp_adres .\n\t'<br /><span class=\"o-titel\">Plaats: </span>' . $f_cp_postcode . ' ' . $f_cp_plaats .\n\t'<br /><span class=\"o-titel\">Sportkamp: </span>' . $f_cp_sportkamp;\n\tif (strpos( $f_cp_sportkamp, 'Adventure') !== false ) {\n\t\t$o_cp = $o_cp .'<br /><span class=\"o-titel\">Picknick: </span>' . $f_cp_picknick;\n\t}\n\t$o_cp = $o_cp .'<br /><span class=\"o-titel\">Aantal personen: </span>' . $f_cp_aantalpersonen .\n\t'<br /><span class=\"o-titel\">Prijs per persoon: </span>' . $f_cp_pppersoon .\n\t'<br /><span class=\"o-titel\">Totaal te betalen: </span>' . $f_cp_totaal . '</p>' .\n\t'<p><input type=\\'button\\' id=\\'gform_previous_button_2_53\\' class=\\'gform_previous_button button\\' value=\\'Contactpersoon aanpassen\\' onclick=\\'jQuery(\"#gform_target_page_number_2\").val(\"1\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); \\' onkeypress=\\'if( event.keyCode == 13 ){ jQuery(\"#gform_target_page_number_2\").val(\"1\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); } \\' />' .\n\t\n\t'</div>';\n\n\t$o_deelnemers = '<div class=\"o-cp o-block\"><h2>Deelnemers</h2>' . \n\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d1_voornaam . ' ' . $f_d1_achternaam .\n\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d1_geslacht .\n\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d1_geboortedatum . '</p>';\n\n\tif ($f_cp_aantalpersonen > 1) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d2_voornaam . ' ' . $f_d2_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d2_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d2_geboortedatum . '</p>';\t} \n\tif ($f_cp_aantalpersonen > 2) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d3_voornaam . ' ' . $f_d3_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d3_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d3_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 3) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d3_voornaam . ' ' . $f_d3_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d3_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d3_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 4) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d4_voornaam . ' ' . $f_d4_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d4_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d4_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 5) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d5_voornaam . ' ' . $f_d5_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d5_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d5_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen >= 6) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d6_voornaam . ' ' . $f_d6_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d6_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d6_geboortedatum . '</p>'; }\n\t\n\t$o_deelnemers = $o_deelnemers . '<p><input type=\\'button\\' id=\\'gform_previous_button_2_53\\' class=\\'gform_previous_button button\\' value=\\'Deelnemers aanpassen\\' onclick=\\'jQuery(\"#gform_target_page_number_2\").val(\"2\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); \\' onkeypress=\\'if( event.keyCode == 13 ){ jQuery(\"#gform_target_page_number_2\").val(\"2\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); } \\' />' . '</div>';\n\t\n\t# The above code that defines the input button, is retrieved from the form itself and makes a shortcut button to one of the relevant pages on the form.\n\t\n\t# Eventually you need to populate the review page. Combine all the variables you filled earlier into 1 single variable that's returned.\n\t$review_page['content'] = $o_cp . $o_deelnemers;\n \n\treturn $review_page;\n\t}", "function display_dj_blog_form($FormID) {\r\n $edit = is_array($video);\r\n\r\n\r\n // most of the form is in plain HTML with some\r\n // optional PHP bits throughout\r\n?>\r\n\r\n <form method=\"post\"\r\n action=\"insert_dj_blog_entry.php\">\r\n <table border=\"0\">\r\n <tr class=\"NotVisible\">\r\n <td>DJID:</td>\r\n <td><input type=\"text\" name=\"DJID\" \r\n value=\"<?php echo $FormID; ?>\" readonly/></td>\r\n </tr>\r\n <tr>\r\n <td>Blog:</td>\r\n <td><input type=\"text\" name=\"Blog\" size=\"40\"\r\n value=\"\" /></td>\r\n </tr>\r\n <tr>\r\n <td>Time:</td>\r\n <td>\r\n <select name=\"Time\">\r\n <option value=\"\">Select...</option>\r\n <option value=\"30\">30 minutes</option>\r\n <option value=\"60\">60 minutes</option>\r\n </select> \r\n </td> \r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <input type=\"submit\"\r\n value=\"Insert Blog\" />\r\n </td>\r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n\r\n<?php\r\n}", "function bloglines($content) {\n$att = getattributes($content);\nif (isset($att['username'])) { \n $remote = \"http://rpc.bloglines.com/blogroll?html=1&id={$att['username']}\";\n if (isset($att['folder'])) {\n $remote .= \"&folder={$att['folder']}\";\n }\n} else { $remote = \"\"; }\n\nif (ini_get('allow_url_fopen')) {\n\n //copy the file from the url to variable\n $sourcefile = fopen ($remote, \"rb\") OR die(\"not successfully!\");\n $eof = false;\n $return = \"\";\n do {\r\n $temp = fread ($sourcefile, 1024) OR $eof = true;\n $return .= $temp;\n } while ($eof==false);\n fclose($sourcefile);\n\n} else {\n $return = \"<script language=\\\"javascript\\\"\";\n $return .= \"type=\\\"text/javascript\\\" src=\\\"$remote\\\"></script>\";\n $return = str_replace(\"?html=1&\", \"?\", $return);\n}\n\nreturn $return;\n}", "function insert_post($advanced = FALSE){\r\n $new_post = new form('new_post');\r\n $new_post->add(new form_text('title', 'Title'));\r\n $new_post->title->set_validators('is_safe_text', 'is_required');\r\n $new_post->title->set_attributes(array('length' => 255, 'size' => 80));\r\n\r\n // run query to get all the navigation items that can have content sent to\r\n $result = $this->reg->db->GetAll('SELECT id, name\r\n FROM system__navigation\r\n WHERE navigation_type != ?', array('direct'));\r\n\r\n // populate pages array for form object\r\n $pages_array = array('' => 'Choose a Page');\r\n foreach($result as $pages){\r\n $pages_array[$pages['id']] = ucwords($pages['name']);\r\n }\r\n\r\n $new_post->add(new form_select('pages', 'Submit to', $pages_array));\r\n $new_post->pages->set_multiplier(1, 'Add Another');\r\n\r\n // show advanced options if enabled\r\n if($advanced){\r\n $new_post->add(new form_hidden('advanced', TRUE));\r\n\r\n // get default option values\r\n $default_options = array();\r\n if($this->reg->config->is_set('post_show_title') && $this->reg->config->get('post_show_title'))\r\n $default_options[] = 'show_title';\r\n if($this->reg->config->is_set('post_show_date') && $this->reg->config->get('post_show_date'))\r\n $default_options[] = 'show_date';\r\n\r\n // create options check boxes\r\n $new_post->add(new form_checkbox('options', 'Options', array('show_title' => 'Show Title', 'show_date' => 'Show Date')));\r\n $new_post->options->set_default($default_options);\r\n\r\n // create rich text editor\r\n $new_post->add(new form_editor_ace('head', 'Hook Into HTML Head', 'html'));\r\n $new_post->head->set_attributes(array('style' => 'height:10em;'));\r\n $new_post->head->set_li_attributes(array('class' => 'form-richtextarea'));\r\n\r\n // create rich text editor\r\n $new_post->add(new form_editor_ace('content', 'Content'));\r\n $new_post->content->set_validators('is_required');\r\n $new_post->content->set_attributes(array('style' => 'height:30em;'));\r\n $new_post->content->set_li_attributes(array('class' => 'form-richtextarea'));\r\n }else{\r\n // create rich text editor\r\n $new_post->add(new form_editor_ckeditor('content', 'Content'));\r\n $new_post->content->set_validators('is_required');\r\n $new_post->content->set_li_attributes(array('class' => 'form-richtextarea'));\r\n }\r\n\r\n $new_post->add(new form_submit('save', 'Save'));\r\n $new_post->add(new form_submit('state', 'Publish'))->set_attributes(array('value' => 1));\r\n\r\n // return the form html\r\n return $new_post->run();\r\n }", "function blog($numPage = 1){\n\t\t//$this->traitementFormHeader();\n\t\t$this->infosDetail[\"numPage\"] = $numPage;\n\t\treturn $this->construireHtml([\"header\", \"section-blog\", \"footer\"]);\n\t}", "private function validatePost() {\n if( isset($_POST['body']) && isset($_POST['title']) ) {\n $message = '';\n $body = trim($_POST['body']);\n $body = strtolower($body);\n $title = trim($_POST['title']);\n $title = strtoupper($title);\n\n if( $body != '' && $title != '' ) {\n $message = 'Completado con exito';\n\n if( isset($_POST['repeat']) ) {\n\n $i = 0 ;\n while( $i < $_POST['repeat'] ) {\n $_SESSION['blogs'][] = [\n 'title' => $title,\n 'body' => $body\n ];\n $i++;\n }\n\n }else {\n $_SESSION['blogs'][] = [\n 'title' => $title,\n 'body' => $body\n ];\n }\n } else {\n $message = 'Error, completa los campos';\n }\n echo $message;\n }\n \n }", "function storyEdit($subject, $hometext, $bodytext, $notes, $topic, $ihome, $catid, $alanguage, $comm, $aid, $informant, $format_type=0)\n{\n if (empty($format_type)) {\n $format_type = 0;\n }\n\n // Get the format types. 'home' string is bits 0-1, 'body' is bits 2-3.\n $format_type_home = ($format_type%4);\n $format_type_body = (($format_type/4)%4);\n\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n\n echo '<strong>'._TITLE.'</strong><br />'\n .'<input type=\"text\" name=\"subject\" size=\"50\" value=\"' . pnVarPrepForDisplay($subject) . '\" /><br />';\n buildTopicsMenu($topic);\n SelectCategory($catid);\n echo '<br />';\n puthome($ihome);\n withcomments($comm);\n // new function !\n buildLanguageMenu(true,$alanguage);\n\n $bbcode = array('', '', '');\n if(pnModIsHooked('pn_bbcode', 'Submit_News') && pnModIsHooked('pn_bbcode', 'AddStory') && pnModIsHooked('pn_bbcode', 'News')) {\n $bbcode[0] = pnModFunc('pn_bbcode', 'user', 'bbcodes', array('textfieldid' => 'articletext'));\n $bbcode[1] = pnModFunc('pn_bbcode', 'user', 'bbcodes', array('textfieldid' => 'extendedtext'));\n $bbcode[2] = pnModFunc('pn_bbcode', 'user', 'bbcodes', array('textfieldid' => 'notestext'));\n }\n $bbsmile = array('', '', '');\n if(pnModIsHooked('pn_bbsmile', 'Submit_News') && pnModIsHooked('pn_bbsmile', 'AddStory') && pnModIsHooked('pn_bbsmile', 'News')) {\n pnModAPILoad('pn_bbsmile', 'user');\n $bbsmile[0] = pnModFunc('pn_bbsmile', 'user', 'bbsmiles', array('textfieldid' => 'articletext'));\n $bbsmile[1] = pnModFunc('pn_bbsmile', 'user', 'bbsmiles', array('textfieldid' => 'extendedtext'));\n $bbsmile[2] = pnModFunc('pn_bbsmile', 'user', 'bbsmiles', array('textfieldid' => 'notestext'));\n }\n\n echo '<br /><strong>'._STORYTEXT.'</strong><br />'\n .'<textarea cols=\"80\" rows=\"10\" name=\"hometext\" id=\"articletext\">';\n // Remove br tags only if format of hometext is 'text'.\n if ($format_type_home == 0)\n {\n echo pnVarPrepForDisplay(unnltobr($hometext));\n } else {\n echo pnVarPrepForDisplay($hometext);\n }\n echo '</textarea><br />'\n . $bbcode[0]\n . $bbsmile[0] ;\n\n // Choose format type for hometext.\n buildFormatTypeMenu(\"format_type_home\", $format_type_home);\n\n echo '<br /><strong>'._EXTENDEDTEXT.'</strong><br />'\n .'<textarea cols=\"80\" rows=\"10\" name=\"bodytext\" id=\"extendedtext\">';\n // Remove br tags only if format of bodytext is 'text'\n // The bodytext flag is in bits 2 and 3.\n if ($format_type_body == 0) {\n echo pnVarPrepForDisplay(unnltobr($bodytext));\n } else {\n echo pnVarPrepForDisplay($bodytext);\n }\n echo '</textarea><br />'\n . $bbcode[1]\n . $bbsmile[1]\n . _PAGEBREAK.'<br />';\n // Choose format type for hometext.\n buildFormatTypeMenu(\"format_type_body\", $format_type_body);\n\n echo '<br />'._AREYOUSURE.'<br />';\n if (pnSecAuthAction(0, 'Stories::', \"$subject::\", ACCESS_EDIT)) {\n echo '<strong>'._NOTES.'</strong><br />'\n . '<textarea cols=\"80\" rows=\"5\" name=\"notes\" id=\"notestext\">'\n . pnVarPrepForDisplay(unnltobr($notes)) . '</textarea>'\n . '<br />'\n . $bbcode[2]\n . $bbsmile[2];\n } else {\n echo '<input type=\"hidden\" value=\"' . pnVarPrepForDisplay($notes). '\" />';\n }\n}", "public function modifyStory()\n\t\t{\n\n\t\t\tforeach($_POST as $key => $value) {\n\t\t\t\tif($value != \"\") {\n\t\t\t\t\t$sql = \"INSERT INTO `BreakingNews`(`News`) VALUES (\\\"$value\\\")\";\n\t\t\t\t\t$result = $this->connection->query($sql);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "private function validateNewsForm($post){\n $return = TRUE;\n if (strlen($post['news_title']) == 0) {\n setErrorMessage(\"News title is required\");\n $return = FALSE;\n }\n if (strlen($post['news_message']) == 0) {\n setErrorMessage(\"News message is required\");\n $return = FALSE;\n }\n\n //Just checking if somebody is try to hack me.\n if (userLoggedIn()) {\n if ($post['news_pubunpub'] !== '0' and $post['news_pubunpub'] !== '1') {\n setErrorMessage('Unknown input');\n $return = FALSE;\n }\n }\n\n return $return;\n }", "static function validation(){\r\n jresearchimport('helpers.charsets', 'jresearch.admin');\r\n jresearchimport('tables.activity', 'jresearch.admin');\r\n $extra = implode('', JResearchCharsetsHelper::getLatinWordSpecialChars());\r\n $doc = JFactory::getDocument();\r\n $token = JSession::getFormToken();\r\n JHTML::_('behavior.tooltip');\r\n JHTML::_('behavior.formvalidation');\r\n $message = JText::_('JRESEARCH_FORM_NOT_VALID');\r\n\r\n $doc->addScriptDeclaration(\"Joomla.submitbutton = function(task){\r\n if (task == ''){\r\n return false;\r\n }else{\r\n var isValid=true;\r\n if (task != 'cancel' && task != 'close'){\r\n var forms = $$('form.form-validate');\r\n for (var i=0;i<forms.length;i++)\r\n {\r\n if (!document.formvalidator.isValid(forms[i]))\r\n {\r\n isValid = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (isValid) {\r\n Joomla.submitform(task);\r\n return true;\r\n } else {\r\n alert(Joomla.JText._('COM_JRESEARCH_FORM_ERROR_UNACCEPTABLE','Some values are unacceptable'));\r\n return false;\r\n }\r\n }\r\n };\");\r\n\r\n $doc->addScriptDeclaration('window.addEvent(\\'domready\\', function() {\r\n document.formvalidator.setHandler(\\'date\\', function(value) {\r\n regex=/^\\d{4}(-\\d{2}){2}$/;\r\n return regex.test(value); })\r\n });');\r\n\r\n $doc->addScriptDeclaration('window.addEvent(\\'domready\\', function() {\r\n document.formvalidator.setHandler(\\'url\\', function(value) {\r\n regex=/^(ftp|http|https|ftps):\\/\\/([a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}|localhost|\\d{1,3}(\\.\\d{1,3}){3})(:\\d{2,5})?(([0-9]{1,5})?\\/.*)?$/i;\r\n return regex.test(value); })\r\n });');\r\n\r\n $doc->addScriptDeclaration('window.addEvent(\\'domready\\', function() {\r\n document.formvalidator.setHandler(\\'year\\', function(value) {\r\n regex=/^([1-9]\\d{3}|0)$/i;\r\n return regex.test(value); })\r\n });');\r\n\r\n $doc->addScriptDeclaration('window.addEvent(\\'domready\\', function() {\r\n document.formvalidator.setHandler(\\'number\\', function(value) {\r\n regex=/^([\\+\\-]{0,1}\\d+\\.?\\d*)$/i;\r\n return regex.test(value); })\r\n });');\r\n \r\n $delimiter = JResearchActivity::$_keywordsDelimiter;\r\n $doc->addScriptDeclaration(\"window.addEvent('domready', function() {\r\n document.formvalidator.setHandler('keywords', function(value) {\r\n regex=/^[-_'\\w$extra\\s\\d]+(\".$delimiter.\"[-_'\\w$extra\\s\\d]+)*\".$delimiter.\"*$/i;\r\n return regex.test(value); })\r\n });\");\r\n\r\n $doc->addScriptDeclaration(\"window.addEvent('domready', function() {\r\n document.formvalidator.setHandler('issn', function(value) {\r\n regex=/^\\d{4}-?\\d{4}$/i;\r\n return regex.test(value); })\r\n });\");\r\n\r\n $doc->addScriptDeclaration(\"window.addEvent('domready', function() {\r\n document.formvalidator.setHandler('isbn', function(value) {\r\n regex=/^(\\d{10}|\\d{13}|\\d{9}x)$/i;\r\n return regex.test(value); })\r\n });\");\r\n }", "public function add($args){\n global $SnickerIndex, $SnickerUsers;\n\n // Loop Default Fields\n $row = array();\n foreach($this->dbFields AS $field => $value){\n if(isset($args[$field])){\n $final = $args[$field];\n } else {\n $final = $value;\n }\n settype($final, gettype($value));\n $row[$field] = $final;\n }\n\n // Create (U)UIDs\n $uid = $this->generateUID();\n $row[\"page_uuid\"] = $this->uuid;\n\n // Validate Parent UID\n if(!empty($row[\"parent_uid\"]) && !$this->exists($row[\"parent_uid\"])){\n $row[\"parent_uid\"] = null;\n }\n\n // Validate Type and Depth\n if(!empty($row[\"parent_uid\"])){\n $row[\"type\"] = \"reply\";\n $row[\"depth\"] = $this->db[$row[\"parent_uid\"]][\"depth\"] + 1;\n } else {\n $row[\"type\"] = \"comment\";\n $row[\"depth\"] = 1;\n }\n\n // Validata Status\n if(!in_array($row[\"status\"], array(\"pending\", \"approved\", \"rejected\", \"spam\"))){\n $row[\"status\"] = \"pending\";\n }\n\n // Sanitize Strings\n $row[\"title\"] = Sanitize::html(strip_tags($row[\"title\"]));\n $row[\"author\"] = Sanitize::html($row[\"author\"]);\n\n // Sanitize Comment\n $allowed = \"<a><b><strong><i><em><u><del><ins><s><strike><p><br><br/><br />\";\n $allowed .= \"<mark><abbr><acronym><dfn><ul><ol><li><dl><dt><dd><hr><hr/><hr />\";\n if(sn_config(\"comment_markup_html\")){\n $row[\"comment\"] = strip_tags($row[\"comment\"], $allowed);\n } else {\n $row[\"comment\"] = strip_tags($row[\"comment\"]);\n }\n $row[\"comment\"] = Sanitize::html($row[\"comment\"]);\n\n // Validate Comment\n $limit = sn_config(\"comment_limit\");\n if($limit > 0 && strlen($row[\"comment\"]) > $limit){\n $row[\"comment\"] = substr($row[\"comment\"], 0, $limit);\n }\n\n // Set Static Data\n $row[\"rating\"] = array(0, 0);\n $row[\"subscribe\"] = $row[\"subscribe\"] === true;\n $row[\"date\"] = Date::current(DB_DATE_FORMAT);\n $row[\"dateModified\"] = \"\";\n if($row[\"status\"] !== \"pending\"){\n $row[\"dateAudit\"] = Date::current(DB_DATE_FORMAT);\n }\n\n // Add Index\n if(!is_a($SnickerIndex, \"CommentsIndex\")){\n $SnickerIndex = new CommentsIndex();\n }\n if(!$SnickerIndex->add($uid, $row)){\n return false;\n }\n if(strpos($row[\"author\"], \"guest::\") === 0){\n $SnickerUsers->addComment(substr($row[\"author\"], strlen(\"guest::\")), $uid);\n }\n\n // Insert Comment\n $this->db[$uid] = $row;\n $this->sortBy();\n if($this->save() !== true){\n Log::set(__METHOD__, \"error-update-db\");\n return false;\n }\n return $uid;\n }", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function thumbwhere_contentcollection_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_actor\n $value = $form['fk_actor']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_actor'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_actor']);\n if (twCanDebug()) debug('fk_actor = ' . $value);\n // Validate fk fk_actor\n if (empty($value)) {\n form_set_error('fk_actor', t('Validation error, \\'fk_actor\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_actor\\' in is mandatory');\n }\n\n // Validate normaltitle\n $value = $form['title']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n \n \n \n}", "private function _postValidation()\r\n\t{\r\n // Used $_POST here to allow us to modify them directly - naughty I know :)\r\n\r\n\t\tif (empty($_POST['description']) OR strlen($_POST['description']) > 10000)\r\n\t\t\t$this->_mod_errors[] = $this->l('Description is invalid');\r\n\t\t// could check that this is a valid path, but the next test will\r\n\t\t// do that for us anyway\r\n\t\t// But first we need to get rid of the escape characters\r\n\t\t$_POST['filepath'] = $this->winFixFilename($_POST['filepath']);\r\n\t\tif (empty($_POST['filepath']) OR (strlen($_POST['filepath']) > 255))\r\n\t\t\t$this->_mod_errors[] = $this->l('The target location is invalid');\r\n\r\n\t\tif (file_exists($_POST['filepath']) && !is_writable($_POST['filepath']))\r\n\t\t\t$this->_mod_errors[] = $this->l('File error.<br />Cannot write to').' '.$_POST['filepath'];\r\n\t}", "public function set_post_content( $entry, $form ) {\t\t\n\t \t\n\t $comment_author_ip = $entry['ip']; // IP of the user's machine\n\t\t$comment_author_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $comment_author_ip );\n\n\t\t$review_content = $entry['6']; // Body of Review\n\t\t$comment_type = 'edd_review'; // Comment Type\n\t\t$comment_agent = $entry['user_agent']; // User Agent\n\t\t\n\t\t/**\n\t\t * Getting Download ID for the plugin selected when submitting the review.\n\t\t */\n\n\t\t$comment_post_ID = '';\n\n\t\tswitch ( $entry['4'] ) {\n\t\t\tcase 'bkap':\n\t\t\t\t$comment_post_ID = 22; // Booking & Appointment Plugin for WooCommerce \n\t\t\t\tbreak;\n\t\t\tcase 'ac':\n\t\t\t\t$comment_post_ID = 20; // Abandoned Cart Pro\n\t\t\t\tbreak;\n\t\t\tcase 'orddd':\n\t\t\t\t$comment_post_ID = 16; // Order Delivery Date Pro\n\t\t\t\tbreak;\n\t\t\tcase 'pdd':\n\t\t\t\t$comment_post_ID = 238877; // Product Delivery Date Pro\n\t\t\t\tbreak;\n\t\t\tcase 'dw':\n\t\t\t\t$comment_post_ID = 286317; // Deposits for WooCommerce\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/**\n\t\t * Getting user infomration.\n\t\t * If the user is logged in user then its data will be fetched from system \n\t\t * else only those data will be assieged which are subbmitted by reviewer.\n\t\t */\n\n\t\t$user_id = '';\n\t\t\n\t\tif( ( isset( $entry['created_by'] ) && $entry['created_by'] != \"\" ) || email_exists( $entry['2'] ) ){\n\t\t\t\n\t\t\tif ( isset( $entry['created_by'] ) && $entry['created_by'] != \"\" ) {\n\t\t\t\t$user_id \t= $entry['created_by'];\n\t\t\t}else{\n\t\t\t\t$user_id \t= email_exists( $entry['2'] );\n\t\t\t}\n\t\t\t\n\t\t\t$user = get_user_by( 'ID', $user_id );\n\n\t\t\tif ( empty( $user->display_name ) ) {\n\t\t\t\t$user->display_name = $user->user_login;\n\t\t\t}\n\n\t\t\t$review_author = wp_slash( $user->display_name );\n\t\t\t$review_author_email = wp_slash( $user->user_email );\n\t\t\t$review_author_url = wp_slash( $user->user_url );\n\n\t\t}else{\n\t\t\t$review_author = isset( $entry['1'] ) ? trim( $entry['1'] ) : null;\n\t\t\t$review_author_email = isset( $entry['2'] ) ? trim( $entry['2'] ) : null;\n\t\t\t$review_author_url = \"\";\n\t\t\t\n\t\t\t$review_author = wp_slash( sanitize_text_field( wp_filter_nohtml_kses( esc_html( $review_author ) ) ) );\n\t\t\t$review_author_email = wp_slash( sanitize_text_field( wp_filter_nohtml_kses( esc_html( $review_author_email ) ) ) );\n\t\t}\n\n\t\t/**\n\t\t * Getting rating infromation.\n\t\t */\n\n\t\t$rating = 0;\n\n\t\tif ( isset( $entry['10'] ) && $entry['10'] != \"\" ){\n\n\t\t\tswitch ( $entry['10'] ) {\n\t\t\t\tcase 'poor':\n\t\t\t\t\t$rating = 1;\n\t\t\t \t\t$review_title = __( \"Poor Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'average':\n\t\t\t\t\t$rating = 2;\n\t\t\t \t\t$review_title = __( \"Average Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'good':\n\t\t\t\t\t$rating = 3;\n\t\t\t \t\t$review_title = __( \"Good Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'very_good':\n\t\t\t\t\t$rating = 4;\n\t\t\t \t\t$review_title = __( \"Very Good Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'excellent':\n\t\t\t\t\t$rating = 5;\n\t\t\t \t\t$review_title = __( \"Excellent Plugin\", \"edd-gf\" );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Image url of the reviewer.\n\t\t */\n\n\t\t$img_url = '';\n\t\tif ( isset( $entry['6'] ) && $entry['6'] != \"\" ){\n\t\t\t$img_url = $entry['6'];\n\t\t}\n\n\t\t/**\n\t\t * Preparing arguments which is to be passed to create a comment(review).\n\t\t */\n\n\t\t$args = apply_filters( 'edd_reviews_insert_review_args', array(\n\t\t\t'comment_post_ID' => $comment_post_ID,\n\t\t\t'comment_author' => $review_author,\n\t\t\t'comment_author_email' => $review_author_email,\n\t\t\t'comment_author_url' => $review_author_url,\n\t\t\t'comment_content' => $review_content,\n\t\t\t'comment_type' => $comment_type,\n\t\t\t'comment_parent' => '',\n\t\t\t'comment_author_IP' => $comment_author_ip,\n\t\t\t'comment_agent' => isset( $comment_agent ) ? substr( $comment_agent, 0, 254 ) : '',\n\t\t\t'user_id' => $user_id,\n\t\t\t'comment_date' => current_time( 'mysql' ),\n\t\t\t'comment_date_gmt' => current_time( 'mysql', 1 ),\n\t\t\t'comment_approved' => 1\n\t\t) );\n\n\t\t$comment_allowed \t= wp_allow_comment( $args );\n\t\t$args \t\t\t\t= apply_filters( 'preprocess_comment', $args );\n\t\t$review_id \t\t\t= wp_insert_comment( wp_filter_comment( $args ) );\n\n\t\t/**\n\t\t * Comment meta to be inserted when review (comment) is created.\n\t\t */\n\n\t\tadd_comment_meta( $review_id, 'edd_rating', $rating );\n\t\tadd_comment_meta( $review_id, 'edd_review_title', $review_title );\n\t\tadd_comment_meta( $review_id, 'edd_review_approved', $comment_allowed );\n\n\t\t/**\n\t\t * Additional Comment meta to store image url and category related information\n\t\t */\n\n\t\tadd_comment_meta( $review_id, 'edd_review_source', 546 );\n\t\tadd_comment_meta( $review_id, 'edd_review_categories', '' );\n\t\tadd_comment_meta( $review_id, 'edd_review_generic', '' );\n\t\tadd_comment_meta( $review_id, 'edd_review_img_url', $img_url );\n\n\t\t/**\n\t\t * Add review metadata to the $args so it can be passed to the notification email\n\t\t */\n\n\t\t$args['id'] = $review_id;\n\t\t$args['rating' ] = $rating;\n\t\t$args['review_title'] = $review_title;\n\t\t$args['review_approved'] = $comment_allowed;\t\t\n\n\t\tupdate_post_meta( $comment_post_ID, 'edd_reviews_average_rating', EDD_Reviews::average_rating( false, $comment_post_ID ) );\t\n\t}", "function wiki_edit_post($post_id, $message, $validated, $member = null, $page_id = null, $edit_time = null, $add_time = null, $views = null, $null_is_literal = false)\n{\n if (is_null($edit_time)) {\n $edit_time = $null_is_literal ? null : time();\n }\n\n $rows = $GLOBALS['SITE_DB']->query_select('wiki_posts', array('*'), array('id' => $post_id), '', 1);\n if (!array_key_exists(0, $rows)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'wiki_post'));\n }\n $myrow = $rows[0];\n $original_poster = $myrow['member_id'];\n $page_id = $myrow['page_id'];\n $_message = $myrow['the_message'];\n\n require_code('attachments2');\n require_code('attachments3');\n\n if (!addon_installed('unvalidated')) {\n $validated = 1;\n }\n\n require_code('submit');\n $just_validated = (!content_validated('wiki_post', strval($post_id))) && ($validated == 1);\n if ($just_validated) {\n send_content_validated_notification('wiki_post', strval($post_id));\n }\n\n $log_id = log_it('WIKI_EDIT_POST', strval($post_id), strval($page_id));\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase();\n $revision_engine->add_revision(\n 'wiki_post',\n strval($post_id),\n strval($page_id),\n '',\n get_translated_text($_message),\n $original_poster,\n $myrow['date_and_time'],\n $log_id\n );\n }\n\n $update_map = array(\n 'validated' => $validated,\n );\n $update_map += update_lang_comcode_attachments('the_message', $_message, $message, 'wiki_post', strval($post_id), null, $original_poster);\n\n if (!is_null($page_id)) {\n $update_map['page_id'] = $page_id;\n }\n\n $update_map['edit_date'] = $edit_time;\n if (!is_null($add_time)) {\n $update_map['date_and_time'] = $add_time;\n }\n if (!is_null($views)) {\n $update_map['wiki_views'] = $views;\n }\n if (!is_null($member)) {\n $update_map['member_id'] = $member;\n }\n\n $GLOBALS['SITE_DB']->query_update('wiki_posts', $update_map, array('id' => $post_id), '', 1);\n\n if (post_param_integer('send_notification', null) !== 0) {\n if ($just_validated) {\n dispatch_wiki_post_notification($post_id, 'ADD');\n } else {\n dispatch_wiki_post_notification($post_id, 'EDIT');\n }\n }\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n generate_resource_fs_moniker('wiki_post', strval($post_id));\n }\n}", "public function validate()\n\t{\n\t\tphpbb::$user->add_lang('posting');\n\n\t\t$error = array();\n\n\t\tif (utf8_clean_string($this->post_subject) === '')\n\t\t{\n\t\t\t$error[] = phpbb::$user->lang['EMPTY_SUBJECT'];\n\t\t}\n\n\t\t$this->post_subject = truncate_string($this->post_subject);\n\n\t\t$message_length = utf8_strlen($this->post_text);\n\n\t\tif ($message_length < (int) phpbb::$config['min_post_chars'])\n\t\t{\n\t\t\tif ($message_length)\n\t\t\t{\n\t\t\t\t$error[] = phpbb::$user->lang('CHARS_POST_CONTAINS', $message_length) . '<br />' .\n\t\t\t\t\tphpbb::$user->lang('TOO_FEW_CHARS_LIMIT', (int) phpbb::$config['min_post_chars']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$error[] = phpbb::$user->lang['TOO_FEW_CHARS'];\n\t\t\t}\n\t\t}\n\t\telse if (phpbb::$config['max_post_chars'] != 0 && $message_length > (int) phpbb::$config['max_post_chars'])\n\t\t{\n\t\t\t$error[] = sprintf(phpbb::$user->lang['TOO_MANY_CHARS_POST'], $message_length, (int) phpbb::$config['max_post_chars']);\n\t\t}\n\n\t\treturn $error;\n\t}", "public function p_add() {\n\t\t\n\t\t# Check to see if content was entered\n\t\t# If not, redirect to add post page with variable to trigger error message\n\t\tif ($_POST['content'] == \"\") {\n\t\t\tRouter::redirect('/posts/add/error');\n\t\t}\n\t\t\n\t\t# If so, add to DB with created and modified set to now\n\t\telse {\n\t\t\t$_POST['created'] = Time::now();\n\t\t\t$_POST['modified'] = Time::now();\n\t\t\t$_POST['user_id'] = $this->user->user_id;\n\t\t\tDB::instance(DB_NAME)->insert('posts', $_POST);\n\t\t\tRouter::redirect('/posts/stream/yours');\n\t\t}\n\t}", "public static function onBeforeFormInfo(){\n\t\t\t\t\n\t\tif(BlogPress::IsError()){\n\t\t\t\t\t\n\t\t\tif(strpos(BlogPress::GetError(), 'code002') !== false){\n\t\t\t\techo '<div class=\"box-form-error\">\n\t\t\t\t\t<h2>' . MUI('Une erreur est survenue lors de la modification des informations de votre compte') .' (code: 002)</h2>\n\t\t\t\t\t<p>' . MUI('Une erreur technique est survenue. L\\'équipe technique travail à la résolution du problème, merci de retenter cette opération un peu plutard !').'</p>\n\t\t\t\t\t<p>' . MUI('Cordialement').',</p>\n\t\t\t\t\t<p>' . MUI('L\\'équipe de') .' '. Blog::GetInfo('title').'</p>\n\t\t\t\t</div>';\n\t\t\t\t\n\t\t\t}elseif(strpos(BlogPress::GetError(), 'code002') !== false){\n\t\t\t\techo '<div class=\"box-form-error\">\n\t\t\t\t\t\t<h2>' . MUI('Une erreur est survenue lors de la modification des informations de votre compte').' (code: 001)</h2>\n\t\t\t\t\t\t<p>' . MUI('Une erreur technique est survenue. L\\'équipe technique travail à la résolution du problème, merci de retenter cette opération un peu plutard !').'</p>\n\t\t\t\t\t\t<p>' . MUI('Cordialement').',</p>\n\t\t\t\t\t\t<p>' . MUI('L\\'équipe de') . ' '. Blog::GetInfo('title').'</p>\n\t\t\t\t\t</div>';\n\t\t\t}else{\n\t\t\t\techo '\n\t\t\t\t\t<div class=\"box-form-error\">\n\t\t\t\t\t\t<h2>' . MUI('Erreur dans le formulaire').'</h2>\n\t\t\t\t\t\t<p>' . MUI('Le formulaire a rencontré une ou plusieurs erreurs indiquées ci-après').' :</p>\n\t\t\t\t\t\t'.BlogPress::GetError().'\n\t\t\t\t\t</div>';\n\t\t\t}\n\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\techo '\n\t\t\t\t<div class=\"box-form-valid\">\n\t\t\t\t\t<h2>' . MUI('Vos informations ont correctement enregistrés !') . '</h2>\n\t\t\t\t</div>\t\t\t\t\n\t\t\t\t';\n\t\t\t\t\t\t\n\t\t}\n\t}", "public function for_blog($blog_id = '')\n {\n }", "function create_empty_blog($domain, $path, $weblog_title, $site_id = 1)\n {\n }", "function wpmu_update_blogs_date()\n {\n }", "function webform2html_edit_form_validate($form, &$form_state) {\n if ($form_state['values']['op'] == t('Save')) {\n/* if (!empty($form_state['values']['h_txt'])) {\n $header = explode('<br />', nl2br( str_replace('<br>', '<br />', $form_state['values']['h_txt']) ) );\n if ( count($header) > 5) {\n form_set_error('h_txt', t('Up to 5 rows can be set!'));\n }\n }\n\n if (!empty($form_state['values']['f_txt'])) {\n $footer = explode('<br />', nl2br( str_replace('<br>', '<br />', $form_state['values']['f_txt']) ) );\n if ( count($footer) > 2) {\n form_set_error('f_txt', t('Up to 2 rows can be set!'));\n }\n }\n\n if (!(is_numeric($form_state['values']['h_font_size']) && ($form_state['values']['h_font_size'] > 0))) {\n form_set_error('h_font_size', t('Header font size must be numeric.'));\n }\n\n if (!(is_numeric($form_state['values']['p_font_size']) && ($form_state['values']['p_font_size'] > 0))) {\n form_set_error('p_font_size', t('Content font size must be numeric.'));\n }\n\n if (!(is_numeric($form_state['values']['f_font_size']) && ($form_state['values']['f_font_size'] > 0))) {\n form_set_error('f_font_size', t('Footer font size must be numeric.'));\n }\n*/\n }\n}", "function editBlogMessage(int $eventid) \n {\n // SPEICHERUNG\n if (isset($_POST['editblogentry']) AND isset($_POST['editblogid'])) {\n if ($this->checkEventOwner($eventid) == true) {\n $text = $_POST['editblogentry'];\n $counttext = $this->checkString($text);\n \n $id = $_POST['editblogid'];\n\n if (is_numeric($id) == true) {\n if (strlen($counttext) > 10) {\n $sql = \"UPDATE eventtexts SET text='$text' WHERE id='$id' LIMIT 1\";\n if ($this->sqlInsertUpdateDelete($sql) == true) {\n $this->erfolgMessage(\"Erfolgreich.\");\n } else {\n $this->errorMessage(\"Nicht erfolgreich.\");\n }\n }\n }\n } else {\n $this->infoMessage(\"Du hast keine Berechtigung\");\n }\n }\n if (isset($_GET['blogedit'])) {\n // Rechte checken\n if ($this->checkEventOwner($eventid) == true) {\n $id = $_GET['blogedit'];\n // Wert checken\n if (is_numeric($id) == true) {\n $entry = $this->sqlselect(\"SELECT * FROM eventtexts WHERE id=$id AND eventid=$eventid LIMIT 1\");\n\n // Blog auf verfügbarkeit checken:\n if (isset($entry[0]->id)) {\n \n // AUSGABE\n echo \"<div class='newFahrt'>\";\n echo \"<form method=post>\";\n echo \"<input type=number value='\" .$entry[0]->id . \"' name='editblogid' hidden />\";\n echo \"<textarea class='ckeditor' name='editblogentry'> \" .$entry[0]->text . \" </textarea>\";\n echo \"<button type=submit>Änderung speichern</button>\";\n echo \"<a class='grayLink' href='?delBlog=\" .$entry[0]->id . \"'>Löschen</a>\";\n echo \"<a class='rightRedLink' href='?'>schließen</a>\";\n echo \"</form>\";\n echo \"</div>\";\n }\n }\n \n } else {\n $this->infoMessage(\"Du hast keine Berechtigung.\");\n }\n }\n }", "function phpBB_init()\n\t{\n\t}", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "function getFormRegist()\r\n{\r\n $blogManager = new Writer\\Blog\\Model\\BlogManager;\r\n $descBlog = $blogManager->getBlog();\r\n \r\n require_once 'view/backend/registration.php';\r\n}", "function write_entry ( $blog_subject, $blog_text, $tb_ping, $updateFile, $blog_categories, $blog_relatedlink, $blog_date=NULL) {\n\t\t//\n\t\t// $updateFile will either be NULL or the name of the file\n\t\t// which is being updated (i.e. entry040603-140634)\n\t\tglobal $blog_config, $sb_info;\n\n\t\t$filename=CONFIG_DIR.'~blog_entry_listing.tmp';\n\t\tsb_delete_file( $filename );\n\t\t\n\t\t$save_data = array();\n\t\t$save_data[ 'VERSION' ] = $sb_info[ 'version' ];\n\t\t$save_data[ 'SUBJECT' ] = clean_post_text( $blog_subject );\n\t\t$save_data[ 'CONTENT' ] = sb_parse_url( clean_post_text( $blog_text ) );\n\n\t\tif ( count( $blog_categories ) > 0 ) {\n\t\t\t$save_data[ 'CATEGORIES' ] = implode( ',', $blog_categories );\n\t\t}\n\t\tif ( $tb_ping !== '' ) {\n\t\t\t$save_data[ 'TB_PING' ] = clean_post_text( $tb_ping );\n\t\t}\n\n\t\t// Read more link\n\t\tif ( $blog_relatedlink !== '' ) {\n\t\t\t$save_data[ 'relatedlink' ] = clean_post_text( $blog_relatedlink );\n\t\t}\n\t\t\n\t\t$save_data[ 'IP-ADDRESS' ] = getIP(); // New 0.4.8\n\n\t\tif ( $updateFile == true ) {\n\t\t\t// Updating an entry\n\t\t\t//\n\t\t\t// We need to grab the date of the old entry.\n\t\t\tif ( file_exists( $updateFile . '.txt' ) ) {\n\t\t\t\t$oldEntryFile = $updateFile . '.txt';\n\t\t\t} elseif ( file_exists( $updateFile . '.txt.gz' ) ) {\n\t\t\t\t$oldEntryFile = $updateFile . '.txt.gz';\n\t\t\t}\n\t\t\t$oldEntryArray = blog_entry_to_array( $oldEntryFile );\n\n\t\t\t$save_data[ 'CREATEDBY' ] = $oldEntryArray[ 'CREATEDBY' ]; // New 0.5.0\n\t\t\t$save_data[ 'DATE' ] = $oldEntryArray[ 'DATE' ];\n\t\t\t$y = date('y', $save_data[ 'DATE' ] );\n\t\t\t$m = date('m', $save_data[ 'DATE' ] );\n\t\t\t//$permalink = 'index.php?y='.$y.'&amp;m='.$m.'&amp;entry='.substr($updateFile,strrpos($updateFile,'/')+1);\n\t\t\t$permalink = 'index.php?entry=' . str_replace(' ', '-', $save_data[ 'SUBJECT' ]);\n\t\t\t\n\t\t\t// Delete the old file\n\t\t\tsb_delete_file( $updateFile . '.txt' );\n\t\t\tsb_delete_file( $updateFile . '.txt.gz' );\n\t\t\t\n\t\t\t$entryFile = $updateFile . '.txt';\n\t\t} else {\n\t\t\t// Create an entry\n\t\t\t//\n\t\t\t// This is going to be a new entry.\n\t\t\t// We might need to create some directories.\n\t\t\t//\n\t\t\t// The directory and file structure is:\n\t\t\t// 'content/YY/MM/entryYYMMDD-HHMMSS.txt'\n\t\t\t// 'F j, Y, g:i a'\n\t\t\tif (!$blog_date) {\n\t\t\t\t$blog_date = time();\n\t\t\t}\n\t\t\t\n\t\t\t$save_data[ 'DATE' ] = $blog_date;\n\t\t\t$save_data[ 'CREATEDBY' ] = $_SESSION[ 'username' ]; // New 0.5.0\n\t\t\t\n\t\t\t$dir = CONTENT_DIR;\n\t\t\t$y = date('y', $blog_date);\n\t\t\t$m = date('m', $blog_date);\n\t\t\t\n\t\t\t$stamp = date('ymd-His', $blog_date);\n\t\t\t$entryFile = $dir.$y.'/'.$m.'/'.'entry'.$stamp.'.txt';\n\t\t\t\n\t\t\t//$permalink = 'index.php?y='.$y.'&amp;m='.$m.'&amp;entry=entry'.$stamp;\n\t\t\t$permalink = 'index.php?entry=' . str_replace(' ', '-', $save_data[ 'SUBJECT' ]);\n\t\t}\n\t\t\n\t\t// Implode the array\n\t\t$str = implode_with_keys( $save_data );\n\t\t\n\t\t// Save the file\t\t\n\t\t$result = sb_write_file( $entryFile, $str );\n\t\t\n\t\t// Result\n\t\tif ( $result ) {\n\t\t\t// Send Pings\n\t\t\t$url_array = explode( ',', $blog_config->getTag('BLOG_PING_URLS') );\n\t\t\tif ( is_array( $url_array ) ) {\n\t\t\t\tfor ( $i = 0; $i < count( $url_array ); $i++ ) {\n\t\t\t\t\tsb_ping( $url_array[ $i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn ( true );\n\t\t} else {\n\t\t\t// Error:\n\t\t\t// Probably couldn't create file...\n\t\t\treturn ( $entryFile );\n\t\t}\n\t}", "function user_can_edit_post_date($user_id, $post_id, $blog_id = 1)\n {\n }", "function siteInformation_validate() {\n return true;\n}", "function add_blog($data) {\n if ($this->db->insert('blog', $data)) {\n return TRUE;\n }\n }", "function df_fields_rules($fields) {\r\n\t$fields['rules'] = '<h3 id=\"leave-a-reply\">'.__(\"Leave a Reply\",THEME_NAME).'</h3>';\r\n\t$fields['note'] = '<p class=\"comment-notes\">'.__(\"Your email address will not be published. Required fields are marked \",THEME_NAME).'<span>*</span></p>';\r\n\tprint $fields['rules'].$fields['note'];\r\n}", "function linkblog_save_post( $post_id ) {\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\treturn;\n\n\t// verify data came from the linkblog meta box\n\tif ( !wp_verify_nonce( $_POST['linkblog_noncename'], plugin_basename( __FILE__ ) ) )\n\t\treturn; \n\n\t// Check user permissions\n\tif ( 'post' == $_POST['post_type'] ) {\n\t\tif ( !current_user_can( 'edit_page', $post_id ) )\n\t\t\treturn;\n\t} else {\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\n\t\t\treturn;\n\t}\n\n\t$linkblog_data = $_POST['linkblog_url'];\n\n\tif ($linkblog_data == \"\") {\n\t\treturn;\n\t} else {\n\t\tupdate_post_meta($post_id, 'linkblog_url', $linkblog_data);\n\t}\n\n}", "function clean_blog_cache($blog)\n {\n }", "function receive_form()\n{\n if (isset($_POST['cf-submitted'])) {\n global $wpdb;\n\n // sanitize form values\n $name = sanitize_text_field($_POST[\"cf-name\"]);\n $email = sanitize_email($_POST[\"cf-email\"]);\n $message = esc_textarea($_POST[\"cf-message\"]);\n Dao::insertMessage($wpdb->prefix . \"livre_dor\", new Livre_dor($message, $email, $name));\n }\n}", "function bab_pm_makeform()\n{\n global $prefs;\n\n $bab_hidden_input = '';\n $event = gps('event');\n $step = gps('step');\n\n if (!$event) {\n $event = 'postmaster';\n }\n\n if (!$step) {\n $step = 'subscribers';\n }\n\n if ($step == 'subscribers') {\n $bab_columns = array(\n 'subscriberFirstName',\n 'subscriberLastName',\n 'subscriberEmail',\n 'subscriberLists',\n );\n\n for ($i = 1; $i <= BAB_CUSTOM_FIELD_COUNT; $i++) {\n $bab_columns[] = \"subscriberCustom{$i}\";\n }\n\n $bab_submit_value = 'Add Subscriber';\n $bab_prefix = 'new';\n $subscriberToEdit = gps('subscriber');\n\n if ($subscriberToEdit) {\n $bab_hidden_input = '<input type=\"hidden\" name=\"editSubscriberId\" value=\"' . doSpecial($subscriberToEdit) . '\">';\n $bab_prefix = 'edit';\n $bab_submit_value = 'Update Subscriber Information';\n\n $row = safe_row('*', 'bab_pm_subscribers', \"subscriberID=\" . doSlash($subscriberToEdit));\n $subscriber_lists = safe_rows('*', 'bab_pm_subscribers_list', \"subscriber_id = \" . doSlash($row['subscriberID']));\n $fname = doSpecial($row['subscriberFirstName']);\n $lname = doSpecial($row['subscriberLastName']);\n echo \"<fieldset id=bab_pm_edit><legend><span class=bab_pm_underhed>Editing Subscriber: $fname $lname</span></legend>\";\n } else {\n $subscriber_lists = array();\n }\n\n $lists = safe_rows('*', 'bab_pm_list_prefs', '1=1 order by listName');\n }\n\n if ($step == 'lists') {\n $bab_columns = array('listName', 'listAdminEmail','listDescription','listUnsubscribeUrl','listEmailForm','listSubjectLine');\n $bab_submit_value = 'Add List';\n $bab_prefix = 'new';\n\n if ($listToEdit = gps('list')) {\n $bab_hidden_input = '<input type=\"hidden\" name=\"editListID\" value=\"' . $listToEdit . '\">';\n $bab_prefix = 'edit';\n $bab_submit_value = 'Update List Information';\n $bab_prefix = 'edit';\n\n $row = safe_row('*', 'bab_pm_list_prefs', \"listID=\" . doSlash($listToEdit));\n echo \"<fieldset id=bab_pm_edit><legend>Editing List: $row[listName]</legend>\";\n }\n\n $form_prefix = $prefs[_bab_prefix_key('form_select_prefix')];\n\n $forms = safe_column('name', 'txp_form',\"name LIKE '\". doSlash($form_prefix) . \"%'\");\n $form_select = selectInput($bab_prefix.ucfirst('listEmailForm'), $forms, @$row['listEmailForm']);\n // replace class\n $form_select = str_replace('class=\"list\"', 'class=\"bab_pm_input\"', $form_select);\n }\n\n // build form\n\n echo '<form method=\"POST\" id=\"subscriber_edit_form\">';\n\n foreach ($bab_columns as $column) {\n echo '<dl class=\"bab_pm_form_input\"><dt>'.bab_pm_preferences($column).'</dt><dd>';\n $bab_input_name = $bab_prefix . ucfirst($column);\n\n switch ($column) {\n case 'listEmailForm':\n echo $form_select;\n break;\n case 'listSubjectLine':\n $checkbox_text = 'Use Article Title for Subject';\n case 'listUnsubscribeUrl':\n if (empty($checkbox_text)) {\n $checkbox_text = 'Use Default';\n }\n\n $checked = empty($row[$column]) ? 'checked=\"checked\" ' : '';\n $js = <<<eojs\n<script>\n$(document).ready(function () {\n $('#{$column}_checkbox').change(function(){\n if ($(this).is(':checked')) {\n $('input[name={$bab_input_name}]').attr('disabled', true).val('');\n }\n else {\n $('input[name={$bab_input_name}]').attr('disabled', false);\n }\n });\n});\n</script>\n\neojs;\n\n echo $js . '<input id=\"'.$column.'_checkbox\" type=\"checkbox\" class=\"bab_pm_input\" ' . $checked . '/>'.$checkbox_text.'</dd><dd>' .\n '<input type=\"text\" name=\"' . $bab_input_name . '\" value=\"' . doSpecial(@$row[$column]) . '\"' .\n (!empty($checked) ? ' disabled=\"disabled\"' : '') . ' />' .\n '</dd>';\n break;\n case 'subscriberLists':\n foreach ($lists as $list) {\n $checked = '';\n\n foreach ($subscriber_lists as $slist) {\n if ($list['listID'] == $slist['list_id']) {\n $checked = 'checked=\"checked\" ';\n break;\n }\n }\n\n echo '<input type=\"checkbox\" name=\"'. $bab_input_name .'[]\" value=\"'.$list['listID'].'\"' . $checked . '/>'\n . doSpecial($list['listName']) . \"<br>\";\n }\n break;\n default:\n echo '<input type=\"text\" name=\"' . $bab_input_name . '\" value=\"' . doSpecial(@$row[$column]) . '\" class=\"bab_pm_input\">';\n break;\n }\n\n echo '</dd></dl>';\n }\n\n echo $bab_hidden_input;\n echo '<input type=\"submit\" value=\"' . doSpecial($bab_submit_value) . '\" class=\"publish\">';\n echo '</form>';\n}", "public function create()\n {\n\n if(!empty($this->data)){\n\n if($this->Blog->save($this->data)){\n $this->Session->setFlash(__('Your blog has been created'), 'success');\n $this->redirect(\"/blogs/edit/{$this->Blog->id}\");\n }else{\n $this->Session->setFlash(__('There was a problem creating your blog'), 'error');\n }\n }\n\n $this->set('syntaxes', $this->Blog->listSyntaxTypes());\n $this->set('postAccesses', $this->Blog->listPostAccess());\n $this->set('title_for_layout', 'Create a Blog');\n\n\n }", "function create_form(){\n\t\n\t$table =\"<html>\";\n\t$table.=\"<head>\";\n\t$table.=\"\t<title>New Article Entry Page</title>\";\n\t$table.=\"</head>\";\n\t\n\t// URL for the wordpress post handling page\n\t$link_admin_post = admin_url('admin-post.php');\n\t$table.=\"<form name = 'myform' method=\\\"POST\\\" action='\" . $link_admin_post . \"' id = \\\"form1\\\">\";\n\n\t// Input for Faculty member\n\t$table.= \"\t<br>\";\n\t$table.= \" <div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Tag\\\">Faculty Member/Tag: </label></p>\";\n\t$list_of_names = wp_post_tag_names();\n\t$table.=\"\t<select name=\\\"Tag\\\">\" . $list_of_names . \"</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for PMID\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"PMID\\\">PMID*: </label></p>\";\n\t$table.=\"\t<input type=\\\"number\\\" name=\\\"PMID\\\" id=\\\"PMID\\\" required>\";\n\t\n\t//autofill button\n\t$table.=' <a class=\"pmid\" data-test=\"hi\"><button id=\"autofill_btn\" type=\"button\" >Auto-Fill</button></a>';\n\t$table.=\"\t</div>\";\n\t\t\n\t// Input for Journal Issue\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label style=\\\"width: 200px;\\\" for=\\\"Journal_Issue\\\">Journal Issue: </label></p>\";\n\t$table.=\"\t<input id = 'issue' type=\\\"number\\\" name=\\\"Journal_Issue\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Volume\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Volume\\\">Journal Volume: </label></p>\";\n\t$table.=\"\t<input id = 'journal_volume' type=\\\"number\\\" name=\\\"Journal_Volume\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Title\\\">Journal Title: </label></p>\";\n\t$table.=\"\t<input id = 'journal_title' type=\\\"text\\\" name=\\\"Journal_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Year\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Year\\\">Journal Year: </label></p>\";\n\t$table.=\"\t<input id = 'year' value=\\\"2000\\\" type=\\\"number\\\" name=\\\"Journal_Year\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Month\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Month\\\">Journal Month: </label></p>\";\n\t$table.=\"\t<select id='journal_month' name=\\\"Journal Month\\\">\";\n\t$table.=\"\t\t<option value=\\\"01\\\">Jan</option>\";\n\t$table.=\"\t\t<option value=\\\"02\\\">Feb</option>\";\n\t$table.=\"\t\t<option value=\\\"03\\\">Mar</option>\";\n\t$table.=\"\t\t<option value=\\\"04\\\">Apr</option>\";\n\t$table.=\"\t\t<option value=\\\"05\\\">May</option>\";\n\t$table.=\"\t\t<option value=\\\"06\\\">Jun</option>\";\n\t$table.=\"\t\t<option value=\\\"07\\\">Jul</option>\";\n\t$table.=\"\t\t<option value=\\\"08\\\">Aug</option>\";\n\t$table.=\"\t\t<option value=\\\"09\\\">Sep</option>\";\n\t$table.=\"\t\t<option value=\\\"10\\\">Oct</option>\";\n\t$table.=\"\t\t<option value=\\\"11\\\">Nov</option>\";\n\t$table.=\"\t\t<option value=\\\"12\\\">Dec</option>\";\n\t$table.=\"\t</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Day\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Day\\\">Journal Day: </label></p>\";\n\t$table.=\"\t<input id = 'journal_day' type=\\\"text\\\" name=\\\"Journal_Day\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Date\\\">Journal Date: </label></p>\";\n\t$table.=\"\t<input id = 'journal_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Journal_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Abbreviation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Abbreviation\\\">Journal Abbreviation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_ab' type=\\\"text\\\" name=\\\"Journal_Abbreviation\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Journal Citation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Citation\\\">Journal Citation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_citation' type=\\\"text\\\" name=\\\"Journal_Citation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Title\\\">Article Title: </label></p>\";\n\t$table.=\"\t<input id=\\\"article_title\\\" type=\\\"text\\\" name=\\\"Article_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for article abstract\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Abstract\\\">Article Abstract: </label></p>\";\n\t$table.=\" <textarea id='abstract' rows = '4' cols = '60' name=\\\"Article_Abstract\\\"></textarea>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article URL\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_URL\\\">Article URL: </label></p>\";\n\t$table.=\"\t<input id = 'article_url' type=\\\"text\\\" name=\\\"Article_URL\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Pagination\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Pagination\\\">Article Pagination: </label></p>\";\n\t$table.=\"\t<input id='pages' type=\\\"text\\\" name=\\\"Article_Pagination\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Date\\\">Article Date: </label></p>\";\n\t$table.=\"\t<input id='article_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Article_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Authors\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Authors\\\">Article Authors: </label></p>\";\n\t$table.=\"\t<input id='article_authors' type=\\\"text\\\" name=\\\"Article_Authors\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Affiliations\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Affiliation\\\">Article Affiliation: </label></p>\";\n\t$table.=\"\t<input id = 'article_affiliation' type=\\\"text\\\" name=\\\"Article_Affiliation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Created\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Created\\\">Date Created: </label></p>\";\n\t$table.=\"\t<input id='date_created' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Created\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Completed\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Completed\\\">Date Completed: </label></p>\";\n\t$table.=\"\t<input id='date_completed' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Completed\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Date Revised\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Revised\\\">Date Revised: </label></p>\";\n\t$table.=\"\t<input id='date_revised' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Revised\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Hidden input (for specifying hook)\n\t$table.=\"\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new_article_form\\\">\";\n\t\n\t// Submit and reset buttons\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div id=\\\"form_btns\\\">\"; \n\t$table.=\"\t<button class=\\\"form_btn\\\"><input type=\\\"reset\\\" value=\\\"Reset!\\\" onclick=\\\"window.location.reload()\\\"></button>\";\n\t$table.=\"\t<input class=\\\"form_btn\\\" type=\\\"submit\\\" value=\\\"Submit\\\">\"; \n\t$table.=\"\t</div>\";\n\t$table.=\"</form>\";\n\n\t// Styling of the form (needs to be put in a seperate stylesheet)\n\t$table.=\"<style type=\\\"text/css\\\">\";\n\t$table.=\"\t#form_btns {\";\n\t$table.=\"\t\tmargin-left: 150px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.form_btn {\";\n\t$table.=\"\t\twidth: 80px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.label {\";\n\t$table.=\"\t\twidth: 150px;\";\n\t$table.=\"\t\tmargin: 0;\";\n\t$table.=\"\t\tfloat: left;\";\n\t$table.=\"\t}\";\n\t$table.=\"\tinput::placeholder {\";\n\t$table.=\"\t\tcolor: #a4a4a4;\";\n\t$table.=\"\t}\";\n\t$table.=\"</style>\";\n\t\n\t$table.=\"<script type='text/javascript' src=\" . plugin_dir_url(__FILE__) . \"js/autofill_ajax.js></script>\";\n\n \techo $table;\n}", "function _adminnews() {\r\n#echo dump($_GET);\r\n\t\tglobal $conf,$lang,$member;\r\n\t\t$u = $conf['site']['url'] . \"admin/news\";\r\n\t\t$r = '<a href=\\'' . $u . '\\'>&lt;--</a><br /><br />';\r\n\t\t#// wysiwyg = wysiwyg('textarea') //\r\n\t\tif ( isset ( $_GET['editpage'] ) )\r\n\t\t\t{\r\n\t\t\t\tif ( isset ( $_POST['opage'] ) && isset ( $_POST['page'] ) && isset ( $_POST['content'] ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$_POST['content'] = preg_replace(\"#\\\\\\\"#\",\"\\\"\",$_POST['content']);\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> query ( \"UPDATE `{$conf['database']['pref']}news` SET `name`='\" . secure($_POST['page']) . \"', `text`='\" . ($_POST['content']) . \"' WHERE `name`='\" . secure($_POST['opage']) . \"'\");\r\n\t\t\t\t\t\tif ($w)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$r .= $lang['news']['editedpage'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$r .= $lang['news']['noteditedpage'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> query ( \"SELECT `name`,`text` FROM `{$conf['database']['pref']}news` WHERE `name`='{$_GET['editpage']}'\" );\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> fetch ( $w, 'array' );\r\n\t\t\t\t\t\t$w = $w[0];\r\n\t\t\t\t\t\t$r .= \"<form method='post' action='{$u}editpage/{$_GET['editpage']}'><table><tr><td>{$lang['news']['title']}</td><td><input type='hidden' name='opage' value='{$w['name']}'><input type='text' name='page' value='{$w['name']}'></td></tr><tr><td>{$lang['news']['content']}</td><td><textarea id='ncontent' name='content' rows='25' cols='50'>{$w['text']}</textarea></td></tr><tr><td></td><td><input type='submit' value='{$lang['news']['save']}'></td></tr></form></table>\" . wysiwyg('ncontent');\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\telseif ( isset ( $_GET['newpage'] ) )\r\n\t\t\t{\r\n\t\t\t\tif ( isset ( $_POST['page'] ) && isset ( $_POST['content'] ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$_POST['content'] = preg_replace(\"#\\\\\\\"#\",\"\\\"\",$_POST['content']);\r\n\t\t\t\t\t\t$w = $conf['database']['db'] -> query ( \"INSERT INTO `{$conf['database']['pref']}news` ( `id`,`by`,`datetime`,`name`,`text` ) \\n VALUES ( NULL, '\" . (isset($member['realname']) ? $member['realname'] : 'Admin') . \"', CURRENT_TIMESTAMP, '{$_POST['page']}','{$_POST['content']}' );\");\r\n\t\t\t\t\t\tif ($w)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$r .= $lang['news']['createdpage'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$r .= $lang['news']['notcreatedpage'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= \"<form method='post' action='{$u}newpage'><table><tr><td>{$lang['news']['title']}</td><td><input type='text' name='page'></td></tr><tr><td>{$lang['news']['content']}</td><td><textarea id='content' name='content' rows='25' cols='50'></textarea></td></tr><tr><td></td><td><input type='submit' value='{$lang['news']['save']}'></td></tr></form></table>\" . wysiwyg('content');\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\telseif ( isset ( $_GET['deletepage'] ) )\r\n\t\t\t{\r\n\t\t\t\t$_GET['deletepage'] = secure($_GET['deletepage']);\r\n\t\t\t\t$w = $conf['database']['db'] -> query ( \"DELETE FROM `{$conf['database']['pref']}news` WHERE `name`='{$_GET['deletepage']}';\");\r\n\t\t\t\tif ($w)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= $lang['news']['deletedpage'];\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= $lang['news']['notdeletedpage'];\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\t\t$w = $conf['database']['db'] -> query ( \"SELECT `name` FROM `{$conf['database']['pref']}news`\" );\r\n\t\t\t\t$w = $conf['database']['db'] -> fetch ( $w, 'array' );\r\n\r\n\t\t\t\t$r .= '<table>';\r\n\t\t\t\tif ( $w!=\"the table is empty!\" )\r\n\t\t\t\t{\r\n \t\t\t\tfor($i=0; $i<sizeof($w); $i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= \"<tr><td>{$w[$i]['name']}</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href='{$u}editpage/{$w[$i]['name']}'>{$lang['news']['edit']}</a></td><td>&nbsp;&nbsp;</td><td><a href='{$u}deletepage/{$w[$i]['name']}' onclick=\\\"return confirm('\" . sprintf($lang['news']['suredelpage'],$w[$i]['name']) . \"');\\\">{$lang['news']['del']}</a></td></tr>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$r .= '</table>';\r\n\t\t\t\t$r .= \"<br /><a href='{$u}newpage'>{$lang['news']['newpage']}</a>\";\r\n\t\t\t}\r\n\t\treturn $r;\r\n}", "public function updateBlogPost() {\r\n\r\n\t\t$getid = $_GET['id'];\r\n\t\t$updtitle = $_POST['admblogtitle'];\r\n\t\t$updintro = $_POST['admblogintro'];\r\n\t\t$updcontent = $_POST['admblogcontent'];\r\n\r\n\t\ttry {\r\n\t\t\t// PDO initialiseren met attributes\r\n\t\t\t$stmt = new PDO(\"mysql:host=localhost;dbname=demo\", 'root', '');\r\n\t\t\t$stmt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n\t\t\t// query om post op te halen\r\n\t\t\t$query = $stmt->prepare(\r\n\t\t\t\t\t\"UPDATE `evdnl_blog_posts_yc` SET title='$updtitle', intro='$updintro', content='$updcontent' WHERE `id` = '$getid' LIMIT 1;\r\n\t\t\t\t\t UPDATE `evdnl_blog_posts_yc` SET modify_date=CURRENT_TIMESTAMP WHERE `id` = '$getid' LIMIT 1\"\r\n\t\t\t\t\t);\r\n\t\t\t$query->execute();\r\n\r\n\t\t\techo $stmt->rowCount() . \" records UPDATED successfully\";\r\n\r\n\t\t\t// header aanroepen om leeg formulier te tonen\r\n\t\t}\r\n\t\tcatch (PDOException $e) {\r\n\t\t\t$e->getMessage();\r\n\t\t}\r\n\t}", "function allow_save_post($post)\n {\n }", "function CMSBodyMain()\n\t{\techo $this->cat->InputForm();\n\t}", "function BeforeEdit(&$values, $where, &$oldvalues, &$keys, &$message, $inline, &$pageObject)\n{\n\n\t\t\n\n$fh=$values[\"FirstHalf\"];\n$sh=$values[\"SecondHalf\"];\n$fd=$values[\"FromDate\"];\n$td=$values[\"ToDate\"];\n\n$fd1=strtotime($fd);\n$td1= strtotime($td);\n\nif ($fd1>$td1) {\n\n$message = \"FromDate should be equal less than ToDate.\";\n\n$message;\n\nreturn false;\n\n\n}\n\n\nelseif ($fh!=1 and $sh!=1) {\n\n$message = \"Please select one or both FirstHalf or SecondHalf\";\n\n$message;\n\nreturn false;\n\n}\n\nelse\n{\nreturn True;\n};\n\n\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\n\n;\t\t\n}", "function thinkup_input_blogtitle() {\n\n\techo\t'<h2 class=\"blog-title\">',\n\t\t\t'<a href=\"' . esc_url( get_permalink() ) . '\" title=\"' . esc_attr( sprintf( __( 'Permalink to %s', 'ESTSB' ), the_title_attribute( 'echo=0' ) ) ) . '\">' . get_the_title() . '</a>',\n\t\t\t'</h2>';\n}", "function mft_form_comment_form_alter(&$form, &$form_state) {\n $form['author']['homepage']['#access'] = FALSE;\n $form['actions']['submit']['#value'] = t('Post');\n}", "function wp_start_scraping_edited_file_errors()\n {\n }", "function pdfbulletin_settings_form_validate(&$form, &$form_state) {\n // @todo SERIOUSLY\n}", "function publish($post)\r\n {\r\n \t // show the form if this is the first time the page is viewed\r\n \t $form = ob_get_clean(); \r\n \t if (!isset($post['submitted'])) {\r\n\t\t$GLOBALS['TEMPLATE']['content'] = $form;\r\n\t\techo $GLOBALS['TEMPLATE']['content'];\r\n\t }\t\t\r\n // otherwise process incoming data\r\n\t else\r\n\t {\r\n\t\t$publish = new Publish();\r\n\t\tif ($publish->parse($post)) {\r\n\t\t\t$publish->add();\r\n\t\t}\r\n }\r\n }", "function post($title=\"Che_Guevara\",$page=\"1\")\n\t{\n\t //this will have to be extended\n //$data['content']=markdown(file_get_contents(\"../articles/$title\".'.dat'));\n\t //This is the main routine for blog posts\n\t \n\t \n\t //for other directories actually it is similar\n\t $this->benchmark->mark('code_start');\n\n\n\t $this->load->model('Articlesmodel');\n\t \n\t $this->Articlesmodel->article_name=\"../blog/\".$title.'.dat';\n\t \n\t $data['content']=$this->Articlesmodel->get_article();\n\t \n\t //loads the parser filters\n\t //This part loads all the available filters\n\t $this->load->library('filterclass');\n\t //change wiki links and place into content\n\t $data['content']=$this->filterclass->wikitize($data['content']);\n\t $data['content']=$this->filterclass->wikisquare($data['content']);\n\t $data['content']=$this->filterclass->phpLink($data['content']);\n\t $data['content']=$this->filterclass->google($data['content']);\n\t $data['content']=$this->filterclass->nutshell($data['content']);\n\t $data['content']=$this->filterclass->warning($data['content']);\n\t $data['content']=$this->filterclass->sandbox($data['content']);\n\t $data['content']=$this->filterclass->flagicon($data['content']);\n\t \n\t //filter for tags\n\t //filterAll is required to complete this\n\t $data['feature']=$this->filterclass->feature($data['content']);\n\t $data['keywords']=$this->filterclass->parseField('keywords',$data['content']);\n\t $data['title']=$this->filterclass->parseField('title',$data['content']);\n\t $data['feature_image']=$this->filterclass->parseField('feature-image',$data['content']);\n\t //let us get the list of articles in the directory\n\n\t $this->Articlesmodel->path='../blog/';\n\t $data['list']=$this->Articlesmodel->get_articles_list();\n\t $time=60*60*24830;\n $this->output->cache(0);\n\n\t //let us view what we got by sending data and choosing the view\n\t $this->load->view('article_view',$data);\n \t}", "public function updateSettings (\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE if the update is successful, FALSE if there is a failure.\n\t\n\t// $contentForm->updateSettings();\n\t{\n\t\t// Title of the Post\n\t\tif(isset($_POST['title']) and $_POST['title'] != $this->contentData['title'])\n\t\t{\n\t\t\t$this->contentData['title'] = Sanitize::safeword($_POST['title'], \"'\\\"?\");\n\t\t\t$this->settingUpdate = true;\n\t\t}\n\t\t\n\t\t// Primary Hashtag\n\t\tif(isset($_POST['primary_hashtag']) and $_POST['primary_hashtag'] != $this->contentData['primary_hashtag'])\n\t\t{\n\t\t\t$this->contentData['primary_hashtag'] = $_POST['primary_hashtag'];\n\t\t\t$this->settingUpdate = true;\n\t\t}\n\t\t\n\t\t// Description\n\t\tif(isset($_POST['description']) and $_POST['description'] != $this->contentData['description'])\n\t\t{\n\t\t\t$this->contentData['description'] = $_POST['description'];\n\t\t\t$this->settingUpdate = true;\n\t\t}\n\t\t\n\t\tif(Me::$clearance >= 6)\n\t\t{\n\t\t\t// Author\n\t\t\tif(isset($_POST['author']) and $_POST['author'])\n\t\t\t{\n\t\t\t\tif($authorID = User::getIDByHandle(Sanitize::variable($_POST['author'])))\n\t\t\t\t{\n\t\t\t\t\tif($authorID != $this->contentData['uni_id'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->authorUpdate = $this->contentData['uni_id'];\n\t\t\t\t\t\t$this->contentData['uni_id'] = $authorID;\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\tAlert::warning(\"Author Failure\", \"That author was not located on the site.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Date Posted\n\t\t\tif(isset($_POST['date_posted']) and $_POST['date_posted'] != $this->contentData['date_posted'])\n\t\t\t{\n\t\t\t\t$this->contentData['date_posted'] = $_POST['date_posted'];\n\t\t\t\t$this->settingUpdate = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Post Status\n\t\tif(isset($_POST['save_official']) and $this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\tif(!$this->contentData['primary_hashtag'])\n\t\t\t{\n\t\t\t\tAlert::warning(\"Primary Hashtag\", \"You must have a primary hashtag selected to finish publication.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->contentData['status'] = Content::STATUS_OFFICIAL;\n\t\t\t\t$this->statusUpdate = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(isset($_POST['save_publish']) and $this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\t$this->contentData['status'] = Content::STATUS_GUEST;\n\t\t\t$this->statusUpdate = true;\n\t\t\t\n\t\t\t// Add the entry to the queue\n\t\t\tContent::queue($this->contentID);\n\t\t}\n\t\t\n\t\telse if(isset($_POST['save_guest']) and $this->contentData['status'] > Content::STATUS_GUEST and Me::$clearance >= 6)\n\t\t{\n\t\t\t$this->contentData['status'] = Content::STATUS_GUEST;\n\t\t\t$this->statusUpdate = true;\n\t\t}\n\t\t\n\t\t// Date Posted\n\t\tif($this->contentData['status'] >= Content::STATUS_GUEST and !$this->contentData['date_posted'])\n\t\t{\n\t\t\t$this->contentData['date_posted'] = time();\n\t\t}\n\t\t\n\t\tif(Me::$clearance >= 6)\n\t\t{\n\t\t\t// Comments\n\t\t\tif(isset($_POST['comments']) and $_POST['comments'] != $this->contentData['comments'])\n\t\t\t{\n\t\t\t\t$this->contentData['comments'] = (int) $_POST['comments'];\n\t\t\t\t$this->settingUpdate = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Voting\n\t\t\tif(isset($_POST['voting']) and $_POST['voting'] != $this->contentData['voting'])\n\t\t\t{\n\t\t\t\t$this->contentData['voting'] = (int) $_POST['voting'];\n\t\t\t\t$this->settingUpdate = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->settingUpdate;\n\t}" ]
[ "0.78776085", "0.6961087", "0.68702066", "0.6117388", "0.6094298", "0.5989978", "0.59651744", "0.596469", "0.5934549", "0.58831805", "0.5846629", "0.5826263", "0.5826263", "0.5826263", "0.5826263", "0.5777231", "0.57694906", "0.57415575", "0.5741122", "0.5733018", "0.5719762", "0.5710649", "0.56938833", "0.56904584", "0.56869286", "0.5678595", "0.5676947", "0.5675735", "0.5670753", "0.5661558", "0.56598043", "0.5643799", "0.56113845", "0.5599931", "0.5598498", "0.5586083", "0.55724543", "0.55660754", "0.5563762", "0.5555564", "0.55521566", "0.55507886", "0.55415475", "0.5539056", "0.5531909", "0.5527063", "0.55177367", "0.551081", "0.55044544", "0.5501078", "0.54993874", "0.54749644", "0.54697806", "0.5467218", "0.54652405", "0.5456698", "0.5455728", "0.5446249", "0.54343677", "0.5428025", "0.5426345", "0.5415789", "0.5414282", "0.54088324", "0.5408549", "0.54071796", "0.5406068", "0.5404087", "0.5403891", "0.5402415", "0.5400311", "0.53949654", "0.5387003", "0.5383065", "0.53829986", "0.5376096", "0.53708786", "0.5368239", "0.536602", "0.53648734", "0.53648216", "0.5364806", "0.5361169", "0.535114", "0.53510875", "0.5350268", "0.5347094", "0.5344171", "0.5336178", "0.5334812", "0.5332316", "0.5327017", "0.5325231", "0.532345", "0.53224", "0.53204775", "0.53178334", "0.53163046", "0.53124815", "0.5309808", "0.53094125" ]
0.0
-1
Form Utility Functions Strips slashes if magic quotes is on.
function smartstripslashes($str) { if ( get_magic_quotes_gpc() == true ) { $str = stripslashes($str); } return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\n }", "public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n \t\t$_GET = self::stripSlashesDeep($_GET);\r\n \t}\r\n \r\n\t\t\tif(isset($_POST)){\r\n \t\t$_POST = self::stripSlashesDeep($_POST);\r\n \t}\r\n \r\n\t\t\tif(isset($_COOKIE)){\r\n \t\t$_COOKIE = self::stripSlashesDeep($_COOKIE);\r\n \t}\r\n \r\n }\r\n }", "public function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }", "function mf_sanitize($input){\n\t\tif(get_magic_quotes_gpc() && !empty($input)){\n\t\t\t $input = is_array($input) ?\n\t array_map('mf_stripslashes_deep', $input) :\n\t stripslashes(trim($input));\n\t\t}\n\t\t\n\t\treturn $input;\n\t}", "function remove_wp_magic_quotes() {\r\n\t\t$_GET = stripslashes_deep($_GET);\r\n\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t$_COOKIE = stripslashes_deep($_COOKIE);\r\n\t\t$_REQUEST = stripslashes_deep($_REQUEST);\r\n\t}", "private function _remove_magic_quotes()\n {\n if(get_magic_quotes_gpc()) {\n $_GET = $this->_strip_slashes_deep($_GET);\n $_POST = $this->_strip_slashes_deep($_POST);\n $_COOKIE = $this->_strip_slashes_deep($_COOKIE);\n }\n }", "function DoStripSlashes($fieldValue) {\n if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) { \n if (is_array($fieldValue) ) { \n return array_map('DoStripSlashes', $fieldValue); \n } else { \n return trim(stripslashes($fieldValue)); \n } \n } else { \n return $fieldValue; \n } \n}", "function fix_POST_slashes() {\n\tglobal $fixed_POST_slashes;\n\tif (!$fixed_POST_slashes and get_magic_quotes_gpc()) {\n\t\t$fixed_POST_slashes = true;\n\t\tforeach ($_POST as $key => $val) {\n\t\t\tif (gettype($val) == \"array\") {\n\t\t\t\tforeach ($val as $i => $j) {\n\t\t\t\t\t$val[$i] = stripslashes($j);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$_POST[$key] = stripslashes($val);\n\t\t\t}\n\t\t}\n\t}\n}", "private static function _undoMagicQuotes(){\n\t\t\n\t\tif (get_magic_quotes_gpc()) {\n\n\t\t\tfunction stripslashes_array($data) {\n\t\t\t\tif (is_array($data)) {\n\t\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t\t$data[$key] = stripslashes_array($value);\n\t\t\t\t\t}\n\t\t\t\t\treturn $data;\n\t\t\t\t} else {\n\t\t\t\t\treturn stripslashes($data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_REQUEST = stripslashes_array($_REQUEST);\n\t\t\t$_GET = stripslashes_array($_GET);\n\t\t\t$_POST = stripslashes_array($_POST);\n\t\t\t$_COOKIE = stripslashes_array($_COOKIE);\n\t\t\tif(isset($_FILES))\n\t\t\t\t$_FILES = stripslashes_array($_FILES);\n\t\t}\n\t}", "function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}", "function undo_magic_quotes() {\n if (get_magic_quotes_gpc()) {\n \n $in = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);\n \n while (list($k,$v) = each($in)) {\n foreach ($v as $key => $val) {\n if (!is_array($val)) {\n $in[$k][$key] = stripslashes($val);\n continue;\n }\n $in[] =& $in[$k][$key];\n }\n }\n \n unset($in);\n }\n }", "function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}", "static function stripMagic() {\n\t\t@set_magic_quotes_runtime(0);\n\t\t// if magic_quotes_gpc strip slashes from GET POST COOKIE\n\t\tif (get_magic_quotes_gpc()){\n\t\tfunction stripslashes_array($array) {\n\t\t return is_array($array) ? array_map('stripslashes_array',$array) : stripslashes($array);\n\t\t}\n\t\t$_GET= stripslashes_array($_GET);\n\t\t$_POST= stripslashes_array($_POST);\n\t\t$_REQUEST= stripslashes_array($_REQUEST);\n\t\t$_COOKIE= stripslashes_array($_COOKIE);\n\t\t}\n\t}", "private function _wp_magic_quotes() {\n // If already slashed, strip.\n if (function_exists('get_magic_quotes_gpc')) {\n $reflection = new \\ReflectionFunction('get_magic_quotes_gpc');\n if ( ! $reflection->isDeprecated()) {\n if ( get_magic_quotes_gpc() ) {\n $_GET = RevSliderFunctions::stripslashes_deep( $_GET );\n $_POST = RevSliderFunctions::stripslashes_deep( $_POST );\n $_COOKIE = RevSliderFunctions::stripslashes_deep( $_COOKIE );\n }\n }\n }\n\n // Escape with wpdb.\n $_GET = $this->_add_magic_quotes( $_GET );\n $_POST = $this->_add_magic_quotes( $_POST );\n $_COOKIE = $this->_add_magic_quotes( $_COOKIE );\n $_SERVER = $this->_add_magic_quotes( $_SERVER );\n\n // Force REQUEST to be GET + POST.\n $_REQUEST = array_merge( $_GET, $_POST );\n }", "function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}", "function RemoveMagicQuotesGPC()\n\t{\n\t\t// Check magic quotes state for GPC\n\t\tif (get_magic_quotes_gpc())\n\t\t{\n\t\t\t// Remove magic quotes in GET\n\t\t\t$_GET = RemoveSlashes($_GET);\n\t\t\t// Remove magic quotes in POST\n\t\t\t$_POST = RemoveSlashes($_POST);\n\t\t\t// Remove magic quotes in COOKIE\n\t\t\t$_COOKIE = RemoveSlashes($_COOKIE);\n\t\t}\n\t}", "function cleanInput($data)\n{\n    $data = trim($data);\n\n // gunakan stripslashes untuk elakkan  double escape if magic_quotes_gpc is enabledif(get_magic_quotes_gpc()){\n $data = stripslashes($data);}", "function wp_magic_quotes()\n {\n }", "function &stripSlashesGPC( $text, $force = false ) {\n if ( get_magic_quotes_gpc() || $force == true ) {\n $text = stripslashes( $text );\n }\n return $text;\n }", "public function preventAddSlashes( $fields=array() );", "function bwm_clean($s) {\r\n if (get_magic_quotes_gpc())\r\n return trim(stripslashes($s));\r\n return trim($s);\r\n}", "function stripslashes_from_strings_only($value)\n {\n }", "function _check_magic_quotes($value){\n\t\treturn $this->_magic_quotes?stripslashes($value):$value;\n\t}", "function fix_magic_quotes() {\n\tglobal $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;\n\n\t// clean gpc of slashes\n\tif (!get_magic_quotes_gpc()) {\n\t\treturn false;\n\t}\n\n\t$_GET = transcribe($_GET);\n\t$_POST = transcribe($_POST);\n\t$_COOKIE = transcribe($_COOKIE);\n\t$_REQUEST = transcribe($_REQUEST);\n\n\t$HTTP_GET_VARS = $_GET;\n\t$HTTP_POST_VARS = $_GET;\n\t$HTTP_COOKIE_VARS = $_COOKIE;\n\n\treturn true;\n\n}", "function wp_magic_quotes() {\n\tif ( get_magic_quotes_gpc() ) {\n\t\t$_GET = stripslashes_deep( $_GET );\n\t\t$_POST = stripslashes_deep( $_POST );\n\t\t$_COOKIE = stripslashes_deep( $_COOKIE );\n\t}\n\n\t// Escape with wpdb.\n\t$_GET = add_magic_quotes( $_GET );\n\t$_POST = add_magic_quotes( $_POST );\n\t$_COOKIE = add_magic_quotes( $_COOKIE );\n\t$_SERVER = add_magic_quotes( $_SERVER );\n\n\t// Force REQUEST to be GET + POST.\n\t$_REQUEST = array_merge( $_GET, $_POST );\n}", "function stripPostSlashes($string) {\n\t\tif ((get_magic_quotes_gpc()==1) || (get_magic_quotes_runtime()==1))\n\t\t\treturn stripslashes($string);\n\t\telse return $string;\n\t}", "function inputRefine($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function scrubInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function _put_safe_slashes ($text = \"\") {\n\t\t$text = str_replace(\"'\", \"&#039;\", trim($text));\n\t\t$text = str_replace(\"\\\\&#039;\", \"\\\\'\", $text);\n\t\t$text = str_replace(\"&#039;\", \"\\\\'\", $text);\n\t\tif (substr($text, -1) == \"\\\\\" && substr($text, -2, 1) != \"\\\\\") {\n\t\t\t$text .= \"\\\\\";\n\t\t}\n\t\treturn $text;\n\t}", "function stripSlashesDeep($value) {\r\n $value = is_array($value) ? array_map('cleanInputs', $value) : stripslashes($value);\r\n return $value;\r\n}", "function handleFormInput($a_text, $a_stripslashes = true)\n\t{\n\t\t$a_text = str_replace(\"<\", \"&lt;\", $a_text);\n\t\t$a_text = str_replace(\">\", \"&gt;\", $a_text);\n\t\tif($a_stripslashes)\n\t\t\t$a_text = ilUtil::stripSlashes($a_text);\n\t\t\n\t\treturn $a_text;\n\t}", "function clean_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n //$data = htmlspecialchars($data);\n return $data;\n}", "function wp_unslash( $value ) {\n\treturn stripslashes_deep( $value );\n}", "function sanitation($postVal){\n\t$rawinfo= $postVal;\n\t$removeSpecial = htmlspecialchars($rawinfo);\n\t$finalForm = escapeshellcmd($removeSpecial);\n\treturn $finalForm;\n}", "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function txt_stripslashes($t)\n\t{\n\t\tif ( $this->get_magic_quotes )\n\t\t{\n \t\t$t = stripslashes($t);\n \t\t$t = preg_replace( \"/\\\\\\(?!&amp;#|\\?#)/\", \"&#092;\", $t );\n \t}\n \t\n \treturn $t;\n }", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data); // remember this \r\n $data = htmlspecialchars($data); //remember to ckeck this \r\n return $data;\r\n}", "function test_input($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data,ENT_QUOTES);\r\nreturn $data; \r\n}", "function sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean_input($data){\r\n\t$data = trim($data);\r\n\t$data = stripslashes($data);\r\n\t$data = htmlspecialchars($data);\r\n\treturn $data;\t\r\n}", "public static function clean_input($input)\n {\n $input = trim(stripslashes($input));\n\n # strip the slashes if magic quotes is on\n if(get_magic_quotes_gpc()) {\n $input = trim(stripslashes($input));\n }\n else {\n $input = trim($input);\n }\n\treturn ($input);\n\n }", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "function cleanInputs($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "function CleanPostForMysql($target) {\r\n if (get_magic_quotes_gpc()) {\r\n return $target;\r\n } else {\r\n return mysql_real_escape_string($target);\r\n } // if\r\n}", "function test_input($str) {\n\t\t\t\t$str = @trim($str);\n\t\t\t\tif(get_magic_quotes_gpc()) {\n\t\t\t\t$str = stripslashes($str);\n\t\t\t\t}\n\t\t\t\treturn ($str);\n\t\t\t\t}", "static function revertSlashes($to_strip = null)\n\t{\t\t\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\tif (isset($to_strip)) {\n\t\t\t\treturn is_array($to_strip)\n\t\t\t\t ? array_map(array('Pie_Bootstrap', 'revertSlashes'), $to_strip) \n\t\t\t\t : stripslashes($to_strip);\n\t\t\t}\n\t\t\t$_COOKIE = self::revertSlashes($_COOKIE);\n\t\t\t$_FILES = self::revertSlashes($_FILES);\n\t\t\t$_GET = self::revertSlashes($_GET);\n\t\t\t$_POST = self::revertSlashes($_POST);\n\t\t\t$_REQUEST = self::revertSlashes($_REQUEST);\n\t\t}\n\t}", "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}", "function addPostSlashes($string) {\n\t\tif ((get_magic_quotes_gpc()==1) || (get_magic_quotes_runtime()==1))\n\t\t\treturn $string;\n\t\telse return addslashes($string);\n\t}", "function cleanText($str) {\r\n $str = @trim($str);\r\n if (get_magic_quotes_gpc()) {\r\n $str = stripslashes($str);\r\n }\r\n return $str;\r\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function sanitize_input($data) { \r\n $data = trim($data); \r\n $data = stripslashes($data); \r\n $data = htmlspecialchars($data); \r\n return $data; \r\n }", "function addslashes_strings_only($value)\n {\n }", "function test_input($data)\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean_input($str)\n\t{\n\t\t$str = strip_tags($str);\n\t\t$str = (get_magic_quotes_gpc()) ? stripslashes($str) : $str;\n\t\t$str = trim($str);\n\t\t$str = preg_replace('/[\\\\\"\\'[{;&}|<>\\/]/i', '', $str);\n\t\treturn $str;\n\t}", "function test_input($data) {\n $data= trim($data);\n $data= stripslashes($data);\n $data= htmlspecialchars($data);\n return $data;\n}", "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n \n}", "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function sanitize($input) {\n\t\n\t\t$input = stripslashes($input);\n\t\t$input = htmlspecialchars($input);\n\t\n\t\treturn $input;\n\t}", "function test_input($data) {\r\n$data = trim($data);\r\n$data = stripslashes($data);\r\n$data = htmlspecialchars($data);\r\nreturn $data;\r\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function disallow_custom_unslash_before_noncecheck_via_method() {\n\t$var = MyClass::stripslashes_from_strings_only( $_POST['foo'] ); // Bad.\n\twp_verify_nonce( $var );\n\techo $var;\n}", "function stripslashes($str)\n{\n}", "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}", "function sanitize($str) {\n return addslashes($str);\n}", "function test_input($string){\r\n $string = trim($string);\r\n $string = stripslashes($string);\r\n $string = htmlspecialchars($string);\r\n return $string;\r\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function clean_input($data){\r\n\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\treturn $data;\r\n\t\t\t\t}", "function stripslashes_deep($value)\n {\n }", "function test_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function cek_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "function cleanInput($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "function mysql_prep( $value ) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists( \"mysql_real_escape_string\" ); // i.e. PHP >= v4.3.0\n if( $new_enough_php ) { // PHP v4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if( $magic_quotes_active ) { $value = stripslashes( $value ); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if( !$magic_quotes_active ) { $value = addslashes( $value ); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n}", "function test_input($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n\n return $data;\n}", "function smartaddslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == false ) {\n\t\t\t$str = addslashes( $str );\n\t\t}\n\t\treturn $str;\n\t}", "function remove_ill($str)\r\n {\r\n\t\treturn (!get_magic_quotes_gpc() ? addslashes(trim($str)) : trim($str));\r\n }", "function test_input($input)\n{\n\t$input = trim($input);\n\t$input = stripslashes($input);\n\t$input = htmlspecialchars($input);\n\treturn $input;\n}", "function cleanInput($data) {\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t\t}", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "function stripslashes2($valeur) { //vire les / lorsqu'ils sont en double ou triple\n\t$valeur = str_replace(\"\\\\\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"'\\\\\\\\\",\"'\\\\\",$valeur);\n\t$valeur = stripslashes($valeur);\n\treturn $valeur;\n}" ]
[ "0.7544382", "0.7476993", "0.7377258", "0.73474795", "0.7277407", "0.72352535", "0.7216698", "0.7188681", "0.71810895", "0.71468097", "0.7073647", "0.7064139", "0.7059298", "0.6992332", "0.69876885", "0.6966208", "0.6933774", "0.6911885", "0.6896458", "0.6872223", "0.6864793", "0.6797621", "0.6790271", "0.6786786", "0.6786342", "0.67802167", "0.6775632", "0.6765725", "0.6750956", "0.6732278", "0.6728114", "0.6724961", "0.6710431", "0.6683153", "0.66712904", "0.6670278", "0.66615736", "0.6656614", "0.66544116", "0.6650145", "0.6643586", "0.6636585", "0.66352284", "0.66314834", "0.66314834", "0.66314834", "0.66300356", "0.66300356", "0.66260505", "0.6625063", "0.662194", "0.66212356", "0.66169596", "0.6615757", "0.66141415", "0.6603996", "0.6603374", "0.6601511", "0.65972775", "0.65972775", "0.65964633", "0.65951467", "0.6582068", "0.6579238", "0.6577689", "0.6576336", "0.65719235", "0.65706736", "0.6570528", "0.6568738", "0.6568636", "0.6567124", "0.656553", "0.656049", "0.655271", "0.6549786", "0.6549786", "0.6549786", "0.6549786", "0.65344435", "0.65344435", "0.65344435", "0.65344435", "0.65344435", "0.65344435", "0.65331626", "0.6526368", "0.65139073", "0.65113103", "0.6503228", "0.64974856", "0.6491272", "0.64860445", "0.64821196", "0.64715207", "0.64691424", "0.64630914", "0.64607865", "0.64566344", "0.6454563" ]
0.6848441
21
Adds slashes if magic quotes is on.
function smartaddslashes($str) { if ( get_magic_quotes_gpc() == false ) { $str = addslashes( $str ); } return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nice_addslashes($string)\n{\n // if magic quotes is on the string is already quoted, just return it\n if(MAGIC_QUOTES)\n return $string;\n else\n return addslashes($string);\n}", "private function _wp_magic_quotes() {\n // If already slashed, strip.\n if (function_exists('get_magic_quotes_gpc')) {\n $reflection = new \\ReflectionFunction('get_magic_quotes_gpc');\n if ( ! $reflection->isDeprecated()) {\n if ( get_magic_quotes_gpc() ) {\n $_GET = RevSliderFunctions::stripslashes_deep( $_GET );\n $_POST = RevSliderFunctions::stripslashes_deep( $_POST );\n $_COOKIE = RevSliderFunctions::stripslashes_deep( $_COOKIE );\n }\n }\n }\n\n // Escape with wpdb.\n $_GET = $this->_add_magic_quotes( $_GET );\n $_POST = $this->_add_magic_quotes( $_POST );\n $_COOKIE = $this->_add_magic_quotes( $_COOKIE );\n $_SERVER = $this->_add_magic_quotes( $_SERVER );\n\n // Force REQUEST to be GET + POST.\n $_REQUEST = array_merge( $_GET, $_POST );\n }", "protected function quote_escaped()\n {\n }", "function wp_magic_quotes()\n {\n }", "private static function _undoMagicQuotes(){\n\t\t\n\t\tif (get_magic_quotes_gpc()) {\n\n\t\t\tfunction stripslashes_array($data) {\n\t\t\t\tif (is_array($data)) {\n\t\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t\t$data[$key] = stripslashes_array($value);\n\t\t\t\t\t}\n\t\t\t\t\treturn $data;\n\t\t\t\t} else {\n\t\t\t\t\treturn stripslashes($data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_REQUEST = stripslashes_array($_REQUEST);\n\t\t\t$_GET = stripslashes_array($_GET);\n\t\t\t$_POST = stripslashes_array($_POST);\n\t\t\t$_COOKIE = stripslashes_array($_COOKIE);\n\t\t\tif(isset($_FILES))\n\t\t\t\t$_FILES = stripslashes_array($_FILES);\n\t\t}\n\t}", "function _check_magic_quotes($value){\n\t\treturn $this->_magic_quotes?stripslashes($value):$value;\n\t}", "function privDisableMagicQuotes()\n {\n }", "public function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }", "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "function undo_magic_quotes() {\n if (get_magic_quotes_gpc()) {\n \n $in = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);\n \n while (list($k,$v) = each($in)) {\n foreach ($v as $key => $val) {\n if (!is_array($val)) {\n $in[$k][$key] = stripslashes($val);\n continue;\n }\n $in[] =& $in[$k][$key];\n }\n }\n \n unset($in);\n }\n }", "function _put_safe_slashes ($text = \"\") {\n\t\t$text = str_replace(\"'\", \"&#039;\", trim($text));\n\t\t$text = str_replace(\"\\\\&#039;\", \"\\\\'\", $text);\n\t\t$text = str_replace(\"&#039;\", \"\\\\'\", $text);\n\t\tif (substr($text, -1) == \"\\\\\" && substr($text, -2, 1) != \"\\\\\") {\n\t\t\t$text .= \"\\\\\";\n\t\t}\n\t\treturn $text;\n\t}", "private function _remove_magic_quotes()\n {\n if(get_magic_quotes_gpc()) {\n $_GET = $this->_strip_slashes_deep($_GET);\n $_POST = $this->_strip_slashes_deep($_POST);\n $_COOKIE = $this->_strip_slashes_deep($_COOKIE);\n }\n }", "function wp_magic_quotes() {\n\tif ( get_magic_quotes_gpc() ) {\n\t\t$_GET = stripslashes_deep( $_GET );\n\t\t$_POST = stripslashes_deep( $_POST );\n\t\t$_COOKIE = stripslashes_deep( $_COOKIE );\n\t}\n\n\t// Escape with wpdb.\n\t$_GET = add_magic_quotes( $_GET );\n\t$_POST = add_magic_quotes( $_POST );\n\t$_COOKIE = add_magic_quotes( $_COOKIE );\n\t$_SERVER = add_magic_quotes( $_SERVER );\n\n\t// Force REQUEST to be GET + POST.\n\t$_REQUEST = array_merge( $_GET, $_POST );\n}", "function add_magic_quotes($input_array)\n {\n }", "private function add_slashes($data) {\r\n\t\treturn addslashes ( $data );\r\n\t}", "public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n \t\t$_GET = self::stripSlashesDeep($_GET);\r\n \t}\r\n \r\n\t\t\tif(isset($_POST)){\r\n \t\t$_POST = self::stripSlashesDeep($_POST);\r\n \t}\r\n \r\n\t\t\tif(isset($_COOKIE)){\r\n \t\t$_COOKIE = self::stripSlashesDeep($_COOKIE);\r\n \t}\r\n \r\n }\r\n }", "function ss_addslashes($args) {\n\tif( !defined('MAGIC_QUOTES_GPC') ) define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());\n\tif( !MAGIC_QUOTES_GPC ) { \n\t\tif( is_array($args) ) {\n\t\t\tforeach($args as $key => $val) {\n\t\t\t\t$args[$key] = ss_addslashes($val);\n\t\t\t}\t\t\n\t\t} else {\n\t\t\t$args = addslashes($args);\n\t\t}\n\t}\n\treturn $args;\n}", "function do_magic_quotes_gpc(&$ar) {\n if (!is_array($ar)) return false;\n\n foreach ($ar as $key => $value) {\n if (is_array($ar[$key])) {\n do_magic_quotes_gpc($ar[$key]);\n } else {\n $ar[$key] = addslashes($value);\n }\n }\n\n reset($ar);\n}", "public static function setQuoteSeparator() {\n if (is_null(self::$quoteSeparator)) {\n switch(self::$connector->getAttribute(PDO::ATTR_DRIVER_NAME)) {\n case 'pgsql':\n case 'sqlsrv':\n case 'dblib':\n case 'mssql':\n case 'sybase':\n self::$quoteSeparator = '\"';\n break;\n case 'mysql':\n case 'sqlite':\n case 'sqlite2':\n default:\n self::$quoteSeparator = '`';\n }\n }\n }", "function privSwapBackMagicQuotes()\n {\n }", "function addslashes_strings_only($value)\n {\n }", "function RemoveMagicQuotesGPC()\n\t{\n\t\t// Check magic quotes state for GPC\n\t\tif (get_magic_quotes_gpc())\n\t\t{\n\t\t\t// Remove magic quotes in GET\n\t\t\t$_GET = RemoveSlashes($_GET);\n\t\t\t// Remove magic quotes in POST\n\t\t\t$_POST = RemoveSlashes($_POST);\n\t\t\t// Remove magic quotes in COOKIE\n\t\t\t$_COOKIE = RemoveSlashes($_COOKIE);\n\t\t}\n\t}", "function addPostSlashes($string) {\n\t\tif ((get_magic_quotes_gpc()==1) || (get_magic_quotes_runtime()==1))\n\t\t\treturn $string;\n\t\telse return addslashes($string);\n\t}", "static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }", "public function addSlash(){\n $this->firstname = addslashes($this->firstname);\n $this->lastname = addslashes($this->lastname);\n $this->company = addslashes($this->company);\n $this->country = addslashes($this->country);\n $this->place = addslashes($this->place);\n $this->street = addslashes($this->street);\n $this->description = addslashes($this->description); \n }", "protected function quoteContent(string $content): string {\n return \"'\".str_replace(\n ['\\\\', \"\\r\", \"\\n\", \"'\"],\n ['\\\\\\\\', '\\\\r', '\\\\n', \"\\\\'\"],\n $content\n ).\"'\";\n }", "function sc_php_escape($value) {\n\tif (is_string($value));\n\t// strip out slashes IF they exist AND magic_quotes is on\n\tif (get_magic_quotes_gpc() && (strstr($value,'\\\"') || strstr($value,\"\\\\'\"))) $value = stripslashes($value);\t\n\t// escape string to make it safe for mysql\n\treturn addslashes($value);\n}", "function fix_magic_quotes() {\n\tglobal $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;\n\n\t// clean gpc of slashes\n\tif (!get_magic_quotes_gpc()) {\n\t\treturn false;\n\t}\n\n\t$_GET = transcribe($_GET);\n\t$_POST = transcribe($_POST);\n\t$_COOKIE = transcribe($_COOKIE);\n\t$_REQUEST = transcribe($_REQUEST);\n\n\t$HTTP_GET_VARS = $_GET;\n\t$HTTP_POST_VARS = $_GET;\n\t$HTTP_COOKIE_VARS = $_COOKIE;\n\n\treturn true;\n\n}", "function quote( $string, $quotes = false ) {\r\n return $this->link->quote( ( $quotes )? stripslashes( $string ) : $string, null, true, true );\r\n }", "public function db_addslashes($text) {\n if ($this->get_config('dbsybasequoting')) {\n $text = str_replace('\\\\', '\\\\\\\\', $text);\n $text = str_replace(array('\\'', '\"', \"\\0\"), array('\\\\\\'', '\\\\\"', '\\\\0'), $text);\n } else {\n $text = str_replace(\"'\", \"''\", $text);\n }\n return $text;\n }", "public function db_addslashes($text) {\n if ($this->get_config('dbsybasequoting')) {\n $text = str_replace('\\\\', '\\\\\\\\', $text);\n $text = str_replace(array('\\'', '\"', \"\\0\"), array('\\\\\\'', '\\\\\"', '\\\\0'), $text);\n } else {\n $text = str_replace(\"'\", \"''\", $text);\n }\n return $text;\n }", "function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\n }", "private function quote( )\n {\n if ( @ count( $this->data_buffer ) == 0 )\n return;\n foreach ( $this->data_buffer as $key => $val )\n {\n if ( in_array( $key, $this->string_fields ))\n $this->data_buffer[$key] = @\"'\".mysql_real_escape_string($val,underQL::$db_handle).\"'\";\n else\n $this->data_buffer[$key] = $val;\n }\n }", "function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}", "function remove_wp_magic_quotes() {\r\n\t\t$_GET = stripslashes_deep($_GET);\r\n\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t$_COOKIE = stripslashes_deep($_COOKIE);\r\n\t\t$_REQUEST = stripslashes_deep($_REQUEST);\r\n\t}", "function magicSlashes($element) {\r\n if (is_array($element))\r\n return array_map(array(\"INIT\", \"magicSlashes\"), $element);\r\n else\r\n return addslashes($element);\r\n }", "function &stripSlashesGPC( $text, $force = false ) {\n if ( get_magic_quotes_gpc() || $force == true ) {\n $text = stripslashes( $text );\n }\n return $text;\n }", "public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}", "function mysql_prep ($value) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists(\"mysql_real_escape_string\" ); // i.e. PHP >= 4.3.0\n if ( $new_enough_php ) { // PHP 4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if ( $magic_quotes_active ) { $value = stripslashes( $value ); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if ( !magic_quotes_active ) { $value = addslashes( $value ); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n }", "public function addSlashes( $t );", "function stripslashes2($valeur) { //vire les / lorsqu'ils sont en double ou triple\n\t$valeur = str_replace(\"\\\\\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"\\\\'\",\"'\",$valeur);\n\t$valeur = str_replace(\"'\\\\\\\\\",\"'\\\\\",$valeur);\n\t$valeur = stripslashes($valeur);\n\treturn $valeur;\n}", "protected function escaped()\n {\n return preg_quote('='.env($this->key()), '/');\n }", "private function escape($arg, $meta = true)\n {\n if (!defined('PHP_WINDOWS_VERSION_BUILD')) {\n return escapeshellarg($arg);\n }\n\n $quote = strpbrk($arg, \" \\t\") !== false || $arg === '';\n $arg = preg_replace('/(\\\\\\\\*)\"/', '$1$1\\\\\"', $arg, -1, $dquotes);\n\n if ($meta) {\n $meta = $dquotes || preg_match('/%[^%]+%/', $arg);\n\n if (!$meta && !$quote) {\n $quote = strpbrk($arg, '^&|<>()') !== false;\n }\n }\n\n if ($quote) {\n $arg = preg_replace('/(\\\\\\\\*)$/', '$1$1', $arg);\n $arg = '\"'.$arg.'\"';\n }\n\n if ($meta) {\n $arg = preg_replace('/([\"^&|<>()%])/', '^$1', $arg);\n }\n\n return $arg;\n }", "function Quote( $text ) {\n\t\treturn '\\'' . getEscaped( $text ) . '\\'';\n\t}", "function smartstripslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == true ) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn $str;\n\t}", "public function stripslashes() {\n $i = &$this->getInstance();\n if(get_magic_quotes_gpc()) { stripslashes(stripslashes($i)); }\n return $this;\n }", "private function _add_magic_quotes( $array ) {\n foreach ( (array) $array as $k => $v ) {\n if ( is_array( $v ) ) {\n $array[$k] = $this->_add_magic_quotes( $v );\n } elseif (is_string($v)) {\n $array[$k] = addslashes( $v );\n }\n }\n return $array;\n }", "static function stripMagic() {\n\t\t@set_magic_quotes_runtime(0);\n\t\t// if magic_quotes_gpc strip slashes from GET POST COOKIE\n\t\tif (get_magic_quotes_gpc()){\n\t\tfunction stripslashes_array($array) {\n\t\t return is_array($array) ? array_map('stripslashes_array',$array) : stripslashes($array);\n\t\t}\n\t\t$_GET= stripslashes_array($_GET);\n\t\t$_POST= stripslashes_array($_POST);\n\t\t$_REQUEST= stripslashes_array($_REQUEST);\n\t\t$_COOKIE= stripslashes_array($_COOKIE);\n\t\t}\n\t}", "function escapeQuote($input, $strip=1) {\r\n\r\n\t$string = stripslashes(trim($input));\r\n\tif ($strip) $string = strip_tags($string);\r\n\t$result = \"\";\r\n\t\r\n\tfor ($i=0;$i<strlen($string);$i++) {\r\n\r\n\t\t$char = substr($string,$i,1);\r\n\t\tif ($char == \"'\") $result .= \"''\";\r\n\t\telseif ($char == \"\\r\") $result .= \"\";\r\n\t\telse $result .= $char;\r\n\r\n\t}\r\n\r\n\treturn \"'\".$result.\"'\";\r\n\r\n}", "public static function addSlashes($cadena)\n\t\t{\n\t\t\treturn str_replace(\"'\", \"''\", $cadena);\n\t\t}", "protected function quote_char()\n {\n }", "public function escape( $text ) {\n\n\t\treturn\n\t\t( get_magic_quotes_gpc() ?\n\t\t$this->real_escape_string( stripslashes( $text ) ) :\n\t\t$this->real_escape_string( $text ) );\n\n\t}", "function escape_data($data) {\n\n\tif (ini_get('magic_quotes_gpc')) {\t# Controllo se è attivata la modaltà Magic Quotes (che immette dei caratteri \"|\" prima di eventuali apici\n\t\t$data=stripslashes($data);\t# Tolgo i caratteri \"|\" inseriti da Magic Quotes con la funzione stripslashes\n\t\t}\n\treturn $data; # Ritorno la stringa formattata correttamente\n\t}", "public function Slasher($var) {\n\n //si magic_quot est on on enleve les slash\n if (get_magic_quotes_gpc()) {\n $var=stripslashes($var);\n }\n return $var;\n }", "function mysql_prep( $value ) {\n $magic_quotes_active = get_magic_quotes_gpc();\n $new_enough_php = function_exists( \"mysql_real_escape_string\" ); // i.e. PHP >= v4.3.0\n if( $new_enough_php ) { // PHP v4.3.0 or higher\n // undo any magic quote effects so mysql_real_escape_string can do the work\n if( $magic_quotes_active ) { $value = stripslashes( $value ); }\n $value = mysql_real_escape_string( $value );\n } else { // before PHP v4.3.0\n // if magic quotes aren't already on then add slashes manually\n if( !$magic_quotes_active ) { $value = addslashes( $value ); }\n // if magic quotes are active, then the slashes already exist\n }\n return $value;\n}", "function wp_slash( $value ) {\n\tif ( is_array( $value ) ) {\n\t\tforeach ( $value as $k => $v ) {\n\t\t\tif ( is_array( $v ) ) {\n\t\t\t\t$value[$k] = wp_slash( $v );\n\t\t\t} else {\n\t\t\t\t$value[$k] = addslashes( $v );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$value = addslashes( $value );\n\t}\n\n\treturn $value;\n}", "function mysql_prep($value){\n\t\t$magic_quotes_active = get_magic_quotes_gpc();\n\t\t$new_enough_php = function_exists(\"mysql_real_escape_string\"); // ie PHP >= v4.3.0\n\n\t\tif($new_enough_php){\n\t\t\t// undo any magic quotes effects so mysql_real_escape_quotes can do the work\n\t\t\tif($magic_quotes_active){\n\t\t\t\t$value = stripcslashes($value);\n\t\t\t}\n\t\t\t$value = mysql_real_escape_string($value);\n\t\t}else {\n\t\t\t// if magic quotes aren't on then add slashes manually \n\t\t\tif(!$magic_quotes_active){\n\t\t\t\t$value = addslashes($value);\n\t\t\t\t// if magic quotes are on the slashes already exits\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "public static function quote( $value ) {\n\t\t# Quote \\ here, because it needs always escaping\n\t\t$value = addcslashes( $value, '\\\\' );\n\n\t\t# For readability\n\t\t$single = \"'\";\n\t\t$double = '\"';\n\t\t$quote = $single;\n\n\t\t# It is safe to use '-quoting, unless there is '-quote in the text\n\t\tif ( strpos( $value, $single ) !== false ) {\n\t\t\t# In case there is no variables that need to be escaped, just use \"-quote\n\t\t\tif ( strpos( $value, $double ) === false && !preg_match( '/\\$[^0-9]/', $value ) ) {\n\t\t\t\t$quote = $double;\n\t\t\t# Something needs quoting, pick the quote which causes less quoting\n\t\t\t} else {\n\t\t\t\t$doubleEsc = substr_count( $value, $double ) + substr_count( $value, '$' );\n\t\t\t\t$singleEsc = substr_count( $value, $single );\n\n\t\t\t\tif ( $doubleEsc < $singleEsc ) {\n\t\t\t\t\t$quote = $double;\n\t\t\t\t\t$extra = '$';\n\t\t\t\t} else {\n\t\t\t\t\t$extra = '';\n\t\t\t\t}\n\n\t\t\t\t$value = addcslashes( $value, $quote . $extra );\n\t\t\t}\n\t\t}\n\n\t\treturn $quote . $value . $quote;\n\t}", "protected function escapeCharacter () : string {\n return '\\\\';\n }", "protected function escapeValue(string $value, bool $forceQuote): string\n {\n if (empty($value)) {\n return '';\n }\n\n // Quote the values if\n // it contains white-space or the following characters: \" \\ = : . $\n // or simply force quote is enabled\n if (preg_match('/\\s|\"|\\\\\\\\|=|:|\\.|#|\\$/u', $value) || $forceQuote) {\n // Replace backslashes with even more backslashes so when writing we can have escaped backslashes\n // damn.. that rhymes\n $value = str_replace('\\\\', '\\\\\\\\\\\\\\\\', $value);\n // Wrap the\n $value = '\"' . addcslashes($value, '\"') . '\"';\n }\n\n return $value;\n }", "function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }", "public function escape_value($value) {\n\n\t\t if($this->real_escape_string) { // PHP v4.3.0 or higher\n\t\t// undo any magic quote effects so mysql_real_escape_string can do the work\n\t\tif($this->magic_quotes_active) { $value = stripslashes($value); }\n\t\t\t$value = mysqli_real_escape_string($this->connection, $value);\n\t\t} else { // before PHP v4.3.0\n\t\t// If magic quotes aren't already on then add slases manually\n\t\tif(!$this->magic_quotes_active) { $value = addslashes($value); }\n\t\t// if magic quotes are active, then teh slashes already exist\n\t\t}\n\t\treturn $value;\n\t}", "function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}", "function escape_data ($data, $dbc) {\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t// Strip the slashes if Magic Quotes is on:\r\n\t\t\t$data = stripslashes($data);\r\n\r\n\t\t\t// Apply trim() and mysqli_real_escape_string():\r\n\t\t\treturn mysqli_real_escape_string ($dbc, trim($data));\r\n\t\t}\r\n\t}", "function fix_POST_slashes() {\n\tglobal $fixed_POST_slashes;\n\tif (!$fixed_POST_slashes and get_magic_quotes_gpc()) {\n\t\t$fixed_POST_slashes = true;\n\t\tforeach ($_POST as $key => $val) {\n\t\t\tif (gettype($val) == \"array\") {\n\t\t\t\tforeach ($val as $i => $j) {\n\t\t\t\t\t$val[$i] = stripslashes($j);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$_POST[$key] = stripslashes($val);\n\t\t\t}\n\t\t}\n\t}\n}", "function strip_magic_quotes($data) {\n foreach($data as $k=>$v) {\n $data[$k] = is_array($v) ? strip_magic_quotes($v) : stripslashes($v);\n }\n return $data;\n}", "protected function quote()\n {\n }", "function privDisableMagicQuotes()\n {\n $v_result=1;\n\n // ----- Look if function exists\n if ( (!function_exists(\"get_magic_quotes_runtime\"))\n\t || (!function_exists(\"set_magic_quotes_runtime\"))) {\n return $v_result;\n\t}\n\n // ----- Look if already done\n if ($this->magic_quotes_status != -1) {\n return $v_result;\n\t}\n\n\t// ----- Get and memorize the magic_quote value\n\t$this->magic_quotes_status = @get_magic_quotes_runtime();\n\n\t// ----- Disable magic_quotes\n\tif ($this->magic_quotes_status == 1) {\n\t @set_magic_quotes_runtime(0);\n\t}\n\n // ----- Return\n return $v_result;\n }", "function qescape($str)\n{\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n return str_replace('\"', '\\\\\"', $str);\n}", "function wp_slash($value)\n {\n }", "function privSwapBackMagicQuotes()\n {\n $v_result=1;\n\n // ----- Look if function exists\n if ( (!function_exists(\"get_magic_quotes_runtime\"))\n\t || (!function_exists(\"set_magic_quotes_runtime\"))) {\n return $v_result;\n\t}\n\n // ----- Look if something to do\n if ($this->magic_quotes_status != -1) {\n return $v_result;\n\t}\n\n\t// ----- Swap back magic_quotes\n\tif ($this->magic_quotes_status == 1) {\n \t @set_magic_quotes_runtime($this->magic_quotes_status);\n\t}\n\n // ----- Return\n return $v_result;\n }", "function fix_slashes($arr='')\n\t{\n\t\tif (is_null($arr) || $arr == '') return null;\n\t\tif (!get_magic_quotes_gpc()) return $arr;\n\t\treturn is_array($arr) ? array_map('fix_slashes', $arr) : stripslashes($arr);\n\t}", "protected function enclosureCharacter () : string {\n return '\"';\n }", "public function jsQuoteEscape($data, $quote='\\'')\r\n\t{\r\n\t\treturn Mage::helper('core')->jsQuoteEscape($data);\r\n\t}", "public static function StripSlashes($value)\n\t{\n\t\tif (get_magic_quotes_runtime())\n\t\t{\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\tforeach ($value as $key => $val)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($val)) $value[$key] = self::StripSlashes($val);\n\t\t\t\t\telse $value[$key] = stripslashes($val);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse $value = stripslashes($value);\n\t\t}\n\t\treturn $value;\n\t}", "function _real_escape( $string ) {\n\t\t$escaped = parent::_real_escape( $string );\n\t\t\n\t\tif ( strlen( $escaped ) )\n\t\t\t$this->escaped[] = $escaped;\n\t\t\n\t\treturn $escaped;\n\t}", "function addslashes_gpc($gpc)\n {\n }", "function preg_windows_slashes($string_value, $rep_value = \"\\\\\\\\\")\n {\n if (strtoupper(PHP_OS == \"WINDOWS\") || strtoupper(PHP_OS) == 'WINNT') {\n $string_value = str_replace('/', $rep_value, $string_value);\n }\n return $string_value;\n }", "public static function stripslashes($value)\n {\n if (Kohana::$magic_quotes === TRUE)\n {\n if (is_array($value) OR is_object($value))\n {\n foreach ($value as $key => $val)\n {\n // Recursively clean each value\n $value[$key] = Kohana::stripslashes($val);\n }\n }\n elseif (is_string($value))\n {\n // Remove slashes added by magic quotes\n $value = stripslashes($value);\n }\n }\n\n return $value;\n }", "public function escapeQuote($data, $addSlashes = false)\n {\n if ($addSlashes === true) {\n $data = addslashes($data);\n }\n return htmlspecialchars($data, ENT_QUOTES, null, false);\n }", "protected function _escape($value){\n // если magic_quotes_gpc включена - используем stripslashes\n if (get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n // Если переменная - число, то экранировать её не нужно\n // если нет - то окружем её кавычками, и экранируем\n if (!is_numeric($value) && (strtoupper($value) !== 'NULL') ) {\n $value = \"'\" . mysql_real_escape_string($value) . \"'\";\n }\n return $value;\n }", "public static function escapeQuote($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escapeQuote($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn '\"'.self::escape($val).'\"';\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}", "public function doubleQuoteValue($value) {\n\t\t$value = addcslashes(\n\t\t\t$value,\n\t\t\timplode('', static::DOUBLE_QUOTED_MUST_ESCAPE)\n\t\t);\n\t\treturn '\"' . $value . '\"';\n\t}", "abstract public function quoteString($value);", "function DoStripSlashes($fieldValue) {\n if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) { \n if (is_array($fieldValue) ) { \n return array_map('DoStripSlashes', $fieldValue); \n } else { \n return trim(stripslashes($fieldValue)); \n } \n } else { \n return $fieldValue; \n } \n}", "private function escapes() {\n return [\n ['r', \"\\x0d\"],\n ['n', \"\\x0a\"],\n ['t', \"\\x09\"],\n ['b', \"\\x08\"],\n ['f', \"\\x0c\"],\n ['\\\\', \"\\x5c\"]\n ];\n }", "protected function _getEnclosure() {\n\t\treturn '\"';\n\t}", "function testUrlEncodeQuotes4()\n\t{\n\t\t\t$input = 'This \\'is \"a \"test \"with lot\\'s of quote\\'s';\n\t\t\t$expectedOutput = \"This &#39;is &quot;a &quot;test &quot;with lot&#39;s of quote&#39;s\";\n\t\t\t$this->assertEqual (\n\t\t\t\t\t$expectedOutput,\n\t\t\t\t\t$this->stringUtils->urlEncodeQuotes($input)\n\t\t\t);\n\t}", "public function testEscaping() {\n\t\t$result = $this->JsEngine->escape('');\n\t\t$expected = '';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->JsEngine->escape('CakePHP' . \"\\n\" . 'Rapid Development Framework');\n\t\t$expected = 'CakePHP\\\\nRapid Development Framework';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->JsEngine->escape('CakePHP' . \"\\r\\n\" . 'Rapid Development Framework' . \"\\r\" . 'For PHP');\n\t\t$expected = 'CakePHP\\\\r\\\\nRapid Development Framework\\\\rFor PHP';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->JsEngine->escape('CakePHP: \"Rapid Development Framework\"');\n\t\t$expected = 'CakePHP: \\\\\"Rapid Development Framework\\\\\"';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->JsEngine->escape(\"CakePHP: 'Rapid Development Framework'\");\n\t\t$expected = \"CakePHP: 'Rapid Development Framework'\";\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->JsEngine->escape('my \\\\\"string\\\\\"');\n\t\t$expected = 'my \\\\\\\\\\\\\"string\\\\\\\\\\\\\"';\n\t\t$this->assertEquals($expected, $result);\n\t}", "function testUrlEncodeQuotes3()\n\t{\n\t\t\t$input = 'This is a test with a \"double quote';\n\t\t\t$expectedOutput = \"This is a test with a &quot;double quote\";\n\t\t\t$this->assertEqual (\n\t\t\t\t\t$expectedOutput,\n\t\t\t\t\t$this->stringUtils->urlEncodeQuotes($input)\n\t\t\t);\n\t}", "public function quoteAndEscape(string $str): string;", "function wd_convert_slash($string){\n return str_replace(\"\\\\\", \"/\", $string);\n}", "public function isQuoted(): bool\n\t{\n\t\treturn preg_match('/^\".+?\"$/', $this->getValue());\n\t}", "function wsod_detect_filesystem_slash() {\n if (strpos(__FILE__, '/') !== FALSE) { // detect filesystem\n return '/'; // Unix style\n } else {\n return '\\\\'; // Windows style\n }\n}", "static function quote($value)\n\t{\n\t\treturn \"'\" . str_replace(\"'\", \"\\\\'\", $value) . \"'\";\n\t}", "function trailingslashit($value)\n {\n }", "static function quote($s){\r\n return '\"' . str_replace('\"', '\\\"', $s) . '\"';\r\n }", "public function escape_value($value){\n if($this->real_escape_string_e){\n if($this->magic_quotes_a){\n $value = stripcslashes($value);\n }\n $value = mysql_real_escape_string($value);\n }\n if(!$this->magic_quotes_a){\n $value = addslashes($value);\n }\n return $value;\n }", "function stripslashes($str)\n{\n}", "function checkRealEscapeString($value);" ]
[ "0.70673954", "0.705602", "0.7036844", "0.6960077", "0.68517745", "0.6783968", "0.67531955", "0.67396885", "0.6722849", "0.6677134", "0.6653133", "0.66176873", "0.6591156", "0.65648514", "0.6539369", "0.6495385", "0.6380721", "0.63736707", "0.63330644", "0.6304832", "0.6298329", "0.6290143", "0.6267622", "0.62571514", "0.6246953", "0.61742634", "0.615293", "0.6120558", "0.60921365", "0.6090737", "0.6090737", "0.6064022", "0.6054444", "0.60397375", "0.6031568", "0.6018807", "0.60182506", "0.6006818", "0.5989075", "0.59803444", "0.5978934", "0.5964484", "0.5957344", "0.59463227", "0.5945481", "0.5944454", "0.5935145", "0.5932039", "0.59264886", "0.5905835", "0.5867691", "0.5864109", "0.585914", "0.5851071", "0.5850077", "0.5847646", "0.58470356", "0.5845445", "0.583758", "0.58344984", "0.5815053", "0.5799001", "0.5794525", "0.5786896", "0.57767576", "0.5773854", "0.57615346", "0.5759755", "0.5741774", "0.57360375", "0.5731747", "0.57075214", "0.5690334", "0.5686683", "0.5651775", "0.5649299", "0.56466275", "0.56459165", "0.56377184", "0.56330794", "0.5624879", "0.5616683", "0.56154764", "0.5614573", "0.5614243", "0.5596534", "0.5596531", "0.55824584", "0.5581985", "0.5581053", "0.55804396", "0.5572799", "0.5572681", "0.5567864", "0.5560219", "0.55553776", "0.555326", "0.5548816", "0.5522073", "0.5520301" ]
0.68149924
5
This function creates a standard HTML input form.
function HTML_input( $label=false, $id, $value=null, $add_returns=true, $type='text', $size=null, $maxlength=null, $onchange=null, $width=0, $disabled=false, $autocomplete=false, $checked=false ) { $str = ''; if ( isset( $label ) && $label !== false ) { $str .= '<label for="'.$id.'">'.$label.'</label>'; if ( $add_returns ) { $str .= '<br />'; } $str .= "\n"; } // <input name="name" id="id" type="text" value="value" size="2" maxlength="2" onchange="" disabled> $str .= '<input name="'.$id.'" id="'.$id.'" type="'.$type.'"'; if ( isset( $value ) ) { $str .= ' value="'. addslashes( encode_input_value( $value ) ) .'"'; } if ( $size > 0 ) { $str .= ' size="'.$size.'"'; } if ( $maxlength > 0 ) { $str .= ' maxlength="'.$maxlength.'"'; } if ( isset( $onchange ) ) { $str .= ' onchange="'.$onchange.'"'; } if ( $width > 0) { $str .= ' style="width: '.$width.'px;"'; } if ( !$autocomplete ) { $str .= ' autocomplete="OFF"'; } if ( $disabled ) { $str .= ' disabled'; } if ( $checked ) { $str .= ' checked'; } $str .= '>' . "\n"; if ( $add_returns ) { $str .= '<p />'; } $str .= "\n"; return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "abstract public function createForm();", "abstract public function createForm();", "public function createForm();", "public function createForm();", "function html_form_code() {\n $form = \"\";\n $form.=\"<form action='\" . esc_url($_SERVER['REQUEST_URI']) . \"' method='post'>\";\n $form.=\"<input type='text' name='ms-name' value='\" . ( isset($_POST[\"ms-name\"]) ? esc_attr($_POST[\"ms-name\"]) : '' ) . \"' placeholder='Ваше Имя'/>\";\n $form.=\"<input type='email' name='ms-email' value='\" . ( isset($_POST[\"ms-email\"]) ? esc_attr($_POST[\"ms-email\"]) : '' ) . \"' placeholder='Ваш E-mail'/>\";\n $form.=\"<input name='ms-submit' type='submit' id='add-share-btn' value='Получить доступ'/>\";\n $form.=\"</form>\";\n echo $form;\n}", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "public function CreateForm();", "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "function create_form(){\n\t\n\t$table =\"<html>\";\n\t$table.=\"<head>\";\n\t$table.=\"\t<title>New Article Entry Page</title>\";\n\t$table.=\"</head>\";\n\t\n\t// URL for the wordpress post handling page\n\t$link_admin_post = admin_url('admin-post.php');\n\t$table.=\"<form name = 'myform' method=\\\"POST\\\" action='\" . $link_admin_post . \"' id = \\\"form1\\\">\";\n\n\t// Input for Faculty member\n\t$table.= \"\t<br>\";\n\t$table.= \" <div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Tag\\\">Faculty Member/Tag: </label></p>\";\n\t$list_of_names = wp_post_tag_names();\n\t$table.=\"\t<select name=\\\"Tag\\\">\" . $list_of_names . \"</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for PMID\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"PMID\\\">PMID*: </label></p>\";\n\t$table.=\"\t<input type=\\\"number\\\" name=\\\"PMID\\\" id=\\\"PMID\\\" required>\";\n\t\n\t//autofill button\n\t$table.=' <a class=\"pmid\" data-test=\"hi\"><button id=\"autofill_btn\" type=\"button\" >Auto-Fill</button></a>';\n\t$table.=\"\t</div>\";\n\t\t\n\t// Input for Journal Issue\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label style=\\\"width: 200px;\\\" for=\\\"Journal_Issue\\\">Journal Issue: </label></p>\";\n\t$table.=\"\t<input id = 'issue' type=\\\"number\\\" name=\\\"Journal_Issue\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Volume\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Volume\\\">Journal Volume: </label></p>\";\n\t$table.=\"\t<input id = 'journal_volume' type=\\\"number\\\" name=\\\"Journal_Volume\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Title\\\">Journal Title: </label></p>\";\n\t$table.=\"\t<input id = 'journal_title' type=\\\"text\\\" name=\\\"Journal_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Year\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Year\\\">Journal Year: </label></p>\";\n\t$table.=\"\t<input id = 'year' value=\\\"2000\\\" type=\\\"number\\\" name=\\\"Journal_Year\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Month\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Month\\\">Journal Month: </label></p>\";\n\t$table.=\"\t<select id='journal_month' name=\\\"Journal Month\\\">\";\n\t$table.=\"\t\t<option value=\\\"01\\\">Jan</option>\";\n\t$table.=\"\t\t<option value=\\\"02\\\">Feb</option>\";\n\t$table.=\"\t\t<option value=\\\"03\\\">Mar</option>\";\n\t$table.=\"\t\t<option value=\\\"04\\\">Apr</option>\";\n\t$table.=\"\t\t<option value=\\\"05\\\">May</option>\";\n\t$table.=\"\t\t<option value=\\\"06\\\">Jun</option>\";\n\t$table.=\"\t\t<option value=\\\"07\\\">Jul</option>\";\n\t$table.=\"\t\t<option value=\\\"08\\\">Aug</option>\";\n\t$table.=\"\t\t<option value=\\\"09\\\">Sep</option>\";\n\t$table.=\"\t\t<option value=\\\"10\\\">Oct</option>\";\n\t$table.=\"\t\t<option value=\\\"11\\\">Nov</option>\";\n\t$table.=\"\t\t<option value=\\\"12\\\">Dec</option>\";\n\t$table.=\"\t</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Day\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Day\\\">Journal Day: </label></p>\";\n\t$table.=\"\t<input id = 'journal_day' type=\\\"text\\\" name=\\\"Journal_Day\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Date\\\">Journal Date: </label></p>\";\n\t$table.=\"\t<input id = 'journal_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Journal_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Abbreviation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Abbreviation\\\">Journal Abbreviation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_ab' type=\\\"text\\\" name=\\\"Journal_Abbreviation\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Journal Citation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Citation\\\">Journal Citation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_citation' type=\\\"text\\\" name=\\\"Journal_Citation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Title\\\">Article Title: </label></p>\";\n\t$table.=\"\t<input id=\\\"article_title\\\" type=\\\"text\\\" name=\\\"Article_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for article abstract\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Abstract\\\">Article Abstract: </label></p>\";\n\t$table.=\" <textarea id='abstract' rows = '4' cols = '60' name=\\\"Article_Abstract\\\"></textarea>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article URL\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_URL\\\">Article URL: </label></p>\";\n\t$table.=\"\t<input id = 'article_url' type=\\\"text\\\" name=\\\"Article_URL\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Pagination\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Pagination\\\">Article Pagination: </label></p>\";\n\t$table.=\"\t<input id='pages' type=\\\"text\\\" name=\\\"Article_Pagination\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Date\\\">Article Date: </label></p>\";\n\t$table.=\"\t<input id='article_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Article_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Authors\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Authors\\\">Article Authors: </label></p>\";\n\t$table.=\"\t<input id='article_authors' type=\\\"text\\\" name=\\\"Article_Authors\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Affiliations\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Affiliation\\\">Article Affiliation: </label></p>\";\n\t$table.=\"\t<input id = 'article_affiliation' type=\\\"text\\\" name=\\\"Article_Affiliation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Created\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Created\\\">Date Created: </label></p>\";\n\t$table.=\"\t<input id='date_created' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Created\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Completed\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Completed\\\">Date Completed: </label></p>\";\n\t$table.=\"\t<input id='date_completed' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Completed\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Date Revised\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Revised\\\">Date Revised: </label></p>\";\n\t$table.=\"\t<input id='date_revised' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Revised\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Hidden input (for specifying hook)\n\t$table.=\"\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new_article_form\\\">\";\n\t\n\t// Submit and reset buttons\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div id=\\\"form_btns\\\">\"; \n\t$table.=\"\t<button class=\\\"form_btn\\\"><input type=\\\"reset\\\" value=\\\"Reset!\\\" onclick=\\\"window.location.reload()\\\"></button>\";\n\t$table.=\"\t<input class=\\\"form_btn\\\" type=\\\"submit\\\" value=\\\"Submit\\\">\"; \n\t$table.=\"\t</div>\";\n\t$table.=\"</form>\";\n\n\t// Styling of the form (needs to be put in a seperate stylesheet)\n\t$table.=\"<style type=\\\"text/css\\\">\";\n\t$table.=\"\t#form_btns {\";\n\t$table.=\"\t\tmargin-left: 150px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.form_btn {\";\n\t$table.=\"\t\twidth: 80px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.label {\";\n\t$table.=\"\t\twidth: 150px;\";\n\t$table.=\"\t\tmargin: 0;\";\n\t$table.=\"\t\tfloat: left;\";\n\t$table.=\"\t}\";\n\t$table.=\"\tinput::placeholder {\";\n\t$table.=\"\t\tcolor: #a4a4a4;\";\n\t$table.=\"\t}\";\n\t$table.=\"</style>\";\n\t\n\t$table.=\"<script type='text/javascript' src=\" . plugin_dir_url(__FILE__) . \"js/autofill_ajax.js></script>\";\n\n \techo $table;\n}", "public function cs_generate_form() {\n global $post;\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "static function createInput($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/input.php\";\n }", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "function makeForm($request, $formOpts){\n\t\t#print_r ($request);\n\t\t$formDescriptor = array(\n\t\t\t'radioForm' => array(\n \t\t\t\t'type' => 'radio',\n \t\t\t\t'label' => 'Select a search type:',\n \t\t\t\t'options' => array( # The options available within the checkboxes (displayed => value)\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 0' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 1' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 2' => 2,\n\t\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t'default' => 0 # The option selected by default (identified by value)\n \t\t\t),\n 'textfield1' => array(\n\t\t\t\t\t\t\t\t'label' => 'textfield 1 label', # What's the label of the field\n\t\t\t\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t\t\t\t),\n\t\t\t'textfield2' => array(\n\t\t\t\t\t'label' => 'textfield 2 label', # What's the label of the field\n\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t), \t\t\t\t\n \t\t);\n\t\t\n\t\tswitch($formOpts){\n\t\t\tcase '1':\n\t\t\t\t$formDescriptor['textfield1']['label'] = 'textfield 1 label'; # What's the label of the field\n\t\t\t\t$formDescriptor['textfield2']['label'] = 'textfield 2 label'; # What's the label of the field\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t#same as case 1\n\t\t\tdefault:\n\t\t}\n\n\t\t#Submit button structure and page callback. \n $htmlForm = new HTMLForm( $formDescriptor, $this->getContext(), 'myform'); # We build the HTMLForm object, calling the form 'myform'\n $htmlForm->setSubmitText( 'Submit button text' ); # What text does the submit button display\n\t\t\n\t\t/* We set a callback function */ \n\t\t#This code has no function to the special page. It used to produce red wiki text callback such as \"Try Again\" commented-out below under processInput function. \n\t\t$htmlForm->setSubmitCallback( array( 'specialpagetemplate', 'processInput' ) ); # Call processInput() in specialpagetemplate on submit\n $htmlForm->show(); # Displaying the form\n\t}", "public function setAsStaticForm() {\n\t\treturn $this->form_tag(implode('<br />', $this->_elements));\n\t}", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "abstract function form();", "abstract function builder_form(): string;", "function Get_Search_Form_HTML()\n {\n $HTML = '';\n $HTML .= '<form class=\"Indented\" method=\"post\" '.\n 'action=\"index.php?Page_Type=Search\">';\n $HTML .= '<input type=\"text\" name=\"SearchString\" class=\"Search\"/>';\n $HTML .= '<input type=\"submit\" value=\"Submit\" class=\"Search_Button\"/>';\n $HTML .= '</form>';\n return $HTML;\n }", "public function generateFormProperites(){\r\n\t\t$formProperties = $this->formProperties;\r\n\t\t$formTags = '<form ';\r\n\t\tif(sizeof($formProperties) > 0) {\r\n\t\t\tforeach($formProperties as $key=>$params){\r\n\t\t\t\t$formTags .= $key.'=\"'.$params.'\" ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$formTags\t\t.= '>';\r\n\t\treturn $formTags;\r\n\t}", "public function buildFormTemplate() {\n\t\t$formTemplatepath = \"src/Templates/\".$this->stateName.\"_\".$this->stateType.\".php\";\n\t\t$formTemplate = fopen($formTemplatepath, \"w\") or die (\"Unable to create html template for \\\"\".$this->stateName.\"_\".$this->stateType.\"\\\" state.\");\n\t\t$formHtml = \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>\".$this->title.\"</title>\n\t\t</head>\n\t\t<body>\";\n\t\tif ($this->stateType == \"generation\") {\n\t\t\t$formHtml .= \"<form method=\\\"\".$this->method.\"\\\" action=\\\"../Scripts/generationHandleRequest.php\\\" >\";\n\t\t}\n\t\t\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Skip the Database elements.\n\t\t\tif ($input['inputType'] == \"DATABASE\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\t$formHtml .= \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\t$formHtml .= \" required\";\n\t\t\t}\n\t\t\t// Makes the html page more readable, i.e. appending with a new line.\n\t\t\t$formHtml .= \">\n\t\t\t<br>\";\n\t\t}\n\n\t\t$formHtml .= \"</form>\n\t\t</body>\n\t\t</html>\";\n\n\t\tfwrite($formTemplate, $formHtml);\n\t\tfclose($formTemplate);\n\t}", "function writeForm($form = [], $items = []){\n $html = '<form ';\n //the attributes of form\n foreach ($form as $key =>$item) {\n if (is_numeric($key)) {\n $html .= \" {$key} \";\n } else {\n $html .= \" {$key}={$item} \";\n }\n }\n\n $html .= ' >';\n\n //the form item template\n $template = '<div class=\"form-group\">\n<label class=\"form-label\"><b>%s</b></label>\n<div>%s</div>\n<div class=\"error\"></div>\n</div>';\n\n //form item\n foreach ($items as $item) {\n $formItemHtml = '';\n $attributesStr = '';\n foreach ($item['attributes'] as $key => $attribute) {\n if (is_numeric($key)) {\n $attributesStr .= \" {$attribute} \";\n } else {\n $attributesStr .= \" {$key}=\\\"{$attribute}\\\" \";\n }\n }\n switch ($item['tag']) {\n case 'input':\n $formItemHtml = '<input ' . $attributesStr . '/>';\n break;\n\n case 'textarea':\n $formItemHtml = '<textarea ' . $attributesStr . '></textarea>';\n break;\n }\n\n $html .= sprintf($template, $item['label'], $formItemHtml);\n }\n\n //the submit button\n $html .= '<div class=\"form-group-center\">\n <button type=\"submit\" class=\"form-btn\">Submit</button>\n </div></form>';\n\n echo $html;\n}", "function toString()\n\t{\n\t\t// Start main form attributes\n\t\t$formAttributes = array();\n\t\t$formAttributes['method'] = 'POST';\t\n\t\t\n\t\t// Use custom action attribute?\n\t\tif ($this->actionURL) {\n\t\t\t$formAttributes['action'] = $this->actionURL;\n\t\t} else {\n\t\t\t// Current page\n\t\t\t$formAttributes['action'] = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Add the form name if specified\n\t\t$namestring = \"\";\n\t\tif ($this->formName) {\n\t\t\t$formAttributes['name'] = $this->formName;\t\n\t\t\t$formAttributes['id'] = $this->formName;\n\t\t}\n\t\t\n\t\t// Need extra attribute if there's a upload field\n\t\tif ($this->haveFileUploadField()) {\n\t\t\t$formAttributes['enctype'] = 'multipart/form-data';\n\t\t}\n\t\t\n\t\t// Render form with all attributes\n\t\t$attributeString = false;\n\t\tforeach($formAttributes as $name => $value) {\n\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t}\n\t\t\n\t\t// Start form\n\t\t$resultString = \"\\n<form $attributeString>\\n\";\n\t\t\n\t\t// Is first item a break? If so, render it.\n\t\tif (isset($this->breakList[FORM_BUILDER_START_OF_FORM])) {\n\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[FORM_BUILDER_START_OF_FORM]['sectionid']), $this->breakList[FORM_BUILDER_START_OF_FORM]['prefixHTML']);\n\t\t} else {\n\t\t\t$resultString .= $this->createTableHeader();\n\t\t}\t\t\n\t\t\n\t\t// Now add all form elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Hidden elements are added later\n\t\t\tif ($element->type == 'hidden') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Render form element\t\t\t\t\n\t\t\t$resultString .= $element->toString($this->showRequiredLabels);\n\n\t\t\t// Add section breaks if this element is in the break list.\n\t\t\t// Add break after element HTML\n\t\t\tif (in_array($element->name, array_keys($this->breakList)))\n\t\t\t{\n\t\t\t\t$resultString .= $this->createTableFooter();\n\t\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[$element->name]['sectionid']), $this->breakList[$element->name]['prefixHTML']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$resultString .= $this->createTableFooter();\n\t\t\n\t\t// Button area\n\t\t$resultString .= '<p class=\"submit\">'.\"\\n\";\n\t\t\n\t\t// Add submit button\n\t\t$resultString .= \"\\t\".'<input class=\"button-primary\" type=\"submit\" name=\"Submit\" value=\"'.$this->submitlabel.'\" />'.\"\\n\";\n\t\t\n\t\t// Add remaining buttons\n\t\tforeach ($this->buttonList as $buttonName => $buttonLabel) {\n\t\t\t$resultString .= \"\\t<input type=\\\"submit\\\" class=\\\"button-secondary\\\" name=\\\"$buttonName\\\" value=\\\"$buttonLabel\\\" />\\n\";\t\t\n\t\t}\n\t\t\t\t\n\t\t// Hidden field to indicate update is happening\n\t\t$resultString .= sprintf(\"\\t\".'<input type=\"hidden\" name=\"update\" value=\"%s\" />'.\"\\n\", $this->formName);\n\t\t\t\t\n\t\t// Add any extra hidden elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Leave all hidden elements until the end.\n\t\t\tif ($element->type == 'hidden') {\t\n\t\t\t\t$resultString .= \"\\t\".'<input type=\"hidden\" name=\"'.$element->name.'\" value=\"'.$element->value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$resultString .= '</p>'.\"\\n\";\n\t\t\t\t\t\t\t\n\t\t// End form\n\t\t$resultString .= \"\\n</form>\\n\";\n\t\t\n\t\treturn $resultString;\n\t}", "function form_create($model, $options = array()) {\n $defaults = array(\n 'type' => false,\n 'method' => 'post',\n 'action' => BASE . $_GET['url']\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<form id=\"' . ucfirst(strtolower($model)) . 'Form\"';\n if($options['type'] == 'file') {\n $output .= ' enctype=\"multipart/form-data\"';\n }\n\n $output .= ' method=\"' . $options['method'] . '\"';\n $output .= ' action=\"' . $options['action'] . '\">';\n\n return html__output($output);\n}", "function zen_draw_form($name, $action, $method = 'post', $parameters = '') {\n $form = '<form name=\"' . zen_output_string($name) . '\" action=\"' . zen_output_string($action) . '\" method=\"' . zen_output_string($method) . '\"';\n\n if (zen_not_null($parameters)) $form .= ' ' . $parameters;\n\n $form .= '>';\n if (strtolower($method) == 'post') $form .= '<input type=\"hidden\" name=\"securityToken\" value=\"' . $_SESSION['securityToken'] . '\" />';\n return $form;\n }", "function Form()\n\t{\n\t\tprint '<form name=\"myform\" action=\"' . THIS_PAGE . '\" method=\"post\">';\n\t\tforeach($this->aQuestion as $question)\n\t\t{//print data for each\n\t\t\t$this->createInput($question);\n\t\t}\n\t\tprint '<input type=\"hidden\" name=\"SurveyID\" value=\"' . $this->SurveyID . '\" />';\t\n\t\tprint '<input type=\"submit\" value=\"Submit!\" />';\t\n\t\tprint '</form>';\n\t}", "public static function beginForm($action='',$method='post',$htmlOptions=array()){\n\t\t$htmlOptions['action']=$action;\n\t\t$htmlOptions['method']=$method;\n\t\t$form=self::htmltag('form',$htmlOptions,false,false);\n\t\treturn $form;\n\t}", "function mpc_html_form_code() {\n echo '<form action=\"' .esc_url( $_SERVER['REQUEST_URI'] ) . '\" method=\"post\">';\n echo '<p>';\n echo 'Il tuo Nome <br>';\n echo '<input type=\"text\" name=\"mpc-name\" pattern=\"[a-zA-Z0-9]+\" value=\"' . ( isset($_POST[\"mpc-name\"]) ? esc_attr( $_POST[\"mpc-name\"]) : '' ) . '\" size=40></p>';\n echo '<p>La tua email <br>';\n echo '<input type=\"email\" name=\"mpc-email\" value=\"' . ( isset($_POST[\"mpc-email\"]) ? esc_attr( $_POST[\"mpc-email\"]) : '' ) . '\" size=40></p>';\n echo 'Oggetto <br/>';\n\techo '<input type=\"text\" name=\"mpc-subject\" pattern=\"[a-zA-Z ]+\" value=\"' . ( isset( $_POST[\"mpc-subject\"] ) ? esc_attr( $_POST[\"mpc-subject\"] ) : '' ) . '\" size=\"40\" />';\n\techo '</p>';\n\techo '<p>Il tuo messaggio <br/>';\n\techo '<textarea rows=\"10\" cols=\"35\" name=\"mpc-message\">' . ( isset( $_POST[\"mpc-message\"] ) ? esc_attr( $_POST[\"mpc-message\"] ) : '' ) . '</textarea>';\n\techo '</p>';\n\techo '<p><input type=\"submit\" name=\"mpc-submitted\" value=\"Invia\"></p>';\n\techo '</form>';\n}", "function form($action=\"\", $method=\"\"):string\n{\n return '<form method=\"'.$method.'\" action=\"'.$action.'\">' ;\n}", "function InputForm()\n\t{\t\n\t\tif (!$data = $this->details)\n\t\t{\t$data = $_POST;\n\t\t\tif (!$data)\n\t\t\t{\t$data = array('live'=>1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$form = new Form('pageedit.php?id=' . (int)$this->id, 'pageedit');\n\t\t$form->AddTextInput('Page title', 'pagetitle', $this->InputSafeString($data['pagetitle']), '', 50);\n\t\t$form->AddCheckBox('Hide title on page', 'hideheader', 1, $data['hideheader']);\n\t\t\n\t\tif ($parents = $this->GetPossibleParents())\n\t\t{\t$form->AddSelectWithGroups('Parent page', 'parentid', $data['parentid'], '', $parents, 1, 0, '');\n\t\t\t$form->AddCheckBox('Display as section of parent', 'inparent', 1, $data['inparent']);\n\t\t}\n\t\t\n\t\t$form->AddTextInput('Order in menu', 'pageorder', (int)$data['pageorder'], 'num', 4);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Extra page to include', 'includefile', $this->InputSafeString($data['includefile']), '', 50);\n\t\t\t$form->AddCheckBox('Allow galleries', 'galleries', 1, $data['galleries']);\n\t\t}\n\t\t$form->AddCheckBox('Make live', 'pagelive', 1, $data['pagelive']);\n\t\t$form->AddCheckBox('Leave out of search results', 'nosearch', 1, $data['nosearch']);\n\t\t$form->AddCheckBox('Show social media links?', 'socialbar', 1, $data['socialbar']);\n\t\t$form->AddCheckBox('In header menu?', 'headermenu', 1, $data['headermenu']);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Class for header menu', 'menuclass', $this->InputSafeString($data['menuclass']), '', 50);\n\t\t}\n\t\t$form->AddCheckBox('In footer menu?', 'footermenu', 1, $data['footermenu']);\n\t\t$form->AddCheckBox('Header only (no content)', 'headeronly', 1, $data['headeronly']);\n\t\t$form->AddTextInput('Redirect link (full address if external)', 'redirectlink', $this->InputSafeString($data['redirectlink']), 'long', 255);\n\t\t\n\t\tif ($this->id)\n\t\t{\t$form->AddTextInput('Slug (for URL)', 'pagename', $this->InputSafeString($data['pagename']), 'long', 255);\n\t\t\tif ($link = $this->Link())\n\t\t\t{\t$form->AddRawText('<p><label>Link to page</label><span><a href=\"' . $link . '\" target=\"_blank\">' . $link . '</a></span><br /></p>');\n\t\t\t}\n\t\t}\n\t\t$form->AddCheckBox('Display block link in parent (if any)', 'blocklink', 1, $data['blocklink']);\n\t\t$form->AddTextArea('Block link text', $name = 'pageintro', stripslashes($data['pageintro']), 'tinymce', 0, 0, 10, 60);\n\t\t$form->AddTextArea('Page content', $name = 'pagetext', stripslashes($data['pagetext']), 'tinymce', 0, 0, 50, 60);\n\t\t$form->AddRawText('<p><label></label><a href=\"#\" onclick=\"javascript:window.open(\\'newsimagelist.php\\', \\'newsimages\\', \\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=550\\'); return false;\">view available images</a></p>');\n\t\t$form->AddFileUpload('Subpage image:', 'imagefile');\n\t\tif ($src = $this->HasImage('thumbnail'))\n\t\t{\t$form->AddRawText('<label>Current image</label><img src=\"' . $src . '?' . time() . '\" height=\"200px\" /><br />');\n\t\t\t$form->AddCheckBox('Delete this', 'delphoto');\n\t\t}\n\t\t\n\t\tob_start();\n\t\techo '<label>Banner:</label><br /><label id=\"bannerPicked\">', ($data['banner'] && ($banner = new BannerSet($data['banner'])) && $banner->id) ? $this->InputSafeString($banner->details['title']) : 'none','</label><input type=\"hidden\" name=\"banner\" id=\"bannerValue\" value=\"', (int)$data['banner'], '\" /><span class=\"dataText\"><a onclick=\"BannerPicker();\">change this</a></span><br />';\n\t\t$form->AddRawText(ob_get_clean());\n\n\n\t\t$form->AddSubmitButton('', $this->id ? 'Save' : 'Create', 'submit');\n\t\techo $this->BannerPickerPopUp();\n\t\t\n\t\t$form->Output();\n\t}", "function startForm($name, $id, $action, $method ='', $enctype=\"\", $class=\"\"){\n if (!$method) $method = 'POST';\n $out = \"<form name='$name' id='$id' action='\".BASE_PATH . $action .\"' method='$method' enctype='$enctype' class='$class' >\";\n return $out;\n }", "public static function form_tag($html_attributes = array())\n {\n return self::start_form_tag($html_attributes);\n }", "public function criarHtml()\n {\n ;\n $form = \"\n <div class='row'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\n <div class='x_panel'>\n <div class='x_content'>\n<form id='form' class='form-horizontal form-label-left' data-parsley-validate enctype='multipart/form-data' method='POST' >\n \" . $this->conteudo . \"\n <div class='ln_solid'></div>\n <div class='form-group'>\n <div class='col-md-3 col-sm-3 col-xs-12 col-md-offset-9'>\n <button class='btn btn-primary' type='submit'>Cancel</button>\n <a class='btn btn-success' onclick='$this->action'>Salvar</a>\n </div>\n </div>\n</form>\n</div>\n</div>\n</div>\n</div>\n\";\n return $form;\n }", "function create_form_input( $name, $type, $errors, $placeholder = '', $classes = '', $ids = '', $postGet = '$_POST', $checked )\r\n\t\t{\r\n\t\t\t# Check for and process value\r\n\t\t\t$value = false;\r\n\r\n\t\t\t# Set value of $name if it's set\r\n\t\t\tif( isset( $_POST[$name] ) ) $value = $_POST[$name];\r\n\r\n\t\t\t# Strip magic slashes if enabled\r\n\t\t\t//if( $value && get_magic_quotes_gcp( ) ) $value = stripslashes( $value );\r\n\r\n\t\t\t# Check if the input type is text or password\r\n\t\t\tif( ( $type == 'text' ) || ( $type == 'password' ) )\r\n\t\t\t{\r\n\t\t\t\t# Begin creating the input\r\n\t\t\t\techo '<input type=\"' . $type . '\" name=\"' . $name . '\" id=\"' . $ids . '\" placeholder=\"' . $placeholder . '\" '; \r\n\r\n\t\t\t\t# add the input's value, if applicable and strip html special characters\r\n\t\t\t\tif( isset( $value ) ) \r\n\t\t\t\t\techo ' value=\"' . $value . '\" ';\r\n\r\n\t\t\t\t# Check for errors\r\n\t\t\t\tif( array_key_exists( $name, $errors ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Set Error class and display error underneath input\r\n\t\t\t\t\techo 'class=\"form-' . $name . ' ' . $classes . ' error\" />'\r\n\t\t\t\t\t\t. '<small class=\"error\">' . $errors[$name] . '</small>';\r\n\r\n\t\t\t\t} // end if( array_key_exists( $name, $errors ) )\r\n\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\techo 'class=\"form-' . $name . ' ' . $classes . '\" />';\r\n\r\n\t\t\t\t} // end else\r\n\r\n\t\t\t} // end if( ( $type == 'text' ) || ( $type == 'password' ) )\r\n\r\n\t\t\telseif( $type == 'textarea' )\r\n\t\t\t{\r\n\t\t\t\t# Begin creating the input\r\n\t\t\t\techo '<textarea name=\"' . $name . '\" id=\"' . $ids . '\" placeholder=\"' . $placeholder . '\" '; \r\n\r\n\r\n\t\t\t\t# Check for errors\r\n\t\t\t\tif( array_key_exists( $name, $errors ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Set Error class and display error underneath input\r\n\t\t\t\t\techo 'class=\"form-' . $name . ' ' . $classes . ' error\" >';\r\n\r\n\t\t\t\t\t\tif( isset( $_POST[$name] ))\r\n\t\t\t\t\t\techo htmlentities($_POST[$name]);\r\n\r\n\t\t\t\t\techo '</textarea>'\r\n\t\t\t\t\t\t. '<small class=\"error\">' . $errors[$name] . '</small>';\r\n\r\n\t\t\t\t} // end if( array_key_exists( $name, $errors ) )\r\n\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\techo 'class=\"form-' . $name . ' ' . $classes . '\" >';\r\n\r\n\t\t\t\t\t# add the input's value, if applicable and strip html special characters\r\n\t\t\t\t\t if( isset( $_POST[$name] ))\r\n\t\t\t\t\t\techo htmlentities($_POST[$name]);\r\n\r\n\t\t\t\t\techo '</textarea>';\r\n\r\n\r\n\t\t\t\t} // end else\r\n\r\n\t\t\t} // end elseif( $type == 'textarea' )\r\n\r\n\t\t\telseif( $type = 'checkbox' )\r\n\t\t\t{\r\n\t\t\t\techo \"<label for='checkbox1' class='form-$name $classes' id='$ids'><input type='checkbox' name='$name' \";\r\n\r\n\t\t\t\tif(isset($_POST[FORM_OPT_IN]) && $_POST[FORM_OPT_IN] == 'on') \r\n\t\t\t\t{\r\n\t\t\t\t\techo \" value='\" . $_POST[FORM_OPT_IN] . \"'\";\r\n\r\n\t\t\t\t\tif( $checked == TRUE )\r\n\r\n\t\t\t\t\t\t echo 'value=\"on\" CHECKED ';\r\n\t\t\t\t}\r\n\r\n\r\n\r\n\r\n\t\t\t\techo \"><span class='mls'>$placeholder</span></label>\";\r\n\r\n\t\t\t} // end\r\n\r\n\t\t}", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "function HTMLInput ($params) {\n if (!isset($params['type'])) {\n $params['type'] = 'text';\n }\n if (!isset($params['name'])) {\n if (isset($params['id'])) {\n $params['name'] = $params['id'];\n }\n }\n $ck = $params['checked'];\n unset($params['checked']);\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n return \"<input {$str} {$ck} />\";\n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "function form_tag($action, $method=\"post\")\r\n{\r\n return \"<form action='$action' method='$method'>\\n\";\r\n}", "public function renderCreateModalHTML()\n {\n $input_form = \"<div class=\\\"form-group\\\">\n <label for=\\\"{{label}}\\\">{{label}}</label>\n <input type=\\\"{{type}}\\\" class=\\\"form-control\\\" id=\\\"create_input_{{label}}\\\">\n </div>\";\n $break_line = \"\\n\";\n\n $form_result = \"\";\n $columns = $this->getShowColumnCreateModal();\n foreach ($columns as $name => $type) {\n $input_type = 'text';\n\n if ($type == \"bigint\" OR $type == \"integer\"){\n $input_type = 'number';\n }elseif ($type == \"string\"){\n $input_type = 'text';\n }elseif ($type == \"datetime\"){\n $input_type = 'datetime-local';\n }\n\n $one_form = str_replace(\n [\n '{{label}}','{{type}}'\n ],\n [\n $name, $input_type\n ],\n $input_form\n );\n $form_result = $form_result.$one_form.$break_line;\n }\n\n return $form_result;\n }", "abstract protected function getInputHtml();", "public function getForm(): string\n {\n return $this->html;\n }", "public function get_html()\n\t{\n\t\tif ( empty($this->html) && $this->name ){\n\t\t\t\n\t\t\t$this->html .= '<'.$this->tag.' name=\"'.$this->name.'\"';\n\t\t\t\n\t\t\tif ( isset($this->id) ){\n\t\t\t\t$this->html .= ' id=\"'.$this->id.'\"';\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->tag === 'input' && isset($this->options['type']) ){\n\t\t\t\t$this->html .= ' type=\"'.$this->options['type'].'\"';\n\t\t\t\t\n\t\t\t\tif ( $this->options['type'] === 'text' || $this->options['type'] === 'number' || $this->options['type'] === 'password' || $this->options['type'] === 'email' ){\n\t\t\t\t\tif ( isset($this->options['maxlength']) && ( $this->options['maxlength'] > 0 ) && $this->options['maxlength'] <= 1000 ){\n\t\t\t\t\t\t$this->html .= ' maxlength=\"'.$this->options['maxlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['minlength']) && ( $this->options['minlength'] > 0 ) && $this->options['minlength'] <= 1000 && ( \n\t\t\t\t\t( isset($this->options['maxlength']) && $this->options['maxlength'] > $this->options['minlength'] ) || !isset($this->options['maxlength']) ) ){\n\t\t\t\t\t\t$this->html .= ' minlength=\"'.$this->options['minlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['size']) && ( $this->options['size'] > 0 ) && $this->options['size'] <= 100 ){\n\t\t\t\t\t\t$this->html .= ' size=\"'.$this->options['size'].'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $this->options['type'] === 'checkbox' ){\n\t\t\t\t\tif ( !isset($this->options['value']) ){\n\t\t\t\t\t\t$this->options['value'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->options['value']).'\"';\n\t\t\t\t\tif ( $this->value == $this->options['value'] ){\n\t\t\t\t\t\t$this->html .= ' checked=\"checked\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( $this->options['type'] === 'radio' ){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->value).'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['title']) ){\n\t\t\t\t$this->html .= ' title=\"'.$this->options['title'].'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$class = '';\n\t\t\t\n\t\t\tif ( isset($this->options['cssclass']) ){\n\t\t\t\t$class .= $this->options['cssclass'].' ';\n\t\t\t}\n\n\t\t\tif ( $this->required ){\n\t\t\t\t$class .= 'required ';\n\t\t\t}\n\t\t\tif ( isset($this->options['email']) ){\n\t\t\t\t$class .= 'email ';\n\t\t\t}\n\t\t\tif ( isset($this->options['url']) ){\n\t\t\t\t$class .= 'url ';\n\t\t\t}\n\t\t\tif ( isset($this->options['number']) ){\n\t\t\t\t$class .= 'number ';\n\t\t\t}\n\t\t\tif ( isset($this->options['digits']) ){\n\t\t\t\t$class .= 'digits ';\n\t\t\t}\n\t\t\tif ( isset($this->options['creditcard']) ){\n\t\t\t\t$class .= 'creditcard ';\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($class) ){\n\t\t\t\t$this->html .= ' class=\"'.trim($class).'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$this->html .= '>';\n\t\t\t\n\t\t\tif ( $this->tag === 'select' || $this->tag === 'textarea' ){\n\t\t\t\t$this->html .= '</'.$this->tag.'>';\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['placeholder']) && strpos($this->options['placeholder'],'%s') !== false ){\n\t\t\t\t$this->html = sprintf($this->options['placeholder'], $this->html);\n\t\t\t}\n\t\t}\n\t\treturn $this->html;\n\t}", "function Get_Search_Form_HTML()\n{\n $html = '';\n $html .= '<form class=\"Indented\" method=\"post\" ' .\n 'action=\"index.php?Page_Type=Search\">';\n $html .= '<input type=\"text\" name=\"SearchString\" class=\"Search\"/>';\n $html .= '<input type=\"submit\" value=\"Submit\" class=\"Search_Button\"/>';\n $html .= '</form>';\n return $html;\n}", "abstract public function forms();", "public function openForm()\n {\n $class = 'form';\n if (isset($this->options['class'])) {\n $class .= ' '.$this->options['class'];\n }\n\n $enctype = '';\n foreach ($this->fields as $field) {\n if ($field instanceof Field\\File) {\n $enctype = 'enctype=\"multipart/form-data\"';\n }\n }\n\n return sprintf('<form class=\"form\" action=\"%s\" method=\"%s\" class=\"%s\" %s>',\n $this->action,\n $this->method,\n $class,\n $enctype);\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "public function getTemplateExample()\n\t{\n\t\t// start form\n\t\t$value = \"\\n\";\n\t\t$value .= '{form:' . $this->getName() . \"}\\n\";\n\n\t\t/**\n\t\t * At first all the hidden fields need to be added to this form, since\n\t\t * they're not shown and are best to be put right beneath the start of the form tag.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// is a hidden field\n\t\t\tif(($object instanceof SpoonFormHidden) && $object->getName() != 'form')\n\t\t\t{\n\t\t\t\t$value .= \"\\t\" . '{$hid' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . \"}\\n\";\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Add all the objects that are NOT hidden fields. Based on the existance of some methods\n\t\t * errors will or will not be shown.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// NOT a hidden field\n\t\t\tif(!($object instanceof SpoonFormHidden))\n\t\t\t{\n\t\t\t\t// buttons\n\t\t\t\tif($object instanceof SpoonFormButton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$btn' . SpoonFilter::toCamelCase($object->getName()) . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// single checkboxes\n\t\t\t\telseif($object instanceof SpoonFormCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// multi checkboxes\n\t\t\t\telseif($object instanceof SpoonFormMultiCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// dropdowns\n\t\t\t\telseif($object instanceof SpoonFormDropdown)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error} class=\"errorArea\"{/option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '} {$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// imagefields\n\t\t\t\telseif($object instanceof SpoonFormImage)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpImageField}</span> {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// filefields\n\t\t\t\telseif($object instanceof SpoonFormFile)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// radiobuttons\n\t\t\t\telseif($object instanceof SpoonFormRadiobutton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.rbt' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// datefields\n\t\t\t\telseif($object instanceof SpoonFormDate)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpDateField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// timefields\n\t\t\t\telseif($object instanceof SpoonFormTime)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpTimeField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// textfields\n\t\t\t\telseif(($object instanceof SpoonFormPassword) || ($object instanceof SpoonFormTextarea) || ($object instanceof SpoonFormText))\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $value . '{/form:' . $this->getName() . '}';\n\t}", "public function getForm();", "private function makeform() {\n\tglobal $qqi;\n\t\n\t$form=new llform($this,'form');\n\t$form->addFieldset('d','');\n\t$form->addControl('d',new ll_listbox($form,'users','Users'));\n\t$form->addControl('d',new ll_button($form,'allusers','Select All','button'));\n\t$form->addControl('d',new ll_listbox($form,'functions','Functions'));\n\t$form->addControl('d',new ll_button($form,'allfunctions','Select All','button'));\n\t$rg=new ll_radiogroup($form,'showby');\n\t\t$rg->addOption('byusers','Rows of Users');\n\t\t$rg->addOption('byfunctions','Rows of Functions');\n\t\t$rg->setValue('byfunctions');\n\t$form->addControl('d',$rg);\t\n\t$form->addControl('d',new ll_button($form,'update','Update Display','button'));\n\treturn $form;\n}", "protected function form()\n {\n $form = new Form(new Sections());\n\n $form->text('name', __('Nazwa'));\n $form->text('pageId', __('ID sekcji (w sensie HTML)'));\n $form->textarea('content', __('Zawartość'));\n $form->textarea('style', __('Style(CSS'));\n\n return $form;\n }", "public function input(){\n\t\treturn '<input '.\n\t\t\t\t\t'type=\"'. $this->tipo .'\" '.\n\t\t\t\t\t'id=\"'. $this->name .'\" '.\n\t\t\t\t\t'name=\"'. $this->name .'\" '.\n\t\t\t\t\t'class=\"form-control\" '.\n\t\t\t\t\t'value=\"'.( isset($_POST[$this->name]) ? $_POST[$this->name] : '').'\"'.\n\t\t\t\t'/>';\n\t}", "function getInputForm() {\n\t\treturn new \\Flux\\LeadSplit();\n\t}", "static public function input($name,$opts=[]) {\n $tag = '';\n if (isset($opts['prefix'])) {\n $prefix = $opts['prefix'];\n unset($opts['prefix']);\n } else {\n $prefix = 'form_';\n }\n\n if (!isset($opts['type'])) $opts['type'] = 'text';\n if (!isset($opts['name'])) $opts['name'] = $name;\n if (!isset($opts['id'])) $opts['id'] = $prefix.$name;\n\n if (!isset($opts['value'])) {\n $f3 = Base::instance();\n if ($f3->exists('POST.'.$name)) {\n $opts['value'] = $f3->get('POST.'.$name);\n } elseif (isset($opts['default'])) {\n\t$opts['value'] = self::esc($opts['default']);\n } else {\n $opts['value'] = '';\n }\n } else {\n $opts['value'] = self::esc($opts['value']);\n }\n if (isset($opts['default'])) unset($opts['default']);\n if (isset($opts['label'])) {\n $tag .= '<label for=\"'.$opts['id'].'\">'.$opts['label'].'</label>';\n unset($opts['label']);\n }\n\n $tag .= '<input';\n foreach ($opts as $k=>$v) {\n if (preg_match(self::BOOLEAN_RE,$k)) {\n $tag .= ' '.$v;\n } else {\n $tag .= ' '.$k.'=\"'.$v.'\"';\n }\n }\n $tag .= '/>';\n return $tag;\n }", "public function renderForm() {\n $enctype = $this->_enctype ? \"enctype=\\\"multipart/form-data\\\"\" : \"\";\n $formAttributes = $this->_renderAttributes($this->_formAttributes);\n $html = \"<form action=\\\"{$this->getAction()}\\\" method=\\\"{$this->_method}\\\" {$enctype} $formAttributes>\";\n $currentFieldset = NULL;\n\n if (count($this->_inputElements)) {\n foreach ($this->_inputElements as $element) {\n if ($element[1] !== NULL) {\n if ($element[1] !== $currentFieldset) {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n $fieldset = $this->_fieldsets[$element[1]];\n $fieldsetAttributes = $this->_renderAttributes($fieldset[1]);\n $html .= \"<fieldset {$fieldsetAttributes}><legend>{$fieldset[0]}</legend>\";\n $currentFieldset = $element[1];\n }\n } else {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n }\n $html .= $this->renderElement($element[0]->getName());\n $currentFieldset = $element[1];\n }\n }\n if (count($this->_hiddenElements)) {\n foreach ($this->_hiddenElements as $element) {\n $html .= $this->renderElement($element->getName());\n }\n }\n $html .= \"</form>\";\n return $html;\n }", "function __generateForm($entity,$action=\"\",$label=\"\",$method=\"POST\"){\n\t$htmlForm = new HtmlForm(\n\t\t\tget_class($entity),\n\t\t\t$action,\n\t\t\tnull,\n\t\t\tnull,\n\t\t\tarray(\t'method'=>$method,\n\t\t\t\t\t\t'label'=>$label)\n\t\t\t);\n\t$htmlForm->generateFormForEntity($entity);\n\techo $htmlForm->serialize();\n}", "function makeForm($frm) {\r\n\t\tif(!empty($frm)) preg_replace('/\\s+/', ' ', $frm);\r\n\r\n \t$html=\"<table>\";\r\n\r\n\t foreach ($frm AS $row) {\r\n\t\t\t$html.=\"<tr><td>\".$row['title'].\"</td><td>\".$row['field'].\"</td></tr>\";\r\n\t\t}\r\n\r\n \t$html.=\"</table>\";\r\n\r\n\t return $html;\r\n\t}", "function InputForm()\n\t{\t\n\t\t$form = new Form($_SERVER[\"SCRIPT_NAME\"] . \"?id=\" . $this->id, \"crewcvForm\");\n\t\t$form->AddTextInput(\"City name\", \"cityname\", $this->InputSafeString($this->details[\"cityname\"]), \"\", 100);\n\t\t$form->AddSelect(\"Country\", \"country\", $this->id ? $this->details[\"country\"] : $_GET[\"ctry\"], \"\", $this->CountriesList(), true, true, \"onchange='GetFromEmail(\\\"country\\\", \\\"country\\\")';\");\n\t\t$form->AddTextInput(\"\\\"From\\\" email address\", \"emailfrom\", $this->InputSafeString($this->details[\"emailfrom\"]), \"long\", 255);\n\t\tif ($this->details[\"country\"])\n\t\t{\t$country = new Country($this->details[\"country\"]);\n\t\t\t$defemail = $country->EmailFrom();\n\t\t} else\n\t\t{\t$defemail = $this->GetParameter(\"emailfrom\");\n\t\t}\n\t\t$form->AddRawText(\"<label>Default \\\"From\\\" if not defined here</label><label id='ad_ak_emailfrom' class='content_label'>$defemail</label><br />\\n\");\n\t\t$form->AddSubmitButton(\"\", $this->id ? \"Save Changes\" : \"Create New City\", \"submit\");\n\t\tif ($histlink = $this->DisplayHistoryLink(\"cities\", $this->id))\n\t\t{\techo \"<p>\", $histlink, \"</p>\";\n\t\t}\n\t\tif ($this->CanDelete())\n\t\t{\techo \"<p><a href='\", $_SERVER[\"SCRIPT_NAME\"], \"?id=\", $this->id, \"&delete=1\", \n\t\t\t\t\t$_GET[\"delete\"] ? \"&confirm=1\" : \"\", \"'>\", $_GET[\"delete\"] ? \"please confirm you really want to \" : \"\", \n\t\t\t\t\t\"delete this city</a></p>\\n\";\n\t\t}\n\t\t$form->Output();\n\t}", "function qa_path_form_html($request, $params = null, $rooturl = null, $neaturls = null, $anchor = null)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\t$path = qa_path($request, $params, $rooturl, $neaturls, $anchor);\n\t$formhtml = '';\n\n\t$questionpos = strpos($path, '?');\n\tif (is_numeric($questionpos)) {\n\t\t$params = explode('&', substr($path, $questionpos + 1));\n\n\t\tforeach ($params as $param)\n\t\t\tif (preg_match('/^([^\\=]*)(\\=(.*))?$/', $param, $matches))\n\t\t\t\t$formhtml .= '<input type=\"hidden\" name=\"' . qa_html(urldecode($matches[1])) . '\" value=\"' . qa_html(urldecode(@$matches[3])) . '\"/>';\n\t}\n\n\treturn $formhtml;\n}", "public function render(){\n\t\t$fhp; // form_helper_params\n\t\t$value = $this->_data['value'];\n\t\t$form_helper = 'input';\n\t\t$attributes = Arr::extract($this->_data,['id','required','maxlength','title','pattern','readonly','class','size','placeholder','multiple','accept','options']);\n\t\tif(!in_array($this->_data['type'],['radio'])) unset($attributes['options']);\n\t\tif($attributes['required']!==true) unset($attributes['required']);\n\t\tif($attributes['readonly']!==true) unset($attributes['readonly']);\n\t\tif(!$attributes['maxlength']) unset($attributes['maxlength']);\n\t\tif(!$attributes['size']) unset($attributes['size']);\n\t\t$fhp = [$this->_data['name'],$value,$attributes];\n\t\t//$name = $this->_data['name'];\n\t\t//open,close,input,button,checkbox,file,hidden,image,label,password,radio,select,submit,textarea,\n\t\t//$attr\n\t\tswitch($this->_data['type']){\n\t\t\tcase'form':\n\t\t\t\t$form_helper = $this->_data['data_type']; $fhp=[];\n\t\t\t\tbreak;\n\t\t\tcase'select':\n\t\t\t\t//unset\n\t\t\t\t$form_helper='select'; $fhp=[$this->_data['name'],$this->_data['options'],$value,$attributes];\n\t\t\t\tbreak;\n\t\t\tcase'checkbox':\n\t\t\t\t$fhp = [$this->_data['name'],1,!!($value),$attributes];\n\t\t\t\t$form_helper='checkbox';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//if($this->_data['type'] == 'radio') $fhp[2]['options'] = Arr::get($this->_data,'options');\n\t\t\t\tif(in_array($this->_data['type'],['file','select','checkbox','radio','hidden'])) $this->_data['inputtype'] = $this->_data['type'];\n\t\t\t\t//if()\n\t\t\t\tswitch($this->_data['data_type']){\n\t\t\t\t\tcase'int':\n\t\t\t\t\t\t$fhp[2]['type']='number';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase'text':\n\t\t\t\t\t\t$form_helper='textarea';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\tif($form_helper=='input') $fhp[2]['type']=$this->_data['inputtype'];\n\t\t/*switch($this->_data['data_type']){\n\t\t\tcase'form':\n\t\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\treturn call_user_func_array([$this,$form_helper],$fhp);\n\t\t//->($this->_data['name']);\n\t\t//return json_encode($this->_datations);\n\t\t//return \n\t\t}", "public function createForm()\n {\n }", "function awm_create_form($options)\n{\n\n $defaults = array(\n 'library' => '',\n 'id' => '',\n 'method' => 'post',\n 'action' => '',\n 'submit' => true,\n 'submit_label' => __('Register', 'awm'),\n 'nonce' => true\n );\n\n $settings = array_merge($defaults, $options);\n $library = $settings['library'];\n\n ob_start();\n?>\n <form id=\"<?php echo $settings['id']; ?>\" action=\"<?php echo $settings['action']; ?>\" method=\"<?php echo $post; ?>\">\n <?php\n if ($settings['nonce']) {\n wp_nonce_field($settings['id'], 'awm_form_nonce_field');\n }\n ?>\n <?php echo awm_show_content($library); ?>\n <?php if ($settings['submit']) {\n ?>\n <input type=\"submit\" id=\"awm-submit-<?php echo $settings['id'] ?>\" value=\"<?php echo $settings['submit_label']; ?>\" />\n <?php\n }\n ?>\n </form>\n<?php\n $content = ob_get_contents();\n ob_end_clean();\n return $content;\n}", "public function createComponentGenerateForm() {\n $form = new Form;\n\n\n $groups = $this->groups->getForTest($this->user->id);\n\n $form->addSelect('groupBox', 'Skupina:', $groups);\n $form->addHidden('test_id', $this->getParameter('testId'));\n $form->addText('questionCount')->setRequired('Zadejte počet otázek');\n $form->addText('answerCount')->setRequired('Zadejte počet odpovědí');\n $form->addRadioList('pageFormat', 'Formát stránky', array('a4' => 'A4', 'a5' => 'A5'))\n ->setRequired('Vyberte formát stránky');\n $form->addTextArea('students');\n\n $form->onSuccess[] = callback($this, 'generateFormSubmitted');\n $form->addSubmit('submit');\n\n return $form;\n }", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "public static function form(){\n\t\treturn \"\";\n\t}", "function minorite_form($variables) {\n $element = $variables['element'];\n if (isset($element['#action'])) {\n $element['#attributes']['action'] = drupal_strip_dangerous_protocols($element['#action']);\n }\n element_set_attributes($element, array('method', 'id'));\n if (empty($element['#attributes']['accept-charset'])) {\n $element['#attributes']['accept-charset'] = \"UTF-8\";\n }\n return '<form' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</form>';\n}", "abstract function getForm();", "function YOUR_THEME_form($variables) {\n $element = $variables['element'];\n if (isset($element['#action'])) {\n $element['#attributes']['action'] = drupal_strip_dangerous_protocols($element['#action']);\n }\n element_set_attributes($element, array('method', 'id'));\n if (empty($element['#attributes']['accept-charset'])) {\n $element['#attributes']['accept-charset'] = \"UTF-8\";\n }\n return '<form' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</form>';\n}", "public static function getForm();", "function ooForm( ) {\n\n $this->templateobj = new ooFormTemplate(); // $this->templateobj = new ooFormTemplate('templates'); this has to be changed to pass generic options to template engine as required by the engine, each is different, you can't put 'template' in here, you've got to pass an array of options meaningful to the engine.\n\n$this->params_list = $_REQUEST;\n\n//if( $this->debug ) {\n//\tprint \"<pre>\";\n//\tprint \"Dumping Constructor\\n\";\n//\tprint \"Field List\\n\";\n//\tprint_r( $this->fields_list );\n//\tprint \"CGI Parameters\\n\";\n//\tprint_r( $this->params_list );\n// \tprint \"</pre>\";\n//}\n\n }", "protected function form()\n {\n $form = new Form(new Emailtpls());\n\n $form->text('tpl_name', __('Tpl name'));\n $form->textarea('tpl_content', __('Tpl content'));\n $form->text('tpl_token', __('Tpl token'));\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n });\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`查看`按钮\n $tools->disableView();\n });\n return $form;\n }", "public function getFormInput() {\r\n\t\t$name\t\t\t= $this->getName();\r\n\t\t$id\t\t\t\t= $this->getId();\r\n\t\t$attr\t\t\t= $this->getAttributes();\r\n\t\t$type \t\t\t= 'file';\r\n\t\t$additional \t= '';\r\n\t\t\r\n\t\t// MAX_FILE_SIZE is no longer used, didn't provide anything useful\r\n\t\t\r\n\t\t// Start building the HTML input\r\n\t\t$html = '<input';\r\n\t\t// Parse Additional Attributes\r\n\t\tif ($attr) {\r\n\t\t\tforeach ($attr as $key => $values) {\r\n\t\t\t\t// @new feature - Some HTML attributes (type) can be overwritten\r\n\t\t\t\t// directly from the Additional Attributes area\r\n\t\t\t\tif ($key == 'type' && strlen($values)) {\r\n\t\t\t\t\t${$key} = $values;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$additional .= $this->attributeToHtml($key, $values);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Set the type\r\n\t\t$html .= ' type=\"'.$this->escape($type).'\"';\r\n\t\t// Name & id\r\n\t\t$html .= ' name=\"'.$this->escape($name).'\"'.\r\n\t\t\t\t ' id=\"'.$this->escape($id).'\"';\r\n\t\t// Additional HTML\r\n\t\t$html .= $additional;\r\n\t\t// Close the tag\r\n\t\t$html .= ' />';\r\n\t\t\r\n\t\treturn $html;\r\n\t}", "function getForm($title, $arr)\n{\n\t$ret = '<form method=\"post\" action=\"index.php\">' . $title;\n\n\twhile(list(,$array) = each($arr))\n\t\t$ret .= $array[0] . getFormField($array[1]);\n\n\t$ret .= '</form>';\n\n\treturn $ret;\n}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function build_form($echo = true) {\n\t\n\t\t$output = '\n\t\t<form method=\"' . $this->form['method'] . '\"';\n\t\t\n\t\tif (!empty($this->form['enctype'])) $output .= ' enctype=\"' . $this->form['enctype'] . '\"';\n\t\t\n\t\tif (!empty($this->form['action'])) $output .= ' action=\"' . $this->form['action'] . '\"';\n\t\t\n\t\tif (!empty($this->form['id'])) $output .= ' id=\"' . $this->form['id'] . '\"';\n\t\t\n\t\tif (count($this->form['class']) > 0) $output .= $this->_output_classes($this->form['class']);\n\t\t\n\t\tif ($this->form['novalidate']) $output .= ' novalidate';\n\t\t\n\t\t$output .= '>';\n\t\t\n\t\tif ($this->form['add_honeypot']) \n\t\t\t$this->add_input('Leave blank to submit', array(\n\t\t\t\t'name' => 'honeypot',\n\t\t\t\t'slug' => 'honeypot',\n\t\t\t\t'id' => 'form_honeypot',\n\t\t\t\t'wrap_tag' => 'div',\n\t\t\t\t'wrap_class' => array('form_field_wrap', 'hidden'),\n\t\t\t\t'wrap_id' => '',\n\t\t\t\t'wrap_style' => 'display: none'\n\t\t\t));\n\t\t\n\t\tif ($this->form['add_nonce'] && function_exists('wp_create_nonce')) \n\t\t\t$this->add_input('WordPress nonce', array(\n\t\t\t\t'value' => wp_create_nonce($this->form['add_nonce']),\n\t\t\t\t'add_label' => false,\n\t\t\t\t'type' => 'hidden'\n\t\t\t));\n\t\t\n\t\tforeach ($this->inputs as $key => $val) :\n\t\t\t\n\t\t\t$min_max_range = $element = $end = $attr = $field = $label_html = '';\n\t\t\t\n\t\t\t// Set the field value to incoming\n\t\t\t$val['value'] = isset($_REQUEST[$val['name']]) && !empty($_REQUEST[$val['name']]) ? \n\t\t\t\t$_REQUEST[$val['name']] : \n\t\t\t\t$val['value'];\n\t\t\t\n\t\t\tswitch ($val['type']) :\n\t\t\t\t\n\t\t\t\tcase 'html':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = $val['label'];\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'title':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = '\n\t\t\t\t\t<h3>' . $val['label'] . '</h3>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$element = 'textarea';\n\t\t\t\t\t$end = '>' . $val['value'] . '</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'select':\n\t\t\t\t\t$element = 'select';\n\t\t\t\t\t$end = '>' . $this->_output_options_select($val['options']) . '\n\t\t\t\t\t</select>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_checkbox($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_radios($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'number':\n\t\t\t\t\t$min_max_range .= !empty($val['min']) ? ' min=\"' . $val['min'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['max']) ? ' max=\"' . $val['max'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['step']) ? ' step=\"' . $val['step'] . '\"' : '';\n\t\t\t\t\n\t\t\t\tcase 'submit':\n\t\t\t\t\t$this->has_submit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault :\n\t\t\t\t\t$element = 'input';\n\t\t\t\t\t$end .= ' type=\"' . $val['type'] . '\" value=\"' . $val['value'] . '\"';\n\t\t\t\t\t$end .= $val['checked'] ? ' selected' : '';\n\t\t\t\t\t$end .= $this->field_close();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tendswitch;\n\t\t\t\n\t\t\t$id = !empty($val['id']) ? ' id=\"' . $val['id'] . '\"' : '';\n\t\t\t$class = count($val['class']) ? ' class=\"' . $this->_output_classes($val['class']) . '\"' : '';\n\t\t\t$attr = $val['autofocus'] ? ' autofocus' : '';\n\t\t\t$attr = $val['checked'] ? ' checked' : '';\n\t\t\t$attr = $val['required'] ? ' required' : '';\n\t\t\t\n\t\t\t// Build the label\n\t\t\tif (!empty($label_html)) :\n\t\t\t\t$field .= $label_html;\n\t\t\telseif ($val['add_label'] && $val['type'] != 'hidden' && $val['type'] != 'submit' && $val['type'] != 'title' && $val['type'] != 'html') :\n\t\t\t\t$val['label'] .= $val['required'] ? ' <strong>*</strong>' : '';\n\t\t\t\t$field .= '\n\t\t\t\t\t<label for=\"' . $val['id'] . '\">' . $val['label'] . '</label>';\n\t\t\tendif;\n\t\t\t\n\t\t\tif (!empty($element))\n\t\t\t\t$field .= '\n\t\t\t\t\t<' . $element . $id . ' name=\"' . $val['name'] . '\"' . $min_max_range . $attr . $end;\n\t\t\telse \n\t\t\t\t$field .= $end;\n\t\t\t\n\t\t\t// Parse and create wrap, if needed\n\t\t\tif ($val['type'] != 'hidden' && $val['type'] != 'html' && !empty($val['wrap_tag'])) :\n\t\t\t\n\t\t\t\t$wrap_before = '\n\t\t\t\t<' . $val['wrap_tag'];\n\t\t\t\t$wrap_before .= count($val['wrap_class']) > 0 ? $this->_output_classes($val['wrap_class']) : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_style']) ? ' style=\"' . $val['wrap_style'] . '\"' : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_id']) ? ' id=\"' . $val['wrap_id'] . '\"' : '';\n\t\t\t\t$wrap_before .= '>';\n\t\t\t\t\n\t\t\t\t$wrap_after = '\n\t\t\t\t</' . $val['wrap_tag'] . '>';\n\t\t\t\t\n\t\t\t\t$output .= $wrap_before . $field . $wrap_after;\n\t\t\telse : \n\t\t\t\t$output .= $field;\n\t\t\tendif;\n\t\t\t\n\t\tendforeach;\t\n\t\t\n\t\tif (! $this->has_submit) $output .= '\n\t\t\t\t<div class=\"form_field_wrap\">\n\t\t\t\t\t<input type=\"submit\" value=\"Submit\" name=\"submit\">\n\t\t\t\t</div>';\n\t\t\n\t\t$output .= '\n\t\t</form>';\n\t\t\n\t\tif ($echo) echo $output;\n\t\telse return $output;\n\t\t\n\t}", "public function htmlForm(htmlPrps $htmlprps,$fields){\n\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "function wddp_search_form()\n{\n \t$SearchStr = \"<form method='post' action='index.php'>\";\n \t$SearchStr .= \"<input type='text' name='searchuser'>\";\n \t$SearchStr .= \"<input type='submit' name='userSub' value='Vind member'>\";\n \t$SearchStr .= \"</form>\";\n\t\n\treturn $SearchStr;\n}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }", "function formGenerate($action){\n $form=\"<form class='form-group' name='formularz' action='$action' method='post'>\";\n $form.=\"<fieldset><legend>Podgląd rezerwacji</legend>\";\n $form.=\"<label class='col-form-label' for='data'>Data:</label>\";\n $form.=\"<input type='date' name='data' id='data' min='2010-01-01' max='2020-12-31' value='\".date('Y-m-d').\"' required class='form-control' onchange='show_reservations_by_color()' onclick='show_reservations_by_color()'>\";\n $form.=\"</fieldset></form>\";\n return $form;\n}", "private function generateLoginFormHTML() {\n\t\t$this->registredNewUsername();\n\t\treturn '\n\t\t<div class=\"firstPageContainer\">\n\t\t\t<div class=\"loginFormContainer\">\n\t\t\t\t<form method=\"post\">\n\t\t\t\t\t<h1>Sign in</h1>\n\t\t\t\t\t\t<p id=\"' . self::$messageId . '\">' . $this->message . '</p>\n\t\t\t\t\t\t<label for=\"' . self::$name . '\">Username</label>\n\t\t\t\t\t\t<input type=\"text\" id=\"' . self::$name . '\" name=\"' . self::$name . '\" value=\"'. self::$usernameInput .'\" />\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<label for=\"' . self::$password . '\">Password</label>\n\t\t\t\t\t\t<input type=\"password\" id=\"' . self::$password . '\" name=\"' . self::$password . '\" />\n\t\t\t\t\t\t\t<label for=\"' . self::$keep . '\">Keep me logged in: \n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"' . self::$keep . '\" name=\"' . self::$keep . '\" /> \n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<a href=\"?register\">Register a new user</a>\n\t\t\t\t\t\t<input type=\"submit\" name=\"' . self::$login . '\" value=\"Login\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<div class=\"firstPagePicture\"></div>\n\t\t</div>\t\t\n\t\t';\n\t}", "abstract protected function getForm();", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "abstract function setupform();", "function getForm($user, $type, $action){\r\n\r\n\t$id=$user.$type;\r\n\tif($type===\"signin\"){\r\n\t\t$html_output=\"<form class=\\\"form-vertical\\\" action=\\\"\".$action.\"\\\" id=\\\"\".$id.\"\\\" method=\\\"POST\\\">\r\n\t\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t\t <legend>Sign in for \".ucfirst($user).\"</legend>\r\n\t\t\t\t\t\t\t <div class=\\\"alert hidden\\\" id=\\\"\".$id.\"Alert\\\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Username -->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"text\\\" id=\\\"\".$id.\"Username\\\" name=\\\"\".$id.\"Username\\\" placeholder=\\\"username\\\" class=\\\"input-xlarge\\\" >\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Password-->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"password\\\" id=\\\"\".$id.\"Password\\\" name=\\\"\".$id.\"Password\\\" placeholder=\\\"password\\\" class=\\\"input-xlarge\\\">\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Button -->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<button class=\\\"btn btn-primary\\\">Login</button>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<input type='text' id=\\\"\".$id.\"Type\\\" value='student' name=\\\"\".$id.\"Type\\\" readonly style=\\\"display: none\\\" />\r\n\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</form> \";\r\n\r\n\t\treturn $html_output;\r\n\t}\r\n\r\nif($type=== \"signup\"){\r\n\t$html_output=\"\t<form class=\\\"form-vertical\\\" enctype=\\\"multipart/form-data\\\" method=\\\"post\\\" id=\\\"\".$id.\"\\\" action=\\\"\".$action.\"\\\">\r\n\t\t\t\t\t\t<fieldset>\r\n\t\t\t\t\t\t\t<legend>Sign up for \".ucfirst($user).\"</legend>\r\n\t\t\t\t\t\t\t<div class=\\\"alert hidden\\\" id=\\\"\".$id.\"Alert\\\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Username -->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"text\\\" id=\\\"\".$id.\"Username\\\" name=\\\"\".$id.\"Username\\\" placeholder=\\\"username\\\" class=\\\"input-xlarge\\\"\r\n\t\t\t\t\t\t\t\t\tdata-toggle=\\\"popover\\\" title=\\\"\\\" data-original-title=\\\"Your username has to be at least 6 characters long\\\" />\r\n\t\t\t\t\t\t\t\t\t<img class=\\\"validator_icon\\\" id=\\\"\".$id.\"UsernameValidator\\\"/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Password-->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"password\\\" id=\\\"\".$id.\"Password\\\" name=\\\"\".$id.\"Password\\\" placeholder=\\\"password\\\" class=\\\"input-xlarge\\\"\r\n\t\t\t\t\t\t\t\t\tdata-toggle=\\\"popover\\\" title=\\\"\\\" data-original-title=\\\"Your password has to be at least 6 characters long\\\" />\r\n\t\t\t\t\t\t\t\t\t<img class=\\\"validator_icon\\\" id=\\\"\".$id.\"PasswordValidator\\\"/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Password-->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"password\\\" id=\\\"\".$id.\"PasswordRepeat\\\" name=\\\"\".$id.\"PasswordRepeat\\\" placeholder=\\\"password\\\" class=\\\"input-xlarge\\\"\r\n\t\t\t\t\t\t\t\t\tdata-toggle=\\\"popover\\\" title=\\\"\\\" data-original-title=\\\"Passwords have to match\\\" />\r\n\t\t\t\t\t\t\t\t\t<img class=\\\"validator_icon\\\" id=\\\"\".$id.\"PasswordRepeatValidator\\\"/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- email -->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"text\\\" id=\\\"\".$id.\"Email\\\" name=\\\"\".$id.\"Email\\\" placeholder=\\\"email\\\" class=\\\"input-xlarge\\\"\r\n\t\t\t\t\t\t\t\t\t title=\\\"\\\" data-original-title=\\\"We will use this email to verify your account\\\"/>\r\n\t\t\t\t\t\t\t\t\t <img class=\\\"validator_icon\\\" id=\\\"\".$id.\"EmailValidator\\\"/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- image -->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<input type=\\\"file\\\" id=\\\"\".$id.\"profilePicture\\\" name=\\\"\".$id.\"profilePicture\\\" class=\\\"input-xlarge\\\"\r\n\t\t\t\t\t\t\t\t\t title=\\\"\\\" data-original-title=\\\"Only .jpg and .png files\\\" />\r\n\t\t\t\t\t\t\t\t\t <img class=\\\"validator_icon\\\" id=\\\"profilePictureValidator\\\"/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\\\"progress progress-striped active\\\">\r\n \t\t\t\t\t\t\t\t <div class=\\\"bar\\\" id=\\\"\".$id.\"bar\\\" style=\\\"width: 0%;\\\">0%</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<div class=\\\"control-group\\\">\r\n\t\t\t\t\t\t\t\t<!-- Button -->\r\n\t\t\t\t\t\t\t\t<div class=\\\"controls\\\">\r\n\t\t\t\t\t\t\t\t\t<button id=\\\"registerButton\\\" class=\\\"btn btn-primary\\\" >Sign up</button>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<input type='text' id=\\\"\".$id.\"Type\\\" name=\\\"\".$id.\"Type\\\" value='student' readonly style=\\\"display: none\\\" />\r\n\t\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t</form> \";\r\n\t\t\t\t\treturn $html_output;\r\n}\r\n\r\n\r\n}", "public function start()\n\t{\n\t\t$attrs = \"\";\n\t\tforeach($this->_attributes as $key => $val)\n\t\t\t$attrs .= \"$key=\\\"$val\\\" \";\n\n\t\t$attrs = trim($attrs);\n\t\techo \"<form $attrs>\\n\";\n\t}", "function echoCreate($spec, $extra_data=[]) {\n\techo('<form class=\"tr\" method=\"POST\">');\n\tforeach($extra_data as $key => $value) {\n\t\techo('<input name=\"' . htmlspecialchars($key) . '\" type=\"hidden\" value=\"' . htmlspecialchars($value) . '\"></input>');\n\t}\n\tforeach($spec as $col) {\n\t\techo('<div class=\"td\"><input name=\"' . htmlspecialchars($col) . '\"></input></div>');\n\t}\n\techo('<div class=\"td\"><input type=\"submit\" name=\"action\" value=\"create\"></input></div>');\n\techo('</form>');\n}", "function start_form($tabs = 0, $extra = '')\n{\n /**\n * Starting Form section in the HTML file.\n *\n * Args:\n * $tabs (int): number of tabs for indentation, default is 0\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n start_tag('form', Tab($tabs), true, $extra) ;\n}", "function initialize () {\n $this->set_openingtag ( \"<INPUT value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"input\");\n }", "public function getForm($args = '')\n {\n if (strlen($args) > 0) $args = ' ' . $args;\n if (!strlen($form = $this->_layout))\n $form = $this->_defaultLayout;\n\n // if this is a post back where the fields have been completed and need to be validated/populated\n if (!strcmp($this->getPostValue('webFormPostBack'), '1'))\n {\n // the fields have received input\n $this->validateFields();\n }\n\n for ($x=0; $x<count($this->_fields); $x++)\n {\n if (isset($this->_fields[$x]))\n {\n $field = $this->_fields[$x];\n if (strpos($form, $field['id']) !== false)\n {\n $form = str_replace(\n '[' . $field['id'] . ']',\n sprintf(\n \"<td valign=\\\"top\\\" align=\\\"right\\\" style=\\\"padding-right: 5px; font-size: 10pt; font-weight: normal;\\\">%s</td>\\n\"\n . \"<td valign=\\\"top\\\" align=\\\"left\\\" style=\\\"padding-right: 5px; height: 25px;\\\">%s\\n\"\n . \"<div id=\\\"%sCaption\\\" class=\\\"webFormCaption\\\"></div></td>\\n\",\n $this->getFieldCaption($field),\n ($this->_verifyForm ? $this->getFieldVerify($field) : $this->getFieldInput($field)),\n $field['id']\n ),\n $form\n );\n }\n }\n }\n $form = str_replace('[NL]', \"</tr>\\n<tr>\\n\", $form);\n $form = sprintf(\"<table%s>\\n\", $args) . $form . \"</table>\\n\";\n\n if (!$this->_printedPostBack)\n {\n $form = \"<input type=\\\"hidden\\\" name=\\\"webFormPostBack\\\" value=\\\"1\\\" />\\n\" . $form;\n $this->_printedPostBack = 1;\n }\n\n if (!$this->_printedHelpBox)\n {\n $form .= '<div class=\"webFormHelpBox\" id=\"webFormHelpBox\"> </div>';\n $form .= '<div class=\"webFormErrorBox\" id=\"webFormErrorBox\"> </div>';\n $this->_printedHelpBox = 1;\n }\n\n return $form;\n }", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "function printSurveyCreationForm() {\n\tglobal $tool_content, $langTitle, $langPollStart, \n\t\t$langPollEnd, $langType, $langSurveyMC, $langSurveyFillText, \n\t\t$langCreate, $langSurveyContinue, $start_cal_Survey, $end_cal_Survey;\n\t\n\t$CurrentDate = date(\"Y-m-d H:i:s\");\n\t$CurrentDate = htmlspecialchars($CurrentDate);\n\t$tool_content .= <<<cData\n\t<form action=\"addsurvey.php\" id=\"survey\" method=\"post\">\n\t<input type=\"hidden\" value=\"0\" name=\"MoreQuestions\">\n\t<table><thead></thead>\n\t\t<tr><td>$langTitle</td><td colspan=\"2\"><input type=\"text\" size=\"50\" name=\"SurveyName\"></td></tr>\n\t\t<tr><td>$langPollStart</td><td colspan=\"2\">\n\t\t\t$start_cal_Survey\n\t\t</td></tr>\n\t\t<tr><td>$langPollEnd</td><td colspan=\"2\">$end_cal_Survey</td></tr>\n\t\t<!--<tr>\n\t\t <td>$langType</td>\n\t\t <td><label>\n\t\t <input name=\"UseCase\" type=\"radio\" value=\"1\" />\n\t $langSurveyMC</label></td>\n\t\t <td><label>\n\t\t <input name=\"UseCase\" type=\"radio\" value=\"2\" />\n\t $langSurveyFillText</label></td>\n\t\t</tr>-->\n\t\t<input name=\"UseCase\" type=\"hidden\" value=\"1\" />\n\t\t<tr><td colspan=\"3\" align=\"right\">\n <input name=\"$langSurveyContinue\" type=\"submit\" value=\"$langSurveyContinue -&gt;\"></td></tr>\n\t</table>\n\t</form>\ncData;\n}", "function printForm() {\n $this->printDebugMessage('printForm', 'Begin', 1);\n $stypeStr = $this->paramDetailToStr('stype');\n $programStr = $this->paramDetailToStr('program');\n $databaseStr = $this->paramDetailToStr('database', TRUE);\n $scoresStr = $this->paramDetailToStr('scores');\n $alignmentsStr = $this->paramDetailToStr('alignments');\n $expStr = $this->paramDetailToStr('exp');\n \n print <<<EOF\n<form method=\"POST\">\n<p>E-mail: <input type=\"text\" name=\"email\" />&nbsp;\nJob title: <input type=\"text\" name=\"title\" /></p>\n\n<p>$stypeStr<br />\n<a href=\"?paramDetail=sequence\">Sequence</a>:<br />\n<textarea name=\"sequence\" rows=\"5\" cols=\"80\">\n</textarea></p>\n\n<p>$programStr $databaseStr</p>\n\n<p>$scoresStr $alignmentsStr $expStr</p>\n\n<p align=\"right\">\n<input type=\"submit\" value=\"Submit\" />\n<input type=\"reset\" value=\"Reset\" />\n</p>\n</form>\nEOF\n ;\n $this->printDebugMessage('printForm', 'End', 1);\n }", "public function get_input_template() {\n\t\t$options = $this->build_options();\n\n\t\treturn '<ul %s>' . $options . '</ul>';\n\t}", "public function printForm() {\n\t\t$html = '';\n\t\t$values = $this->value();\n\n\t\tforeach ($this->options as $value => $label) {\n\t\t\t$id = $this->name().'_'.$value;\n\t\t\t$html .= '<div><input type=\"checkbox\" id=\"'.$id.'\" name=\"'.$id.'\" value=\"'.$value.'\" '.((isset($this->selected[$id]) && $this->selected[$id])?' checked':'').'/><label for=\"'.$id.'\">'.$label.'</label></div>'.\"\\n\";\n\t\t}\n\n\t\tforeach ($this->others as $name => $label) {\n\t\t\t$value = $values[$name];\n\n\n\t\t\t$id = $this->name().'_'.$name;\n\t\t\t$label = '<label for=\"'.$id.'\">'.$label.'</label> <input onclick=\"document.getElementById(\\''.$id.'\\').checked=\\'checked\\';\" name=\"'.$id.'[]\" value=\"'.htmlentities($value).'\" />';\n\t\t\t$input = '<input type=\"checkbox\" id=\"'.$id.'\" '.(($value)?(' checked=\"checked\" '):('')).'name=\"'.$id.'[]\" value=\"'.htmlentities($value).'\" />';\n\t\t\t$html .= '<div class=\"checkbox\">'.($this->label_left?($label.$input):($input.$label)).'</div>';\n\t\t}\n\t\treturn $html;\n\t}", "public function valiteForm();", "static function inputCreate( $label, $type, $name, $value = '' ) {\n echo \"<tr>\";\n echo \"<td>\" . $label . \"</td><td><input type='\" . $type . \"' name='\" . $name . \"' value='\" . $value . \"'></td>\";\n echo \"</tr>\";\n }" ]
[ "0.71049947", "0.6999365", "0.6998591", "0.69977427", "0.69977427", "0.69870615", "0.69870615", "0.6882778", "0.6750034", "0.6738137", "0.67097974", "0.66954726", "0.66773045", "0.6668399", "0.6637821", "0.6614725", "0.6566063", "0.6559784", "0.6557526", "0.6513417", "0.65027237", "0.6496127", "0.6489027", "0.6467897", "0.64381784", "0.64276433", "0.6426244", "0.63851666", "0.6380089", "0.636996", "0.6364762", "0.6363843", "0.6343692", "0.6326873", "0.63256663", "0.6324099", "0.63080823", "0.6305263", "0.63003045", "0.6287725", "0.62837774", "0.6269761", "0.6268215", "0.62644935", "0.6258434", "0.62281525", "0.62273186", "0.6213523", "0.6211914", "0.6207674", "0.6199229", "0.6197158", "0.61950594", "0.6193881", "0.6190181", "0.618625", "0.6184176", "0.6178665", "0.6178418", "0.6176197", "0.6176039", "0.6166712", "0.6156506", "0.615336", "0.61494136", "0.6147976", "0.61462057", "0.61448056", "0.6131725", "0.612223", "0.6112234", "0.61117315", "0.61059517", "0.61014634", "0.60961676", "0.6094177", "0.6091974", "0.60860276", "0.6080388", "0.60635763", "0.6059923", "0.60569817", "0.6056665", "0.605484", "0.60540384", "0.6047572", "0.6045548", "0.6035757", "0.60324407", "0.6020812", "0.6016806", "0.6011704", "0.60066116", "0.6005851", "0.60057527", "0.600546", "0.59983194", "0.5996145", "0.598832", "0.59859455", "0.59856254" ]
0.0
-1
method of update of sample control which to update the samole info
public function sample_updateOp(){ $data=array(); $data['sample_name']=$_POST['sample_name']; $data['sample_origin_place']=$_POST['sample_origin_place']; $data['sample_weight']=$_POST['sample_weight']; $data['sample_freight']=$_POST['sample_freight']; $data['sample_limit_number']=$_POST['sample_limit_number']; $data['sample_start_time']=time(); $data['sample_start_time']=strtotime($_POST['sample_start_time']); $data['sample_end_time']=strtotime($_POST['sample_end_time']); $data['sample_state']=1; if($_FILES['sample_image']['name'][0]!=''){ $image=''; $legitType=array('image/jpeg','image/png','image/gif'); $resizeImage = new ResizeImage(); for($i=0;$i<6;$i++){ if($_FILES['sample_image']['error'][$i]!==0) break; if(!in_array($_FILES['sample_image']['type'][$i],$legitType)) showmessage('图片类型不正确'); $type=substr($_FILES['sample_image']['type'][$i],-3); if($type=='peg') $type='jpg'; $name=time().'_'.$i.'.'.$type; $uploadResult=move_uploaded_file($_FILES['sample_image']['tmp_name'][$i],ImgPath.$name); if($uploadResult){ $resizeImage->newImg(ImgPath.$name,60,60,0,"_60." , ImgPath); $resizeImage->newImg(ImgPath.$name,360,360,0,"_360." , ImgPath); $image.=$name.','; } //print_r($_FILES['sample_image']); } $image= rtrim($image,','); $data['sample_image']=$image; }else{ $data['sample_image']=$_POST['sample_image_hidden']; } $insertResult=self::$sampleModel->where("sample_id='".intval($_POST['sample_id'])."'")->update($data); if($insertResult){ //print_r($_FILES['sample_image']); showmessage('更新成功'); }else{ showmessage('更新失败'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\n\t\t\t}", "function update_sample($edit_sample,$sample_manual_id, $sample_name, $sample_unit, $sample_result, $client_id, $sample_type, $pay_status, $sample_image, $date_taken, $result_taken, $comment, $lab_scientist, $sample_description) {\r\n\t\tglobal $db;\r\n\t\t$query = \"UPDATE samples SET\r\n\t\t\tsample_manual_id='\".$sample_manual_id.\"',\r\n\t\t\tsample_name='\".$sample_name.\"',\r\n\t\t\tsample_unit='\".$sample_unit.\"',\r\n\t\t\tsample_result='\".$sample_result.\"',\r\n\t\t\tclient_id='\".$client_id.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tpay_status='\".$pay_status.\"',\r\n\t\t\tsample_image='\".$sample_image.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tdate_taken='\".$date_taken.\"',\r\n\t\t\tresult_taken='\".$result_taken.\"',\r\n\t\t\tcomment='\".$comment.\"',\r\n\t\t\tlab_scientist='\".$lab_scientist.\"',\r\n\t\t\tsample_description='\".$sample_description.\"'\r\n\t\t\tWHERE sample_id='\".$edit_sample.\"'\r\n\t\t\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t\r\n\t\treturn 'Sample was updated successfuly.';\t\r\n\t}", "private function changesku(){\t \r\n\t $this->chartValue(); //adding to output\r\n\t $this->idleStHealthChk(); //adding to output\r\n\t}", "public function update()\r\n {\r\n \r\n }", "public function edit(Sample $sample)\n {\n //\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function update()\n {\n }", "function callSample(): void\n{\n $modelName = '[NAME]';\n $modelDisplayName = '[DISPLAY_NAME]';\n $modelType = '[TYPE]';\n\n update_model_sample($modelName, $modelDisplayName, $modelType);\n}", "public function update()\r\n {\r\n //\r\n }", "public function update() {\r\n\r\n\t}", "protected function _update()\n\t{\n\t}", "public function update() {\r\n }", "public function update()\n\t{\n\n\t}", "public static function update(){\r\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function update() {\n parent::update();\n }", "public function update () {\n\n }", "public function update()\n {\n //\n }", "public function update()\n {\n //\n }", "public function update() {\n \n }", "public static function update(){\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "protected function update() {}", "public function update()\n {\n\n }", "public function update()\n {\n\n }", "function update_info()\n {\n }", "abstract protected function update ();", "public function ApplyChanges()\n\t\t{\n\t\t\tparent::ApplyChanges();\n\n\t\t\t$this->RegisterVariableBoolean(\"Power\", \"Power\", \"~Switch\",1);\n\t\t\t$this->EnableAction(\"Power\");\n\n\t\t\t$this->RegisterVariableInteger(\"Volume\",\"Volume\",\"~Intensity.100\",2);\n\t\t\tSetValue($this->GetIDForIdent(\"Volume\"), 50);\n\t\t\t$this->EnableAction(\"Volume\");\n\n\t\t\t$this->RegisterVariableString(\"Titel\", \"Titel\",\"\",3);\n\t\t\tIPS_SetIcon($this->GetIDForIdent(\"Titel\"), \"Melody\");\n\n\t\t\t$this->RegisterVariableString(\"TimeElapsed\",\"Dauer\",\"\",4);\n\t\t\tIPS_SetIcon($this->GetIDForIdent(\"TimeElapsed\"), \"Clock\");\n\n\t\t\t$this->RegisterProfileIntegerEx(\"Mpd.Status\", \"Information\", \"\", \"\", Array( Array(0, \" << \", \"\", -1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArray(1, \" Stop \", \"\", -1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArray(2, \" Pause \", \"\", -1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArray(3, \" Play \", \"\", -1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArray(4, \" >> \", \"\", -1) ));\n\n\t\t\t$this->RegisterVariableInteger(\"Status\",\"Status\",\"Mpd.Status\",6);\n\t\t\tSetValue($this->GetIDForIdent(\"Status\"), 1);\n\t\t\t$this->EnableAction(\"Status\");\n\n\t\t\t//Connect to available splitter or create a new one\n\t\t\t$this->ForceParent(\"{3CFF0FD9-E306-41DB-9B5A-9D06D38576C3}\");\n\n\t\t\t$associations = [];\n\t\t\t$profileName = 'MPD.Station';\n\t\t\tforeach (json_decode($this->ReadPropertyString('RadioStations'), true) as $RadioStation) {\n\t\t\t\t$associations[] = [$RadioStation['position'], $RadioStation['station'], '', -1];\n\t\t\t}\n\t\t\t$this->RegisterProfileIntegerEx($profileName, \"Database\", \"\", \"\", $associations);\n\t\t\t//$this->RegisterProfileAssociation($profileName, 'Music', '', '', 0, 0, 0, 0, VARIABLETYPE_INTEGER, $associations);\n\t\t\t$this->RegisterVariableInteger(\"Senderliste\", \"Sender\", $profileName, 5);\n\t\t\t$this->EnableAction(\"Senderliste\");\n\n\t\t\tif($this->ReadPropertyBoolean('HideVolume')) {\n\t\t\t\tIPS_SetHidden($this->GetIDForIdent(\"Volume\"), TRUE);\n\t\t\t} else {\n\t\t\t\tIPS_SetHidden($this->GetIDForIdent(\"Volume\"), FALSE);\n\t\t\t}\n\n\t\t\tif($this->ReadPropertyBoolean('HideTitle')) {\n\t\t\t\tIPS_SetHidden($this->GetIDForIdent(\"Titel\"), TRUE);\n\t\t\t} else {\n\t\t\t\tIPS_SetHidden($this->GetIDForIdent(\"Titel\"), FALSE);\n\t\t\t}\n\n\t\t\tif($this->ReadPropertyBoolean('HideTimeElapsed')) {\n\t\t\t\tIPS_SetHidden($this->GetIDForIdent(\"TimeElapsed\"), TRUE);\n\t\t\t} else {\n\t\t\t\tIPS_SetHidden($this->GetIDForIdent(\"TimeElapsed\"), FALSE);\n\t\t\t}\n\n\n\t\t}", "public function update();", "public function update();", "public function update();", "public function update();", "function update_sample_type($edit_sample_type, $sample_type_manual_id, $sample_type_name, $sample_type_description, $status) {\r\n\t\tglobal $db;\r\n\t\t$query = \"UPDATE sample_types SET\r\n\t\t\tsample_type_manual_id='\".$sample_type_manual_id.\"',\r\n\t\t\tsample_type_name='\".$sample_type_name.\"',\r\n\t\t\tsample_type_description='\".$sample_type_description.\"',\r\n\t\t\tstatus='\".$status.\"'\r\n\t\t\tWHERE sample_type_id='\".$edit_sample_type.\"'\r\n\t\t\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t\r\n\t\treturn 'Sample was updated successfuly.';\t\r\n\t}", "public function updating()\n {\n # code...\n }", "function doEditSensSpec() {\n\t\t$data =& $this->params['form'];\n\t\t$biomarker_id = $data['biomarker_id'];\n\t\t$organ_data_id = $data['organ_data_id'];\n\t\t$sensitivity_id = $data['sensitivity_id'];\n\t\t$next_page = $data['next_page'];\n\t\t\n\t\t// Try to load the sens/spec data point\n\t\t$sensitivity = $this->Sensitivity->find('first',array(\n\t\t\t'conditions' => array('Sensitivity.id' => $sensitivity_id)\n\t\t\t)\n\t\t);\n\t\t$this->Sensitivity->id = $sensitivity_id;\n\t\t\n\t\t// Save the changes\n\t\t$this->Sensitivity->saveField('sensitivity',$data['sensitivity']);\n\t\t$this->Sensitivity->saveField('specificity',$data['specificity']);\n\t\t$this->Sensitivity->saveField('prevalence',$data['prevalence']);\n\t\t$this->Sensitivity->saveField('specificAssayType',$data['specificAssayType']);\n\t\t$this->Sensitivity->saveField('notes',$data['notes']);\n\t\t\n\t\t// Return the user to the specified next page\n\t\t$this->redirect($next_page);\n\t}", "public function update(): void\n {\n }", "public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function update(){\n\n }", "public function update(){\n\n }", "function updateControl()\r\n {\r\n if (($this->ControlState & csDesigning)!=csDesigning)\r\n {\r\n //Ensure there is a valid datasource\r\n $this->setDataSource($this->_datasource);\r\n\r\n if (is_object($this->_datasource))\r\n {\r\n $ds=$this->_datasource->DataSet;\r\n\r\n if ($ds->Active)\r\n {\r\n $ds->first();\r\n $fields=$ds->Fields;\r\n?>\r\n var <?php echo $this->Name; ?>_tableModel=<?php echo $this->owner->Name.\".\".$this->Name; ?>_tableModel;\r\n <?php echo $this->Name; ?>_tableModel.setColumns([\r\n<?php\r\n if (count($this->_columns)>=1)\r\n {\r\n reset($this->_columns);\r\n $i=0;\r\n while(list($key, $val)=each($this->_columns))\r\n {\r\n $fname=$val['Fieldname'];\r\n if ($fname!=\"\")\r\n {\r\n $props=$this->_datasource->DataSet->readFieldProperties($fname);\r\n }\r\n $dlabel=$val['Caption'];\r\n\r\n if ($props)\r\n {\r\n if (array_key_exists('displaylabel',$props))\r\n {\r\n $dlabel=$props['displaylabel'][0];\r\n }\r\n }\r\n\r\n if ($i>0) echo \",\";\r\n echo '\"'.$dlabel.'\"';\r\n $i++;\r\n\r\n }\r\n }\r\n else if (is_array($fields))\r\n {\r\n reset($fields);\r\n $i=0;\r\n while(list($fname, $value)=each($fields))\r\n {\r\n $props=$this->_datasource->DataSet->readFieldProperties($fname);\r\n $dlabel=$fname;\r\n\r\n if ($props)\r\n {\r\n if (array_key_exists('displaylabel',$props))\r\n {\r\n $dlabel=$props['displaylabel'][0];\r\n }\r\n }\r\n\r\n if ($i>0) echo \",\";\r\n echo '\"'.$dlabel.'\"';\r\n $i++;\r\n }\r\n }\r\n?>\r\n ]);\r\n\r\n\r\n <?php echo $this->Name; ?>_tableModel.ColumnNames=new Array(\r\n<?php\r\n $cnames=$ds->Fields;\r\n if (count($this->_columns))\r\n {\r\n $cnames=array();\r\n reset($this->_columns);\r\n while(list($key, $val)=each($this->_columns))\r\n {\r\n $cnames[$val['Fieldname']]='1';\r\n }\r\n }\r\n\r\n if (is_array($cnames))\r\n {\r\n reset($cnames);\r\n $i=0;\r\n while(list($fname, $value)=each($cnames))\r\n {\r\n if ($i>0) echo \",\";\r\n echo '\"'.$fname.'\"';\r\n $i++;\r\n }\r\n }\r\n?>\r\n);\r\n\r\n\r\n\r\n var rowData = [];\r\n var oData = [];\r\n<?php\r\n $colvalues=array();\r\n\r\n if (count($this->_columns)>=1)\r\n {\r\n reset($this->_columns);\r\n while(list($key, $val)=each($this->_columns))\r\n {\r\n $colvalues[$val['Fieldname']]=1;\r\n }\r\n\r\n }\r\n\r\n $ds->first();\r\n while (!$ds->EOF)\r\n {\r\n $rvalues=$ds->Fields;\r\n\r\n if (count($colvalues)>=1)\r\n {\r\n $avalues=array();\r\n reset($colvalues);\r\n while(list($key, $val)=each($colvalues))\r\n {\r\n $avalues[$key]=$rvalues[$key];\r\n }\r\n $rvalues=$avalues;\r\n }\r\n?>\r\n rowData.push([\r\n <?php\r\n reset($rvalues);\r\n $i=0;\r\n while (list($k,$v)=each($rvalues))\r\n {\r\n\r\n $v=str_replace(\"\\n\\r\",'\\n',$v);\r\n $v=str_replace(\"\\n\",'\\n',$v);\r\n $v=str_replace(\"\\r\",'',$v);\r\n $v=str_replace('\"','\\\"',$v);\r\n $v=str_replace(\"\\\\\",'\\\\',$v);\r\n $v=str_replace('<','\\<',$v);\r\n $v=str_replace('>','\\>',$v);\r\n if ($i>0) echo \",\";\r\n\r\n $numeric=false;\r\n if (count($this->_columns)>=1)\r\n {\r\n $sorttype=$this->_columns[$i]['SortType'];\r\n if ($sorttype=='stNumeric')\r\n {\r\n $numeric=true;\r\n }\r\n }\r\n if (!$numeric) echo '\"'.$v.'\"';\r\n else echo $v;\r\n\r\n $i++;\r\n\r\n }\r\n ?>\r\n ]);\r\n oData.push([\r\n <?php\r\n reset($rvalues);\r\n $i=0;\r\n while (list($k,$v)=each($rvalues))\r\n {\r\n if (count($colvalues)>=1)\r\n {\r\n if (!array_key_exists($k,$colvalues)) continue;\r\n }\r\n\r\n $v=str_replace(\"\\n\\r\",'\\n',$v);\r\n $v=str_replace(\"\\n\",'\\n',$v);\r\n $v=str_replace(\"\\r\",'',$v);\r\n $v=str_replace('\"','\\\"',$v);\r\n $v=str_replace(\"\\\\\",'\\\\',$v);\r\n $v=str_replace('<','\\<',$v);\r\n $v=str_replace('>','\\>',$v);\r\n// $v=htmlentities($v);\r\n if ($i>0) echo \",\";\r\n echo '\"'.$v.'\"';\r\n $i++;\r\n\r\n }\r\n ?>\r\n ]);\r\n <?php\r\n $ds->next();\r\n }\r\n $ds->first();\r\n\r\n?>\r\n <?php echo $this->Name; ?>_tableModel.originalData=oData;\r\n <?php echo $this->Name; ?>_tableModel.setData(rowData);\r\n<?php\r\n $this->_latestheader=$fields;\r\n\r\n if (count($this->_columns)>=1)\r\n {\r\n reset($this->_columns);\r\n $i=0;\r\n while(list($key, $value)=each($this->_columns))\r\n {\r\n $editable='true';\r\n if ($value['ReadOnly']=='true') $editable='false';\r\n\r\n if ($this->_readonly) $editable='false';\r\n?>\r\n <?php echo $this->Name; ?>_tableModel.setColumnEditable(<?php echo $i; ?>, <?php echo $editable; ?>);\r\n<?php\r\n $i++;\r\n }\r\n\r\n }\r\n else if (is_array($fields))\r\n {\r\n reset($fields);\r\n $i=0;\r\n while(list($fname, $value)=each($fields))\r\n {\r\n $editable='true';\r\n if ($this->_readonly) $editable='false';\r\n?>\r\n <?php echo $this->Name; ?>_tableModel.setColumnEditable(<?php echo $i; ?>, <?php echo $editable; ?>);\r\n<?php\r\n $i++;\r\n }\r\n\r\n\r\n }\r\n }\r\n }\r\n }\r\n }", "public function update()\n {\n # code...\n }", "abstract public function update();", "abstract public function update();", "function update_template()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::update($this->id, 'sssis', $parameter_array);\n }", "function startUpdate()\r\n {\r\n $this->_updatecounter++;\r\n }", "private function updateTutorialStates(){\n $this->tutorialModel->updateRaisingFundTutorials();\n $this->tutorialModel->updatePrepareTutorials();\n }", "public function update(Request $request, Sample $sample)\n {\n //\n }", "public function updateMultiple_data()\n {\n \n }", "public function update(): void\n {\n // Update quality\n $this->item->quality = self::QUALITY_MAX;\n }", "public abstract function update();", "abstract public function updateData();", "public function updateAnalysis() {\n return;\n }", "public function update(UpdateSampleRequests $request)\n { \n $sample = $this->sample\n ->whereid($request->get('id'))->first();\n \n $sample\n ->fill($request->input())\n ->save();\n return redirect(route('samples'));\n }", "abstract function update();", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function Do_update_Example1(){\n\n\t}", "function after_update() {}", "public function updateAction()\n {\n// $client = $init->getClient();\n// $init->updateFile($client);\n }", "private function updateOperation() {\n sleep(1);\n }", "public function update()\n {\n try {\n\n $score = $this->getApp()->request()->post(\"score\");\n $description = $this->getApp()->request()->post(\"description\");\n\n $response_data = ['wasaa'=>[$score\n ,$description]];\n\n $this->getApp()->render(\n 200,\n ['data' => $response_data]\n );\n } catch (\\Exception $e) {\n\n $this->getApp()->render(\n 200,\n ['error' => $e->getMessage()]\n );\n }\n }", "function study() {\n $this->studied = true;\n $this->_readframe();\n }", "public function addSamples(\\iface\\Sample $value){\n return $this->_add(1, $value);\n }", "protected function afterUpdating()\n {\n }", "public function update( $new_instance, $old_instance ) {\n \t// processes widget options to be saved\n }", "function callSample(): void\n{\n $formattedName = CatalogServiceClient::catalogItemPathName(\n '[PROJECT]',\n '[LOCATION]',\n '[CATALOG]',\n '[CATALOG_ITEM_PATH]'\n );\n $catalogItemId = '[ID]';\n $catalogItemCategoryHierarchiesCategoriesElement = '[CATEGORIES]';\n $catalogItemTitle = '[TITLE]';\n\n update_catalog_item_sample(\n $formattedName,\n $catalogItemId,\n $catalogItemCategoryHierarchiesCategoriesElement,\n $catalogItemTitle\n );\n}", "function update () {\n\t\t$stm = DB::$pdo->prepare(\"update `generated_object` \n\t\t\t\t\t\t\t\t set {$generator_update_values} \n\t\t\t\t\t\t\t\t where `id`=:id\");\n\t\t// generator bind hook\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function update(){\r\n $query = DB::connection()->prepare('\r\n UPDATE Wine\r\n SET name=:name, \r\n region=:region, \r\n winetext=:winetext,\r\n type=:type\r\n WHERE id=:id');\r\n $query->execute(array(\r\n 'id' => $this->id,\r\n 'name' => $this->name, \r\n 'region' => $this->region, \r\n 'winetext' => $this->winetext, \r\n 'type' => $this->type));\r\n }", "function updateTest()\n {\n $this->cD->updateElement(new Product(1, \"Trang\"));\n }", "public function updateView()\n {\n \n }", "public function show(Sample $sample)\n {\n //\n }", "public function testUpdateServiceData()\n {\n\n }", "public function after_update() {}", "function update() {\n\t\t$sql = \"UPDATE \".$this->hr_db.\".hr_amphur\n\t\t\t\tSET\tamph_name=?, amph_name_en=?, amph_pv_id=?\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_id));\n\t}", "public function testUpdateMember()\n {\n }", "public function setSampleType($type);", "public function update(Request $request, Sample $sample)\n {\n $this->validate($request, [\n 'title1' => 'required',\n 'title2' => 'required',\n 'description' => 'required',\n 'is_active' => 'required'\n ]);\n\n $sample = Sample::find($sample->id);\n $sample->title1 = $request->title1;\n $sample->title2 = $request->title2;\n $sample->description = $request->description;\n $sample->date = $request->date;\n $sample->updated_by = Auth::user()->name;\n if($request->is_active){\n $sample->is_active = $request->is_active;\n }else{\n $sample->is_active = '0';\n }\n if($sample->save()==true){\n Toastr::success('Data updated successfully', 'GoodJob!', [\"positionClass\" => \"toast-top-right\"]);\n }else{\n Toastr::error('Data not updated', 'Opps!', [\"positionClass\" => \"toast-top-right\"]);\n }\n return redirect()->route('samples.index');\n }", "public function _setSampleId($sampleId) {\n\t\t$this->_sampleId = $sampleId;\n\t}", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "function ControlOnInit() {\n }", "public function initializeUpdateAction() {\n\t\t$this->setTypeConverterConfigurationForImageUpload('example');\n\t}", "public function update() {\n\t\treturn;\n\t}", "public function testUpdateChallenge()\n {\n }", "function bookking_update_instance($data, $mform) {\n global $DB;\n\n $data->timemodified = time();\n $data->id = $data->instance;\n\n $data->scale = $data->grade;\n\n $DB->update_record('bookking', $data);\n\n $context = context_module::instance($data->coursemodule);\n $mform->save_mod_data($data, $context);\n\n // Update grade item and grades.\n bookking_update_grades($data);\n\n return true;\n}", "public function controls()\n {\n }" ]
[ "0.620268", "0.60568756", "0.6033488", "0.6003386", "0.5857554", "0.58328784", "0.58328784", "0.5826213", "0.581237", "0.5802734", "0.5801004", "0.5790808", "0.5790354", "0.5766793", "0.5708282", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.56946236", "0.5694032", "0.5694032", "0.5691194", "0.56823707", "0.5666698", "0.5666698", "0.5651873", "0.56260014", "0.56213987", "0.56213987", "0.5594787", "0.5589114", "0.5589114", "0.5583632", "0.5542784", "0.54876524", "0.545259", "0.545259", "0.545259", "0.545259", "0.5445039", "0.5400957", "0.5387114", "0.535897", "0.53187436", "0.53106725", "0.53106725", "0.52975625", "0.5283956", "0.52782315", "0.52782315", "0.52754956", "0.5266796", "0.5245854", "0.5244658", "0.5241601", "0.5231714", "0.52296996", "0.5229165", "0.52211845", "0.521557", "0.52074313", "0.5203184", "0.5203184", "0.52010196", "0.5165816", "0.5162616", "0.51533455", "0.51529884", "0.5128947", "0.5124075", "0.5112219", "0.5110212", "0.5096106", "0.50953716", "0.5087854", "0.5082663", "0.50821847", "0.5079306", "0.5075588", "0.5036985", "0.50218666", "0.50147337", "0.49941164", "0.4976853", "0.49753493", "0.4971638", "0.4971638", "0.49671495", "0.4961572", "0.49398556", "0.49345762", "0.49315706", "0.49200845" ]
0.0
-1
method get goods info by goods_id
public function get_info_by_goods_idOp(){ $goods_id=isset($_POST['goods_id'])?$_POST['goods_id']:''; $array=array(); if(!$goods_id||!is_numeric($goods_id)){ $array['code']=404; $array['content']='商品id不合法'.$goods_id; echo json_encode($array); die(); } $goodsModel=Model("goods"); $goodsInfo=$goodsModel->field("goods_id,goods_commonid,goods_name")->where("goods_id='$goods_id'")->find(); if(!$goodsInfo){ $array['code']=404; $array['content']='查找不到数据,八成产品id不对'; echo json_encode($array); die(); } $data=array(); $data['goods_name']=$goodsInfo['goods_name']; //find the images of goods $goodsImagesModel=Model("goods_images"); $images=$goodsImagesModel->field("goods_image")->where("goods_commonid='".$goodsInfo['goods_commonid']."'")->select(); //print_r($images); $imagesString=''; foreach($images as $v){ $imagesString.=$v['goods_image'].','; } $imagesString=substr($imagesString,0,-1); $data['goods_image']=$imagesString; $array['content']=$data; $array['code']=200; echo json_encode($array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hook2promotion_get($goods_id) {\n\t\t$tag_id = $goods_id;\n\t\t$tag_cat = '商品';\n\t\t$w['tag_id'] = $tag_id;\n\t\t$w['tag_cat'] = $tag_cat;\n\t\treturn D2(\"PromotionIndex\")->where($w)->find();\n\t}", "public function getGoods($id)\n {\n// echo $this->getLastSql();\n $row = $this->field('g.*,b.name as bname,gi.content')->alias('g')->where(['is_on_sale'=>1,'g.status'=>1,'g.id'=>$id])->join('__BRAND__ as b ON g.brand_id=b.id')->join('__GOODS_INTRO__ as gi ON gi.goods_id=g.id')->find();\n $row['galleries'] = M('GoodsGallery')->where(['goods_id'=>$id])->getField('path',true);\n\n return $row;\n }", "public function get_row_by_id($goods_id){\n $ar_filter = array('id' => $goods_id);\n return $this->get_row_by($ar_filter);\n }", "public function getGoodsId()\n {\n return $this->goods_id;\n }", "public function getGoodsId()\n {\n return $this->goods_id;\n }", "public function getGoodsId()\n {\n return $this->goods_id;\n }", "public function show($id)\n {\n $goods = Goods::where('gid',$id)->first();\n $pic = $goods->goodspic;\n $val = $goods->goodsval;\n\n return view('admin.goods.show',['goods'=>$goods,'pic'=>$pic,'val'=>$val]);\n }", "public function getGoods()\n {\n $goods = Good::with('catalog')\n ->orderBy('price')\n ->get();\n return response()->json([\n 'goods' => $goods,\n 'success' => true\n ], $this->successStatus);\n }", "public function find_car_info($pus_id=Null)\n\t{\n\t\tif($res = $this->Purchase_model->purchase_info_by_id($pus_id)){\n\t\t\t\n\t\t\techo json_encode($res);\n\t\t}else{\n\t\t\techo 0;\n\t\t}\n\t}", "public function show($id)\n {\n // 后台商品详情\n // echo $id;\n $show = DB::table('pingjia')->where('id','=',$id)->get();\n return view('Admin.Goods.show',['show'=>$show]);\n }", "public function show($id)\n {\n //商品详情\n $res = DB::table('shop_goods')\n ->join('shop_type', 'shop_goods.tid', '=', 'shop_type.tid')\n ->select('shop_goods.*','shop_goods.gid','shop_goods.gname','shop_type.tname','shop_goods.price','shop_goods.stock','shop_goods.salecnt','shop_goods.gpic','shop_goods.gdesc','shop_goods.status','shop_goods.created_at')->where('gid',$id)->get();\n return view('admin.goods.show',['title'=>'商品详情','res'=>$res,'top'=>'商品详情']);\n }", "public function getGoodsInfo($goodsIds, $select);", "public function getFoodbyID($sku){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // YOUR CODE GOES HERE\r\n\r\n return $result;\r\n }", "public function getProductInfoDetail($id){\r\n \t$db=$this->getAdapter();\r\n \t$sql = \"SELECT p.pro_id,p.cate_id,p.stock_type,p.item_name,p.item_code,p.price_per_qty,p.brand_id,\r\n \tp.photo,p.is_avaliable,p.remark,c.Name,branch_namekh As branch_name\r\n \tFROM ln_ins_product AS p\r\n \tINNER JOIN ln_ins_category AS c ON c.CategoryID=p.cate_id\r\n \tINNER JOIN tb_branch AS b ON b.branch_id=p.brand_id\r\n \tWHERE p.pro_id=\".$id.\" LIMIT 1\";\r\n \t$rows = $db->fetchRow($sql);\r\n \treturn ($rows);\r\n }", "public static function getLocalGoods($id) {\n\t\tif (!intval($id)) return false;\n\t\treturn self::_getDao()->get(intval($id));\n\t}", "public function ProductDetails($id)\n {\n // Requête de sélection de l'enregistrement souhaité \n $requete = $this->db->query(\"SELECT * FROM produits WHERE pro_id= ?\", $id);\n $produit = $requete->result();\n\n return $produit;\n }", "public function find_purchase_car_info($pus_id=Null)\n\t{\n\t\tif($res= $this->Purchase_model->purchase_car_full_deatils($pus_id)){\n\t\t\techo json_encode($res);\n\t\t}else{\n\t\t\techo 0;\n\t\t}\n\t}", "function goods_viewImgProduct($gd_idd){\n $goods = new goodsModel();\n $id = base64_decode($gd_idd);\n $goods->id = $id;\n return $goods->goods_viewImgProduct();\n }", "public function mallGoods()\n {\n// $flist = D('Goods_category')->field('fid')->where(array('id' => $cateId, 'is_hot' => 1))->find();\n// $fid = isset($flist['fid']) ? intval($flist['fid']) : 0;\n \n// $sql = \"SELECT `g`.`goods_id`, `g`.`name`, `g`.`image`, `g`.`price`, `g`.`sell_count` ,`sh`.`score_mean` FROM \" . C('DB_PREFIX') . \"merchant_store AS s INNER JOIN \" . C('DB_PREFIX') . \"merchant_store_shop AS sh ON `s`.`status`=1 AND `s`.`have_shop`=1 AND `sh`.`store_theme`=1 AND `s`.`store_id`=`sh`.`store_id` INNER JOIN \" . C('DB_PREFIX') . \"shop_goods AS g ON `sh`.`store_id`=`g`.`store_id` AND `s`.`status`=1 WHERE g.cat_id={$cateId} LIMIT 10\";\n// $return = D('Shop_goods')->get_list_by_option(array('cat_id' => $cateId), 1);\n// exit(json_encode(array('error' => 0, 'data' => $return['goods_list'], 'fid' => $fid)));\n \n \n \n $where = array();\n $where['cat_fid'] = isset($_POST['catefid']) ? intval($_POST['catefid']) : 0;\n $where['cat_id'] = isset($_POST['cateid']) ? intval($_POST['cateid']) : 0;\n $fid = 0;\n if ($where['cat_fid']) {\n $fid = $where['cat_fid'];\n } elseif ($where['cat_id']) {\n $flist = D('Goods_category')->field('fid')->where(array('id' => $where['cat_id']))->find();\n $fid = isset($flist['fid']) ? intval($flist['fid']) : 0;\n }\n \n $where['store_id'] = isset($_POST['store_id']) ? intval($_POST['store_id']) : 0;\n $where['page'] = isset($_POST['page']) ? intval($_POST['page']) : 1;\n \n $pids = isset($_POST['pids']) ? trim(htmlspecialchars($_POST['pids'])) : '';\n \n \n $where['key'] = isset($_POST['key']) ? trim(htmlspecialchars($_POST['key'])) : '';\n \n $search_type = isset($_POST['search_type']) ? intval($_POST['search_type']) : 0;\n $sort = isset($_POST['sort']) ? intval($_POST['sort']) : 1;//排序字段(1:goods_id, 2:sell_count, 3:price)\n if (!in_array($sort, array(1, 2, 3))) $sort = 1;\n $sort_type = isset($_POST['sort_type']) ? intval($_POST['sort_type']) : 1;//排序方式(1:DESC, 2:ASC)\n if ($sort_type != 1 && $sort_type != 2) $sort_type = 1;\n \n $where['pids'] = null;\n if ($pids) $where['pids'][] = $pids;\n if ($search_type == 0) {\n $return = D('Shop_goods')->get_list_by_option($where, $sort, $sort_type);\n } else {\n $return = D('Merchant_store_shop')->get_store_by_search($where);\n }\n $return['fid'] = $fid;\n exit(json_encode($return));\n \n \n }", "public function goods()\n {\n return $this->belongsTo(Goods::class);\n }", "public function show($id)\n {\n //\n $goods_info = $this->goods->find($id);\n $supplier_info = $this->supplier->get();\n $admin_log_info = $this->admin_log->where('goods_id',$id)->get();\n return view('goods.show',compact('goods_info','supplier_info','admin_log_info'));\n }", "public function show($id)\n {\n $detail = Goods::with('spec')->find($id);\n return view('admin/goods/show',['title'=>'商品详情页','detail'=>$detail]);\n }", "public function show($id)\n {\n $user = DB::table('users')->where('username','=',session('home'))->first();\n $uid = $user->id; \n $data = DB::table('orders')->where('id','=',$id)->get();\n $info = $this->getgoods($data);\n // dd($info);\n return view('Home.my.order',['info'=>$info[0],'uid'=>$uid]);\n }", "public function getgoods($order){\n // dd($order);\n $o = [];\n foreach($order as $key=>$value){\n //1、订单id\n $o[$key]['id'] = $value->id;\n //2、订单号\n $o[$key]['order_num'] = $value->order_num;\n //3、总金额\n $o[$key]['total'] = $value->total;\n //4、订单状态\n $o[$key]['status'] = $value->status;\n //5、收货信息(obj)\n $o[$key]['address'] = DB::table('address')->where('id','=',$value->aid)->first();\n //6、商品信息\n //根据订单id获取订单详情信息\n $info = DB::table('order_info')->where('oid','=',$value->id)->get();\n $g = [];\n //遍历详情信息,并根据gid查询goods表信息\n foreach($info as $k=>$v){\n $goods = DB::table('goods')->where('id','=',$v->gid)->first();\n $g[$k]['gname'] = $goods->name;\n $g[$k]['gprice'] = $goods->price;\n $g[$k]['gpic'] = $goods->pic;\n $g[$k]['num'] = $v->num;\n }\n $o[$key]['goods'] = $g; \n }\n return $o;\n }", "function getProductbyId($id){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn->prepare(\"\tSELECT * \n\t\t\t\t\t\t\t\t\tFROM `product` \n\t\t\t\t\t\t\t\t\tWHERE `stock` > 0 AND `id` = ?\");\n\t\t$sth \t->execute(array($id));\n\n\t\treturn \t$sth;\n\t}", "function item_get()\n {\n $key = $this->get('id');\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }", "protected function detail($id)\n {\n $show = new Show(Goods::findOrFail($id));\n\n\n\n return $show;\n }", "public function get_info($id)\n\t{\n\n\t\t$sel=$this->db->prepare(\"SELECT * from shop where id='$id'\");\n\n $sel->execute();\n\n return ($sel->fetchAll(PDO::FETCH_ASSOC));\n\t\t\n\n\n\n }", "public function getProductDetails($params){\n\t\ttry {\t\n\t\t\t\n\t\t\t//$query = \"select * from store_products where product_id=\".$params['id'];\n\t\t\t\n\t\t\t$query = \"SELECT\n\t\t\tsp.product_id, sp.attributes_group_id, sp.merchant_id, sp.brand_id, sp.product_sku, sp.product_title,\n\t\t\tsp.product_small_description, sp.product_meta_title, sp.product_meta_description,\n\t\t\tspd.description_id, spd.product_description\n\t\t\tFROM store_products sp\n\t\t\tLEFT JOIN store_products_description spd ON (sp.product_id=spd.product_id) where sp.product_id=\".$params['id'];\n\t\t\t\n\t\t\t//exit;\t\t\t\n\t\t\t$stmt = $this->db->query($query);\t\t\t\n\t\t\treturn $stmt->fetch();\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "public function show($id)\n {\n $uid = Session::get('user.id');\n $goods = Goods::with('gs')->where('id',$id)->first();\n $res = Cart::where('u_id',$uid)->where('g_id',$goods['id'])->first();\n if ($res) {\n $cnt = $res['cnt'];\n $cnt ++;\n $data = Cart::where('u_id',$uid)->where('g_id',$goods['id'])->update(['cnt'=>$cnt]);\n return redirect('/home/cart');\n }\n $str = [];\n $str['u_id'] = $uid;\n $str['g_id'] = $goods['id'];\n $str['name'] = $goods['gname'];\n $str['color'] = $goods['color'];\n $str['price'] = $goods['price'];\n $str['gimg'] = $goods->gs[0]->gpic;\n $str['cnt'] = 1;\n\n $cart = Cart::create($str);\n // dd($cart);\n return redirect('/home/cart');\n }", "public function show($id)\n {\n $goods = Goods::find($id);\n $currency = Currency::find($goods->currency_id);\n $program = Program::find($goods->program_id);\n $manufacturer = Manufacturer::find($goods->manufacturer_id);\n $merchant = Merchant::find($goods->merchant_id);\n return view('goods-show', compact('goods', 'currency', 'program', 'manufacturer', 'merchant'));\n }", "function getProductDetailsById($id) {\r\n global $tableProducts;\r\n\r\n $dbc = connection();\r\n $dbc->quote($tableProducts);\r\n $req = \"SELECT p.id AS idProduit, p.title, p.short_desc, p.long_desc, p.is_frontpage,\"\r\n . \" p.availability_date, p.expiration_date, p.view_count, p.id_brand, b.id AS idBrand,\"\r\n . \" b.name AS brandName, (NOW() < availability_date OR NOW() > expiration_date) AS isExpired\"\r\n . \" FROM $tableProducts AS p\"\r\n . \" INNER JOIN brands as b ON p.id_brand = b.id\"\r\n . \" WHERE p.id = $id\";\r\n\r\n\r\n $requPrep = $dbc->prepare($req); // on prépare notre requête\r\n $requPrep->execute();\r\n $data = $requPrep->fetch(PDO::FETCH_OBJ);\r\n $requPrep->closeCursor();\r\n\r\n return $data;\r\n}", "function get_product_info($product_id){\r\n\tglobal $dbc;\r\n\t\r\n\t$query = 'SELECT * '.\r\n\t\t\t 'FROM merch_item '.\r\n\t\t\t 'WHERE merch_id = \\''. $product_id .'\\';';\r\n\t\r\n\t$result = mysqli_query($dbc, $query);\r\n\tif(!$result){\r\n\t\tdie ('Error '. mysqli_errno($dbc) .'<br />');\r\n\t}\r\n\telse{\r\n\t\tif($result->num_rows != 0){\r\n\t\t\t$row = mysqli_fetch_object($result);\r\n\t\t\treturn $row;\r\n\t\t}else{\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t}\r\n}", "public function getProductById($id){\r\n\t\treturn $this->query(\"SELECT * FROM beer WHERE beer_ID = '$id'\"); \r\n\t}", "public function show($id)\n {\n $model = Gift::with('categorydetail','subcategorydetail')->find($id);\n $model->price = $this->calculatePrice($model); \n unset($model->costprice);\n return response($model,200);\n }", "function get_product_detail_by_id($id)\n\t{\n\t\t$query = $this->db->get_where('products', array('id' => $id));\n\t\t//echo $this->db->last_query();die;\n\t\treturn $query->row_array();\t\n\t}", "public function getGood()\n {\n $this->agent_id = substr($this->agent_id(), 2);\n $data = Goods::getGoodsForIndex($this->agent_id(), $_GET['page'], 6);\n return response()->json($data);\n }", "public function getItemInfo($id) {\n $stmt = $this->db->prepare(\"select * from product where id = :id;\");\n $stmt->bindValue(\"id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getProduct($id)\n {\n }", "function get_by_id($id)\n {\n $this->db->join('user', 'user.user_id = t_purchase.user_id', 'left');\n $this->db->join('supplier', 'supplier.supplier_id = t_purchase.supplier_id', 'left');\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "public function show($id)\n {\n \t$id = preg_replace ( '#[^0-9]#', '', $id );\n \t$product =$this->p->where('pro_id', $id)->first();\n \t\n \tif(!$product){\n \t\treturn response()->json([\n \t\t\t\t\t\t\t\t\t'STATUS'=> false ,\n \t\t\t\t\t\t\t\t\t'MESSAGE' => 'Not Found', \n \t\t\t\t\t\t\t\t\t'CODE'=> 400\n \t\t\t\t \t\t\t], 200);\n \t}else{\n \t\treturn response()->json([\n\t\t\t\t\t \t\t\t\t'STATUS'=> true,\n\t\t\t\t\t \t\t\t\t'MESSAGE'=>'record found',\n\t\t\t\t\t \t\t\t\t'DATA' => $product\n\t\t\t\t\t \t\t\t], 200);\n \t}\n }", "function get_info($wallet_id)\r {\r\r $this->db->from('wallets');\r\r $this->db->where('wallet_id', $wallet_id);\r\r\r\r $query = $this->db->get();\r\r\r\r if ($query->num_rows() == 1)\r {\r\r return $query->row();\r } else\r {\r\r //Get empty base parent object, as $item_kit_id is NOT an item kit\r\r $item_obj = new stdClass();\r\r\r\r //Get all the fields from items table\r\r $fields = $this->db->list_fields('wallets');\r\r\r\r foreach ($fields as $field) {\r\r $item_obj->$field = '';\r }\r\r\r\r return $item_obj;\r }\r }", "public function setGoodsId($goods_id)\n {\n $this->goods_id = $goods_id;\n\n return $this;\n }", "public function setGoodsId($goods_id)\n {\n $this->goods_id = $goods_id;\n\n return $this;\n }", "public function setGoodsId($goods_id)\n {\n $this->goods_id = $goods_id;\n\n return $this;\n }", "function getProductInfo($invId){\n $db = acmeConnect();\n $sql = 'SELECT * FROM inventory WHERE invId = :invId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':invId', $invId, PDO::PARAM_INT);\n $stmt->execute();\n $prodInfo = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $prodInfo;\n }", "public function getGoodsPreviweForAdmin()\n {\n $this->table = 'goods';\n\n \t$closure = [\n \t\t'orderby' => 'id desc'\n \t];\n\n return $this->select($closure);\n }", "public function show(Request $request, $id)\n { \n try {\n $good = null;\n \n if ($request->has('no_details')) {\n $good = Product::where('id','=', $id) \n ->select('id','shop_category_id','name',\n 'sn','info','area','package','show_price','show_min_price',\n 'show_max_price','status','is_available','created_at','updated_at')\n ->with(['images' => function ($query) {$query->orderBy('pos', 'asc');}])->first();\n } else {\n $good = Product::where('id','=', $id)->with('images')->first();\n }\n \n if ($good === false) { \n $response = ApiResponse::get(true, ['message' => \"Good $id Not Found.\"]); \n } else { \n $good->brand_name = $good->getBrandName();\n $response = ApiResponse::get(false, $good->toArray());\n } \n } catch (\\Exception $ex) {\n $response = ApiResponse::get(true, ['message' => $ex->getMessage()]); \n }\n \n return $response;\n }", "public function getProductById(int $id);", "static function getById($id)\n {\n global $objDatabase;\n\n if (!$id) return NULL;\n $arrSql = \\Text::getSqlSnippets(\n '`product`.`id`', FRONTEND_LANG_ID, 'Shop',\n array(\n 'name' => self::TEXT_NAME,\n 'short' => self::TEXT_SHORT,\n 'long' => self::TEXT_LONG,\n 'keys' => self::TEXT_KEYS,\n 'code' => self::TEXT_CODE,\n 'uri' => self::TEXT_URI,\n )\n );\n $query = \"\n SELECT `product`.`id`, `product`.`category_id`,\n `product`.`ord`, `product`.`active`, `product`.`weight`,\n `product`.`picture`,\n `product`.`normalprice`, `product`.`resellerprice`,\n `product`.`discountprice`, `product`.`discount_active`,\n `product`.`stock`, `product`.`stock_visible`,\n `product`.`distribution`,\n `product`.`date_start`, `product`.`date_end`,\n `product`.`manufacturer_id`,\n `product`.`b2b`, `product`.`b2c`,\n `product`.`vat_id`,\n `product`.`flags`,\n `product`.`usergroup_ids`,\n `product`.`group_id`, `product`.`article_id`, \n `product`.`minimum_order_quantity`, \".\n $arrSql['field'].\"\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products` AS `product`\".\n $arrSql['join'].\"\n WHERE `product`.`id`=$id\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult) return self::errorHandler();\n if ($objResult->RecordCount() != 1) return false;\n $id = $objResult->fields['id'];\n $strCode = $objResult->fields['code'];\n if ($strCode === null) {\n $strCode = \\Text::getById($id, 'Shop', self::TEXT_CODE)->content();\n }\n $strName = $objResult->fields['name'];\n if ($strName === null) {\n $strName = \\Text::getById($id, 'Shop', self::TEXT_NAME)->content();\n }\n $strShort = $objResult->fields['short'];\n if ($strShort === null) {\n $strShort = \\Text::getById($id, 'Shop', self::TEXT_SHORT)->content();\n }\n $strLong = $objResult->fields['long'];\n if ($strLong === null) {\n $strLong = \\Text::getById($id, 'Shop', self::TEXT_LONG)->content();\n }\n $strUri = $objResult->fields['uri'];\n if ($strUri === null) {\n $strUri = \\Text::getById($id, 'Shop', self::TEXT_URI)->content();\n }\n $strKeys = $objResult->fields['keys'];\n if ($strKeys === null) {\n $strKeys = \\Text::getById($id, 'Shop', self::TEXT_KEYS)->content();\n }\n $objProduct = new Product(\n $strCode,\n $objResult->fields['category_id'],\n $strName,\n $objResult->fields['distribution'],\n $objResult->fields['normalprice'],\n $objResult->fields['active'],\n $objResult->fields['ord'],\n $objResult->fields['weight'],\n $objResult->fields['id']\n );\n $objProduct->pictures = $objResult->fields['picture'];\n $objProduct->resellerprice = floatval($objResult->fields['resellerprice']);\n $objProduct->short = $strShort;\n $objProduct->long = $strLong;\n $objProduct->stock($objResult->fields['stock']);\n $objProduct->stock_visible($objResult->fields['stock_visible']);\n $objProduct->discountprice = floatval($objResult->fields['discountprice']);\n $objProduct->discount_active($objResult->fields['discount_active']);\n $objProduct->b2b($objResult->fields['b2b']);\n $objProduct->b2c($objResult->fields['b2c']);\n $objProduct->date_start($objResult->fields['date_start']);\n $objProduct->date_end($objResult->fields['date_end']);\n $objProduct->manufacturer_id = $objResult->fields['manufacturer_id'];\n $objProduct->uri = $strUri;\n $objProduct->vat_id = $objResult->fields['vat_id'];\n $objProduct->flags = $objResult->fields['flags'];\n $objProduct->usergroup_ids = $objResult->fields['usergroup_ids'];\n $objProduct->group_id = $objResult->fields['group_id'];\n $objProduct->article_id = $objResult->fields['article_id'];\n $objProduct->keywords = $strKeys;\n $objProduct->minimum_order_quantity = $objResult->fields['minimum_order_quantity'];\n // Fetch the Product Attribute relations\n $objProduct->arrRelations =\n Attributes::getRelationArray($objProduct->id);\n//die(\"dfhreh: \".$objProduct->category_id());\n return $objProduct;\n }", "public static function getProductByid($id){\n $sql = \"SELECT products.*, category.cat_name from products inner join category on products.cat_id=category.cat_id where pro_id=\".$id;\n return runQuery($sql);\n }", "function get_product_detail_by_id($id) {\n $query = $this->db->get_where('products', array('id' => $id));\n\n return $query->row_array();\n }", "function get_info($item_kit_id)\n\t{\n\t\t$query = $this->db->where('item_kit_id',$item_kit_id)\n\t\t\t\t->where(\"category\", \"tickets\")\n\t\t\t\t->get(\"item_kits\");\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Get empty base parent object, as $item_kit_id is NOT an item kit\n\t\t\t$item_obj=new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\t$fields = $this->db->list_fields('item_kits');\n\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\t$item_obj->$field='';\n\t\t\t}\n\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "public function detail($id,$supplier){\n\t\tif(!empty($id)){\n\t\t\treturn Product::select(\n\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tDB::raw(\"check_coupon(pro_product.id,pro_product.cid_cate,1) AS discountcoupon\"),\n\t\t\t\t\t\t\t\tDB::raw(\"check_coupon(pro_product.id,pro_product.cid_cate,2) AS coupons\"),\n\t\t\t\t\t\t\t\tDB::raw(\"get_review(pro_product.id,1) AS rating\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_review(pro_product.id,2) AS countrating\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_price(pro_supplier_product.id,pro_supplier_product.discount) AS discount\"),\n\t\t\t\t\t\t\t \tDB::raw(\"get_sale_price(pro_supplier_product.id,pro_supplier_product.saleprice) AS saleprice\"),\n\n\t\t\t\t\t\t\t\t\"pro_product.id AS myid\",\n\t\t\t\t\t\t\t\t\"pro_product.code\",\"pro_product.sap_code\",\n\t\t\t\t\t\t\t\t\"pro_product.name\",\"pro_product.cid_series\",\n\t\t\t\t\t\t\t\t\"pro_product.cid_cate\",\"pro_supplier_product.id AS cid_res\"\n\t\t\t\t\t\t\t \t\t,\"pro_product.isprice\"\t\n\t\t\t\t\t\t\t \t\t,\"pro_supplier_product.stock_num\"\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t \t\t,\"m.name AS name_supplier\"\n\t\t\t\t\t\t\t\t,\"pro_supplier_product.id AS cid_res\",\"pro_supplier_product.cid_supplier\"\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->whereRaw(\"pro_product.id={$id} AND pro_supplier_product.cid_supplier={$supplier} AND pro_supplier_product.status='1' AND pro_product.status='1' AND pro_product.is_status_cate='1' AND pro_product.is_status_series='1' \")\n\t\t\t\t\t\t\n\t\t\t\t\t\t->join(\"pro_supplier_product\",function($join){\n\t\t\t\t\t\t\t$join->on(\"pro_product.id\",\"=\",\"pro_supplier_product.cid_product\");\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->join(\"market_supplier AS m\",function($join){\n\t\t\t\t\t\t\t$join->on(\"m.id\",\"=\",\"pro_supplier_product.cid_supplier\");\n\t\t\t\t\t\t})\n\t\t\t\t\t\t->orderBy(\"pro_supplier_product.date_mod\",\"DESC\")\n\t\t\t\t\t\t->first()->toJson();\n\t\t}\n\t}", "function getProductInformation($id) { \r\n\t\t\t\r\n\t\t\t$where = \"\";\r\n\r\n\t\t\t$stmt = $this->conn->prepare(\"Select * from products where id=\".$id);\r\n\r\n\t\t\tif ($stmt->execute()) {\t\t\t\t\r\n\t\t\t\t$result = $this->fetchArray($stmt);\r\n\t\t\t\treturn $result;\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn NULL;\r\n\t\t\t}\r\n\t}", "protected function detail($id)\n {\n $show = new Show(GoodsModel::findOrFail($id));\n\n $show->field('id', __('Id'));\n $show->field('cid', __('Cid'));\n $show->field('goods_name', __('Goods name'));\n $show->field('goods_img', __('Goods img'));\n $show->field('content', __('Content'));\n $show->field('goods_pricing', __('Goods pricing'));\n $show->field('goods_price', __('Goods price'));\n $show->field('created_at', __('Created at'));\n $show->field('updated_at', __('Updated at'));\n\n return $show;\n }", "function fetchSpecificProduct($id)\n{\n global $conn;\n \n $sql = \"SELECT * FROM products WHERE id = '$id' \";\n $res = mysqli_query($conn, $sql);\n $data = mysqli_fetch_assoc($res);\n return $data;\n}", "function getItemInfo($id){\n $item = $this->order_model->getItemById($id);\n if($item == NULL) return $item;\n\n // get provider information\n $providerinfo = $this->user_model->getUserInfoByid($item->provider);\n $item->provider_id = $providerinfo->userid;\n $item->provider_name = $providerinfo->username;\n\n // get ship man information\n $shipman_info = $this->user_model->getUserInfoByid($item->ship_man);\n $item->shipman_name = isset($shipman_info->username) ? $shipman_info->username : '';\n $item->shipman_phone = isset($shipman_info->contact_phone) ? $shipman_info->contact_phone : '';\n\n // get activity information\n $activity = $this->activity_model->getItemById($item->activity_ids);\n $activity->products = json_decode($item->product_info);\n $activity->cnt = $item->activity_cnts;\n // $activity->products = $this->activity_model->getProductsFromIds($activity->product_id, $activity->provider_id);\n\n $item->activity = $activity;\n\n return $item;\n }", "public function getById(int $id){\n $sql = \"SELECT * FROM pizza WHERE id=?\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([$id]);\n $pizza = $this->dataTransform($stmt->fetchAll())[0];\n\n //on récupere les 'liens' dans la table ingredient_pizza\n $sql = \"SELECT * FROM ingredient_pizza WHERE pizza_id = ?\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([$id]);\n\n //maintenant qu'on a les id des ingredient, \n //on peut les récuperer grace a notre IngredientDAO\n $dbResult = $stmt->fetchAll();\n $ingredients = [];\n $ingredientDAO = new IngredientDAO();\n foreach($dbResult as $result){\n $ingredientId = $result['ingredient_id'];\n $ingredients[$ingredientId] = $ingredientDAO->getById($ingredientId);\n }\n $pizza->setIngredients($ingredients);\n return $pizza;\n }", "function get_info($item_kit_id) {\n $this->db->from('paket_sofa_items');\n $this->db->where('paket_id', $item_kit_id);\n \n //return an array of item kit items for an item\n return $this->db->get()->result_array();\n}", "static public function getGoodsAll($modelId, $goodId)\n {\n $params = [\n 'model_id' => $modelId,\n 'goods_name_id' => $goodId\n ];\n\n try {\n $res = json_decode(self::get('/goods/by_model', $params), true);\n Log::info('getGoodsAll=' . print_r($res, 1));\n\n return $res;\n } catch (\\Exception $e) {\n Log::error($e);\n throw new HttpException(404, 'Model with id None not found');\n }\n }", "public function actionGetProductDetails($id=null)\n {\n\n $userData = User::find()->andFilterWhere(['u_id' => $id])->andWhere(['IS NOT', 'u_mws_seller_id', null])->all();\n\n foreach ($userData as $user) {\n \\Yii::$app->data->getMwsDetails($user->u_mws_seller_id, $user->u_mws_auth_token);\n\n $models = FbaAllListingData::find()->andWhere(['created_by' => $user->u_id])->all(); //->andWhere(['status' => 'Active'])\n\n foreach ($models as $model) {\n if ($model->asin1) {\n $productDetails = \\Yii::$app->api->getProductDimensions($model->asin1, true);\n if ($productDetails) {\n $model->image_url = (key_exists('SmallImage', $productDetails)) ? str_replace('._SL75_', '', $productDetails['SmallImage']['URL']) : null;\n /*if(key_exists('ListPrice', $productDetails)) {\n $model->buybox_price = (key_exists('Amount', $productDetails['ListPrice'])) ? $productDetails['ListPrice']['Amount'] : null;\n }*/\n\n if ($model->save(false)) {\n echo $model->asin1 . \" is Updated.\";\n }\n }\n }\n sleep(3);\n }\n }\n }", "function goods_viewImgProduct(){\n $sql = \"select * from gd_image where get_imgid=:get_imgid order by gd_imgid ASC\";\n $args = [':get_imgid'=>$this->id];\n return $this->run($sql, $args);\n }", "public function getProductById($product_id){\n $query = \"SELECT \n products.id AS id,\n products.name AS name,\n products.description AS description,\n products.price AS price,\n images.image_file_name AS image\n FROM products \n INNER JOIN products_images\n ON products.id = products_images.product_id\n INNER JOIN images\n ON products_images.image_id = images.image_id\n WHERE products.id=? AND images.active = 1 \n AND products.active = 1\";\n $statement = $this -> connection -> prepare( $query );\n $statement -> bind_param( \"i\", $product_id);\n if( $statement -> execute() == false ){\n return false;\n }\n else{\n $result = $statement -> get_result();\n if( $result -> num_rows == 0){\n //product does not exist\n return false;\n }\n else{\n //loop through result\n $product_info = array();\n while( $row = $result -> fetch_assoc() ){\n array_push( $product_info, $row );\n }\n return $product_info;\n }\n }\n $statement -> close();\n }", "function achieve_get_details($id)\r\n{\r\n global $sql;\r\n\r\n $result = ($sql[\"dbc\"]->query(\"SELECT id, name, description, reward, points FROM achievement WHERE id='\".$id.\"' LIMIT 1\"));\r\n $details = $sql[\"dbc\"]->fetch_assoc($result);\r\n return $details;\r\n}", "public function show($id)\n\t{\n\t\t$client = new Client();\n\t\tif (!$id) {\n\t\t\t$id = \"51288142\";\n\t\t}\n\t\t$url = 'http://www.rightmove.co.uk/property-for-sale/property-' . $id . '.html?showcase=false';\n\t\t$crawler = $client->request('GET', $url);\n\n\t\t$aPropData = array();\n\n\t\t$domCSSPath = 'div.property-header-bedroom-and-price > div > h1'; \n\t\t$aPropData[\"title\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\n\t\t$domCSSPath = 'div.property-header-bedroom-and-price > div > address'; \n\t\t$aPropData[\"address\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\t\t\n\t\t$domCSSPath = '#propertyHeaderPrice > small'; \n\t\t$aPropData[\"status\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\n\t\t$domCSSPath = '#propertyHeaderPrice > strong'; \n\t\t$aPropData[\"price\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\n\t\t});\n\t\n\t\t$aDetails = array(); \n\t\t$domCSSPath = 'div.sect.key-features > ul > li';\n\t\t$aPropData[\"details\"] = $crawler->filter($domCSSPath)->each(function ($node) {\n\t\t\treturn trim($node->text());\t\n\t\t});\n\n\t\t$aPropData = $this->optimize($aPropData);\n\t\t\n\t\t//images;\n\t\t$domXPath = '//*[contains(@id,\"thumbnail\")]/img';\n\t\t$aPropData[\"thumbs\"] = $crawler->filterXPath($domXPath)->each(function ($node) {\n\t\t\treturn trim($node->attr(\"src\"));\n\t\t});\n\n\t\t$domXPath = 'noscript > div > ul > li > a > img';\n\t\t$aPropData[\"images\"] = $crawler->filter($domXPath)->each(function ($node) {\n\t\t\treturn trim($node->attr(\"src\"));\n\t\t});\n\n\t\t$domXPath = '#floorplanTabs > noscript > img';\n\t\t$aPropData[\"floorplans\"] = $crawler->filter($domXPath)->each(function ($node) {\n\t\t\treturn trim($node->attr(\"src\"));\n\t\t});\n\n\n\t\techo json_encode($aPropData,JSON_UNESCAPED_UNICODE);\n\n\t}", "function getFavouriteDetail($userId, $goodId = 0)\n {\n $this->db->select(\"*\");\n $this->db->from(\"favourite_goods\");\n $this->db->where(\"user_id\", $userId);\n if ($goodId != 0)\n $this->db->where(\"goods_id\", $goodId);\n $result = $this->db->get()->result();\n return (count($result) > 0) ? 1 : 0;\n }", "function getDataItemByID($strDataID)\n{\n global $db;\n $tbl = new cGaItem();\n $dataEdit = $tbl->findAll(\"id = $strDataID\", \"\", \"\", null, 1, \"id\");\n $arrResult['dataIdItem'] = $dataEdit[$strDataID]['id'];\n //$arrResult['dataItemStock'] = $dataEdit[$strDataID]['item_stock'];\n return $arrResult;\n}", "function index_get()\n {\n $key = $this->get('id');\n if (!$key) {\n $this->response($this->supplies->all(), 200);\n } else {\n $result = $this->supplies->get($key);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Supplies item not found!'), 404);\n }\n }", "public function getproductdetail($prod_id)\n {\n $product = $this->Dbmodel->getproductdata($prod_id); \n return $product;\n }", "public function read($id) {\n return $this->product->find($id);\n\t}", "function getItem($id){\n global $db;\n \n $stmt=$db->prepare(\"SELECT idItem, `name`, amount, unitPrice, salesPrice, parAmount FROM inventory WHERE idItem = :id\");\n \n\t\t$binds= array(\n\t\t\t\":id\"=>$id\n\t\t);\n\t\t\n if($stmt->execute($binds) && $stmt->rowCount()>0){\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return ($results);\n }\n else{\n return false;\n }\n }", "function getItemInfo($id, $obDB)\n{\n $obDB->doQuery(\"select * from auctionitems where itemID=\".$id.\" LIMIT 1\");\n $aResult = $obDB->fetchAssocResult()[0];\n return $aResult;\n \n}", "static public function delFromOrder($goods_id)\n {\n $params = [\n 'user_data_id' => (int) getenv('AMTEL_USER_DATA_ID'), // (int) * – Идентификатор клиента\n 'order_goods_id' => (int) $goods_id, // Идентификатор товара в заказе\n ];\n\n try {\n $res = json_decode(self::del('/order/goods', $params), true);\n Log::info('del from order=' . print_r($res, 1));\n\n return $res;\n } catch (\\Exception $e) {\n Log::error($e);\n throw new HttpException(500, $e->getMessage());\n }\n }", "public function show($id)\n {\n //\n // $invoice = Invoice::where('id', $id)->first();\n $purchase = Purchase::where('id', $id)->with('purchase_products')->get();\n return $purchase;\n // return ['msg' => 'success'];\n }", "public function show($id)\n {\n $transaction_desc = \\seekit\\transact_desc::with(['product'=>function($q){ $q->select(['id','productName']);},'product_restock'=>function($q){ $q->select(['id','batch_id','Vendor']);}])\n ->where('transaction_id',$id)->get(['product_id','product_restock_id','product_quantity','product_quantity_pur','product_price']);\n return response()->json($transaction_desc);\n }", "public function find( $id ){\n \t\t$response = $this->curl->get( $this->api_url . '/' . $id, [ \n\t\t\t'access_token' => $this->token\n\t\t]);\n\t\tif( $response->success ){\n\t\t\t$product = new Product( $this );\n\t\t\t$product->fetch($response->product);\n\n\t\t\treturn $product;\n \t\t}//if\n \t\telse{\n \t\t\treturn FALSE;\n \t\t}//else\n \t}", "public function detailDataProduk($id_produk)\n {\n return DB::table('tbl_produk')\n ->leftJoin('tbl_kategori', 'tbl_kategori.id_kategori', '=', 'tbl_produk.id_kategori')\n ->leftJoin('tbl_brand', 'tbl_brand.id_brand', '=', 'tbl_produk.id_brand')\n ->where('id_produk', $id_produk)->first();\n }", "private function get_costing_finish_goods($costing_id){\n $costing = Costing::with(['style'])->find($costing_id);\n $product_feature = ProductFeature::find($costing->style->product_feature_id);\n $item = [];\n\n if($product_feature->count > 1){//has sfg items\n $list = DB::select(\"SELECT\n costing_sfg_item.costing_id,\n costing_fng_item.costing_fng_id,\n costing_fng_item.fng_id,\n item_master_fng.master_code AS fng_code,\n item_master_fng.master_description AS fng_description,\n org_color_fng.color_code AS fng_color_code,\n org_color_fng.color_name AS fng_color_name,\n costing_sfg_item.costing_sfg_id,\n costing_sfg_item.sfg_id,\n item_master_sfg.master_code AS sfg_code,\n item_master_sfg.master_description AS sfg_description,\n org_color_sfg.color_code AS sfg_color_code,\n org_color_sfg.color_name AS sfg_color_name,\n org_country.country_description\n FROM\n costing_sfg_item\n INNER JOIN costing_fng_item ON costing_fng_item.costing_fng_id = costing_sfg_item.costing_fng_id\n INNER JOIN item_master AS item_master_sfg ON item_master_sfg.master_id = costing_sfg_item.sfg_id\n INNER JOIN item_master AS item_master_fng ON item_master_fng.master_id = costing_fng_item.fng_id\n INNER JOIN org_country ON org_country.country_id = costing_sfg_item.country_id\n INNER JOIN org_color AS org_color_fng ON org_color_fng.color_id = costing_fng_item.fng_color_id\n INNEr JOIN org_color AS org_color_sfg ON org_color_sfg.color_id = costing_sfg_item.sfg_color_id\n WHERE costing_sfg_item.costing_id = ?\", [$costing_id]);\n }\n else {//no sfg items\n $list = DB::select(\"SELECT\n costing_fng_item.costing_id,\n costing_fng_item.costing_fng_id,\n costing_fng_item.fng_id,\n item_master.master_code AS fng_code,\n item_master.master_description AS fng_description,\n org_color.color_code AS fng_color_code,\n org_color.color_name AS fng_color_name,\n 0 AS costing_sfg_id,\n 0 AS sfg_id,\n '' AS sfg_code,\n '' AS sfg_description,\n '' AS sfg_color_code,\n '' AS sfg_color_name,\n org_country.country_description\n FROM\n costing_fng_item\n INNER JOIN item_master ON item_master.master_id = costing_fng_item.fng_id\n INNER JOIN org_country ON org_country.country_id = costing_fng_item.country_id\n INNER JOIN org_color ON org_color.color_id = costing_fng_item.fng_color_id\n WHERE costing_fng_item.costing_id = ?\", [$costing_id]);\n }\n\n return $list;\n }", "function particularproductlist($id)\n\t{\n\t\t$getParproduct=\"SELECT * from product_category where ptdcatgry_id = $id\";\n\t\t$product_data=$this->get_results( $getParproduct );\n\t\treturn $product_data;\n\t}", "public function getGoodsForSlider()\n {\n $goods = Good::with('catalog')\n ->orderBy('price')\n ->where('show_on_slider', '=', true)\n ->get();\n\n return response()->json([\n 'goods' => $goods,\n 'success' => true\n ], $this->successStatus);\n }", "public function get_producto_por_id($id_producto){\n\n $conectar= parent::conexion();\n\n //$output = array();\n\n $sql=\"select * from producto where id_producto=?\";\n\n $sql=$conectar->prepare($sql);\n\n $sql->bindValue(1,$id_producto);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n\n }", "static public function confirmOrder($goods_id)\n {\n $params = [\n //'user_data_id' => (int) getenv('AMTEL_USER_DATA_ID'), // (int) * – Идентификатор клиента для которого делается заказ (отличается от user_id для доступа к API, выдается вместе с остальными учетными данными при подключении)\n 'order_goods_id' => (int) $goods_id, // Идентификатор товара в заказе\n ];\n\n try {\n $res = json_decode(self::post('/order/goods_confirm', $params), true);\n Log::info('add to order=' . print_r($res, 1));\n\n return $res;\n } catch (\\Exception $e) {\n Log::error($e);\n throw new HttpException(500, $e->getMessage());\n }\n }", "function getDetails()\n\t{\n\t\tglobal $con;\n\n\t\t$product_id = $_GET['pro_id'];\n\t\t$get_products = \"select * from products where prod_id='$product_id'\";\n\t\t$run_products = mysqli_query($con, $get_products);\n\n\t\twhile($row = mysqli_fetch_array($run_products)) {\n\t\t\t$prod_cat = $row['prod_cat'];\n\t\t\t$prod_brand = $row['prod_brand'];\n\t\t\t$prod_title = $row['prod_title'];\n\t\t\t$prod_price = $row['prod_price'];\n\t\t\t$prod_image = $row['prod_img'];\n\t\t\t$prod_desc = $row['prod_desc'];\n\t\techo \"\n\t\t\t<div class='product_detail'>\n\t\t\t\t<h3>$prod_title</h3>\n\t\t\t\t<img src='admin_area/product_images/$prod_image'>\t\n\t\t\t\t<h2>$prod_price</h2>\n\t\t\t\t<p>$prod_desc</p>\n\t\t\t\t<a href='index.php'>Go Back</a>\n\t\t\t\t<a href='index.php?add_cart='$product_id'><button>Add to Cart</button></a>\n\t\t\t</div>\n\t\t\";\n\t\t}\n\t}", "public function cek_pengguna_prospektus($id_pros, $id_pengguna)\n {\n $this->db->where('id_pengguna', $id_pengguna);\n $this->db->where('id_prospektus', $id_pros);\n \n return $this->db->get('tr_investor');\n }", "public function details($id)\n {\n return SupuestoObra::where('id', $id)->get();\n }", "public function showbyid($id)\n {\n $Supplier = Supplier::find($id);\n\n \n if (!$Supplier) {\n return response()->json([\n 'success' => false,\n 'message' => ' Supplier with id ' . $id . ' not found'\n ]);\n }\n $Supplier['Images'] = Supplier_img::where('supplier_id','=', $Supplier->id)->get();\n $Supplier['upload_file'] = supplier_brochure::where('supplier_id','=', $Supplier['id'])->get();\n return response()->json([\n 'success' => true,\n 'data' => $Supplier->toArray()\n ], 200);\n }", "function getVaccineDetails($v_id)\n\t{\n\t\trequire_once $_SERVER ['DOCUMENT_ROOT'] . \"/Connections/MyDBConnector.php\";\n\t\t$pdo = (new MyDBConnector())->getPDO();\n\t\t//TODO:returns only the price for SELF SCHEME need to check if patient is under insurance and return appropriatle\n\t\t$sql = \"SELECT v.id, v.billing_code,v.label,v.description,i.selling_price AS price FROM vaccines v LEFT JOIN insurance_items_cost i ON v.billing_code=i.item_code WHERE v.id =\" . $v_id . \" AND i.insurance_scheme_id=1\";\n\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t$stmt->execute();\n\t\t$data = array();\n\t\twhile ($row = $stmt->fetch(PDO::FETCH_NAMED, PDO::FETCH_ORI_NEXT)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\treturn $data[0];\n\t}", "function getStock($id){\n\n $query=$this->db\n ->select('cantidad_dispo')\n ->from('productos')\n ->where('idproducto='.$id)\n ->get();\n $product = $query->row();\n return $product->cantidad_dispo;\n\n }", "public function details($id = '')\n\t{\n\t\t$this->set_page_title(_l('product_details'));\n\n\t\t$vendor_id = $this->session->userdata('vendor_id');\n\n\t\tif ($id)\n\t\t{\n\t\t\t$data['product'] = $this->products->get_by(array('id' => $id, 'vendor_id' => $vendor_id));\n\n\t\t\tif (!$data['product'])\n\t\t\t{\n\t\t\t\tredirect('vendor/products');\n\t\t\t}\n\n\t\t\t$data['content'] = $this->load->view('vendor/products/details', $data, TRUE);\n\t\t\t$this->load->view('vendor/layouts/index', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect('vendor/products');\n\t\t}\n\t}", "protected function detail($id)\n {\n $show = new Show(Goods::findOrFail($id));\n\n $show->id('ID');\n $show->name('商品');\n\n $show->cate_id('分类')->as(function ($id) {\n return Category::findOrFail($id)->title;\n })->label();\n\n $show->is_valid('是否显示')->as(function ($is) {\n return $is ? '是' : '否';\n })->label();\n $show->remark('备注');\n\n $show->created_at(trans('admin.created_at'));\n $show->updated_at(trans('admin.updated_at'));\n\n return $show;\n }", "public function getProductById($id){\n $query = $this->db->get_where('product',array('id' => $id));\n return $query->row(); \n }", "function fetchSinglePro()\n\t {\n\t\t \n\t\t $res=mysql_query(\"select * from Product where pro_id='\".$_GET['pro_id'].\"'\");\n\t\t $data=mysql_fetch_array($res);\n\t\t return $data;\t\n\t }", "function get_by_id_producto($id_producto){\n\t\t$data=array(\n\t\t\t'Id_platillo' => $id_producto\n\t\t);\n\t\t\n\t\t$query = $this->db->get_where('v_platillo_m', $data);\n\t\treturn $query->result_array();\n\t}", "function getProduct($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/product/id/'.(int)$params['id'].'.json'),true);\n\t}", "function getProduct($id) {\n include('db/db.php'); // now we have $db to communicate with database\n include('db/model/Product.php');\n\n // Prepared Statement (prepare, bind, execute) -> prevent SQL injection\n $ready = $db->prepare(\"select name, description, image, time, cost from products where id = ?\");\n $ready->bind_param('d', $id);\n $ready->execute();\n \n $ready->store_result();\n $ready->bind_result($name, $description, $image, $time, $cost);\n\n // Check whether the product is exist or not\n if ($ready->fetch()) {\n $images = explode(';', $image);\n\n $image1 = $images[0];\n $image2 = $images[1];\n $image3 = $images[2];\n\n // return an object Product\n return new Product(\n $id,\n $name,\n $description,\n $image1,\n $image2,\n $image3,\n $time,\n $cost\n );\n }\n else {\n return 0;\n }\n }", "public function itemDetail($id){\n\n $datadetalle = DocumentoDetalle::\n from('documentodetalle as d')\n ->join('products as p', 'p.id', '=' , 'd.id_producto')\n ->where('d.id_documentocabecera', '=', $id)\n ->select(\n 'd.id',\n 'd.id_producto as idproduct',\n 'p.descripcion as product',\n 'd.precio_unitario as price',\n 'd.cantidad',\n 'p.stock',\n \\DB::raw('4 as tipo')\n )->get();\n\n return response()->json([\n 'data' => $datadetalle\n ]);\n\n }", "public function show($id)\n {\n return Response::create(Good::with(['waypoints', 'suburbs'])->findOrFail($id));\n }", "function get_info_item_kits($item_kit_id)\n\t{\n\t\t$this->db->from('item_kits_tickets');\n\t\t$this->db->where('item_kit_id',$item_kit_id);\n\t\t//return an array of item kit items for an item\n\t\treturn $this->db->get()->result();\n\t}", "function getExpenseDetailsByBudgetId($budgetId)\n {\n return $this::with(array('budgetCategory', 'budgetSubcategory'))\n ->where(array('budget_id' => $budgetId))\n ->select('id', 'expensive_id', 'budget_category_id', 'specifications', 'image', 'budget_subcategory_id', 'expensive_for', 'expensive_quantity', 'expensive_rate', 'expensive_amount', 'expensive_explanation')\n ->orderby('id', 'desc')\n ->get();\n }" ]
[ "0.75535", "0.7338689", "0.71883976", "0.682482", "0.682482", "0.682482", "0.65165585", "0.6502376", "0.640936", "0.6398063", "0.6393282", "0.6372691", "0.63614476", "0.6282138", "0.62558705", "0.62362117", "0.6224571", "0.62129676", "0.6208471", "0.61809385", "0.61688423", "0.6156194", "0.615275", "0.6145606", "0.6131812", "0.60986525", "0.60798866", "0.60797095", "0.6073648", "0.60676926", "0.60591257", "0.6051864", "0.6021623", "0.6019239", "0.6007616", "0.59885013", "0.5972964", "0.5956747", "0.59501636", "0.5943168", "0.59110075", "0.5908854", "0.59043354", "0.59043354", "0.59043354", "0.5888582", "0.58777094", "0.5875326", "0.5870581", "0.58686787", "0.58617955", "0.58561", "0.58521616", "0.5849956", "0.584914", "0.5834116", "0.58338726", "0.583373", "0.5829775", "0.582289", "0.58205384", "0.5817267", "0.5810433", "0.5805347", "0.5803901", "0.58005315", "0.57743484", "0.57702905", "0.57664067", "0.5764327", "0.5757242", "0.5748296", "0.57449526", "0.5744108", "0.57431906", "0.57320863", "0.5729408", "0.57275474", "0.5724139", "0.57217944", "0.5721446", "0.5715588", "0.5705757", "0.57024133", "0.5701142", "0.56999946", "0.569799", "0.569754", "0.5697498", "0.56943345", "0.569366", "0.5681205", "0.56768453", "0.56651384", "0.5664013", "0.56606275", "0.5659665", "0.5651895", "0.56479305", "0.564751" ]
0.7049007
3
======================================================================== Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model() {\n //here __CLASS__ or self does not work because these will return coreModel class name but this is an abstract class so php will generate an error.\n //get_called_class() will return the class name where model is called.It may be the child.\n $class = get_called_class();\n return new $class;\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.76832896", "0.75955194", "0.71365553", "0.7105948", "0.7103622", "0.7070556", "0.69517833", "0.6946451", "0.69369507", "0.69369507", "0.6927354", "0.69215786", "0.69215786", "0.69173884", "0.68830866", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.6873088", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725", "0.68700725" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria = new CDbCriteria; $criteria->together = true; $criteria->with = array('article_lang'); $criteria->compare('t.id', $this->id); $criteria->compare('t.image_id', $this->image_id); $criteria->compare('t.position', $this->position); $criteria->compare('article_lang.lang_id', $this->langId); return new CActiveDataProvider($this, array( 'criteria' => $criteria, 'sort'=>array( 'defaultOrder'=>'position ASC', ), 'pagination' => false, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getModels()\n {\n return $this->_models;\n }", "public function getSearchFields();", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function findBy(array $filters);", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6745192", "0.6745192", "0.6607936", "0.6480248", "0.6380478", "0.6346251", "0.6309924", "0.6302481", "0.62549895", "0.62511677", "0.62511677", "0.6111791", "0.60769993", "0.60728127", "0.60465515", "0.60351735", "0.6033834", "0.601554", "0.5982608", "0.59806865", "0.5979308", "0.5970091", "0.59315383", "0.5928182", "0.59239197", "0.5891605", "0.588925", "0.5849558", "0.58478904", "0.58265656", "0.5818011", "0.5813345", "0.5808009", "0.5790819", "0.57766616", "0.57694167", "0.5765023", "0.57642305", "0.57522315", "0.5740738", "0.5738047", "0.5727545", "0.5724201", "0.5723084", "0.57225823", "0.5721401", "0.5718913", "0.5714439", "0.5712011", "0.5707315", "0.5694636", "0.5680138", "0.56711453", "0.5670484", "0.56703377", "0.56703377", "0.56703377", "0.5669673", "0.56673825", "0.56659126", "0.5656451", "0.5651109", "0.56498116", "0.564325", "0.5635642", "0.5633513", "0.56310356", "0.56235486", "0.56176996", "0.5612909", "0.560956", "0.5595046", "0.5579938", "0.557241", "0.5556209", "0.5550101", "0.55487776", "0.5547998", "0.5547349", "0.5535324", "0.5534813", "0.55342954", "0.55319065", "0.5525128", "0.55199116", "0.5518253", "0.55144674", "0.5509604", "0.55057275", "0.550087", "0.550019", "0.54966915", "0.54966915", "0.54966915", "0.54954666", "0.54937917", "0.5492664", "0.5492298", "0.5490264", "0.5489261", "0.54850507" ]
0.0
-1
Attempts to create a connection with the database.
public function connect(Array $params, $username = null, $password = null, Array $driverOptions = []) { $driverKey = array_key_exists('driverClass', $params['master']) ? 'driverClass' : 'driver'; $driverValue = $params['master'][$driverKey]; $master = DriverManager::getConnection($params['master']); $slaves = new SplObjectStorage; foreach ($params['slaves'] as $slaveParams) { $slaveParams[$driverKey] = $driverValue; $slaves->attach(DriverManager::getConnection($slaveParams), $slaveParams['weight']); } return new MasterSlavesConnection($master, $slaves); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }", "protected function createDatabaseConnection()\r\n\t{\r\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Db\\DbConnectionPool();\r\n\t}", "protected function _initDbConnection() {\n\t\tif (!empty($this->db)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Create a new connection\n\t\tif (empty($this->config['datasource'])) {\n\t\t\tdie(\"FeedAggregatorPdoStorage: no datasource configured\\n\");\n\t\t}\n\n\t\t// Initialise a new database connection and associated schema.\n\t\t$db = new PDO($this->config['datasource']); \n\t\t$this->_initDbSchema();\n\t\t\n\t\t// Check the database tables exist\n\t\t$this->_initDbTables($db);\n\n\t\t// Database successful, make it ready to use\n\t\t$this->db = $db;\n\t}", "public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }", "protected static function createDbConnection() {\n if(isset(self::$_config['db']) &&\n isset(self::$_config['db']['host']) &&\n isset(self::$_config['db']['user']) &&\n isset(self::$_config['db']['password']) &&\n isset(self::$_config['db']['database'])) {\n $db = mysqli_connect(\n self::$_config['db']['host'],\n self::$_config['db']['user'],\n self::$_config['db']['password'],\n self::$_config['db']['database']\n );\n\n if(mysqli_connect_errno()) {\n static::error500('DB error.', 'DB error: ' . mysqli_connect_errno());\n }\n\n if(!mysqli_set_charset($db, 'utf8')) {\n static::error500('DB error.', 'DB error: ' . mysqli_error($db));\n }\n\n Model::setConnection($db);\n } else {\n static::error500('Database settings are missing from config.');\n }\n }", "public function connectToDB() {}", "private function _connect()\n\t{\n\t\t// persistent connection can lessen server load\n\t\tif ($this->_persistent === true)\n\t\t{\n\t\t\t$this->_connection = mysql_pconnect($this->_host.':'.$this->_port,\n\t\t\t\t$this->_user, $this->_password);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_connection = mysql_connect($this->_host.':'.$this->_port,\n\t\t\t\t$this->_user, $this->_password);\n\t\t}\n\n\t\t// verify that the connection is active\n\t\tif ($this->_connection == false ||\n\t\t\tis_resource($this->_connection) === false\n\t\t)\n\t\t{\n\t\t\tthrow new DatabaseException('',\n\t\t\t\tDatabaseException::CONNECTION_FAILED\n\t\t\t);\n\t\t}\n\n\t\t// only try to connect if there is a database given (with mysql\n\t\t// you don't need a database given\n\t\tif (!empty($this->_database))\n\t\t{\n\t\t\t// try to connect to the database\n\t\t\tif (mysql_select_db($this->_database, $this->_connection) === false)\n\t\t\t{\n\t\t\t\tthrow new DatabaseException('Error ('.\n\t\t\t\t\tmysql_errno($this->_connection).') '.\n\t\t\t\t\tmysql_error($this->_connection));\n\t\t\t}\n\t\t}\n\t}", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function createConnection()\n {\n $client = DatabaseDriver::create($this->getConfig());\n\n return $client;\n }", "public function connect()\n {\n $config = $this->config;\n $config = array_merge($this->_baseConfig, $config);\n\n $conn = \"DATABASE='{$config['database']}';HOSTNAME='{$config['host']}';PORT={$config['port']};\";\n $conn .= \"PROTOCOL=TCPIP;UID={$config['username']};PWD={$config['password']};\";\n\n if (!$config['persistent']) {\n $this->connection = db2_connect($conn, PGSQL_CONNECT_FORCE_NEW);\n } else {\n $this->connection = db2_pconnect($conn);\n }\n $this->connected = false;\n\n if ($this->connection) {\n $this->connected = true;\n $this->query('SET search_path TO '.$config['schema']);\n }\n if (!empty($config['charset'])) {\n $this->setEncoding($config['charset']);\n }\n\n return $this->connection;\n }", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}", "private function connectToDatabase()\n {\n return DbConnection::connectToDatabase($this->link);\n }", "public function connect()\n {\n Deprecation::triggerIfCalledFromOutside(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/issues/4966',\n 'Public access to Connection::connect() is deprecated.',\n );\n\n if ($this->_conn !== null) {\n return false;\n }\n\n try {\n $this->_conn = $this->_driver->connect($this->params);\n } catch (Driver\\Exception $e) {\n throw $this->convertException($e);\n }\n\n if ($this->autoCommit === false) {\n $this->beginTransaction();\n }\n\n if ($this->_eventManager->hasListeners(Events::postConnect)) {\n Deprecation::trigger(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/issues/5784',\n 'Subscribing to %s events is deprecated. Implement a middleware instead.',\n Events::postConnect,\n );\n\n $eventArgs = new Event\\ConnectionEventArgs($this);\n $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);\n }\n\n return true;\n }", "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}", "private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }", "public function connect()\n {\n // ==== A connection was attempted ==== //\n $this->conn_trigger = true;\n\n // ==== Building connection string ==== //\n $conn_string = \"host=\" . $this->options['host'] . \" \";\n $conn_string .= \"dbname=\" . $this->options['db'] . \" \";\n $conn_string .= \"user=\" . $this->options['user'] . \" \";\n $conn_string .= \"password=\" . $this->options['passwd'] . \" \";\n $conn_string .= \"port=\" . $this->options['port'];\n\n // ==== Connecting to the database ==== //\n $this->link = pg_connect($conn_string);\n\n // ==== Checking if the connection was successfull\n if($this->link == false)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "public function connect() {\n $this->database = new mysqli(\n $this->dbinfo['host'],\n $this->dbinfo['user'],\n $this->dbinfo['pass'],\n $this->dbinfo['name']\n );\n if ($this->database->connect_errno > 0)\n return $this->fail(\"Could not connect to database: [{$this->database->connect_error}]\");\n }", "public function open_db_connection() {\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n // cgecking if the connection has errors\n if($this->connection->connect_errno) {\n die(\"Database connection failed\" . $this->connection->connect_error);\n }\n }", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "public function connect()\n {\n if ($this->isConnected()) return;\n\n $this->connectionManager = new mysqli(\n $this->hostname, $this->username, $this->password, $this->schema, $this->port);\n \n if (mysqli_connect_errno())\n $this->isConnected = false;\n else\n $this->isConnected = true;\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 createConnection()\n {\n\n //Pull db credentials from a .ini file in the private folder.\n $config = parse_ini_file('db.ini');\n\n $username = $config['username'];\n $password = $config['password'];\n $hostName = $config['servername'];\n $dbName = $config['dbname'];\n $dsn = 'mysql:host=' . $hostName . ';dbname=' . $dbName . ';';\n\n\n try {\n\n //Create connection\n $this->db = new PDO($dsn, $username, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n\n $error_message = $e->getMessage();\n echo $error_message;\n }\n }", "public function connectDB()\n {\n // Early return if connected already\n if ($this->isConnected) {\n return;\n }\n\n if (! $this->databaseName) {\n throw new \\RuntimeException('TYPO3 Fatal Error: No database selected!', 1270853882);\n }\n\n if ($this->sql_pconnect()) {\n if (! $this->sql_select_db()) {\n throw new \\RuntimeException('TYPO3 Fatal Error: Cannot connect to the current database, \"' . $this->databaseName . '\"!', 1270853883);\n }\n } else {\n throw new \\RuntimeException('TYPO3 Fatal Error: The current username, password or host was not accepted when the connection to the database was attempted to be established!', 1270853884);\n }\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 }", "public static function connect() {\n\t\tif(!self::$conn) {\n\t\t\tnew Database();\n\t\t}\n\t\treturn self::$conn;\n\t}", "private function connect()\n {\n // Try\n try {\n // Setup database connection\n $this->connection = new mysqli(\n $this->credentials->host,\n $this->credentials->user,\n $this->credentials->pass,\n $this->credentials->name,\n $this->credentials->port\n );\n } catch (Exception $ex) {\n // Return warning\n ErrorHandler::die(102, 'No database connection. Please check your credentials or is the server offline? Error: ' . $ex->getMessage());\n }\n }", "public function open_db_connection()\n\t{\n\n\t\t$this->connection = new mysqli(DB_HOST,DB_USER,\n\t\t\tDB_PASS,DB_NAME);\n\n\t\tif ($this->connection->connect_errno):\n\t\t\tdie('database connection failed badly' . $this->connection->connect_error);\n\t\tendif;\n\n\t}", "private function databaseConnection(){\n \t\tif($this->connection != null){\n \t\t\treturn;\n \t\t} else {\n \t\t\t$this->connection = mysqli_connect(\"127.0.0.1\", \"user\", \"password\", \"database\") or die(\"Error \" . mysqli_error($this->connection));\n \t\t}\n\n\t}", "private function connect ()\n {\n $dbConfig = require_once 'config/configuration.php';\n list('host' => $host, 'port' => $port, 'database' => $database, 'username' => $username, 'password' => $password) = $dbConfig;\n\n $this->connection = new \\mysqli($host, $username, $password, $database, $port);\n\n if ($this->connection->connect_errno) {\n throw new \\Exception('Failed to connect to database');\n }\n }", "public function connect() {\r\n\t\t// connection parameters\r\n\t\t$host = App_Constant::$DATABASE_HOST;\r\n\t\t$user = App_Constant::$DATABASE_USER;\r\n\t\t$password = App_Constant::$DATABASE_PASSWORD;\r\n\t\t$database = App_Constant::$DATABASE_DB;\r\n\t\t$port = App_Constant::$DATABASE_PORT;\r\n\t\t// $socket = App_Constant::$DATABASE_SOCKET;\r\n\t\t\r\n\t\t// create new connection with specified database details.\r\n\t\ttry {\r\n\t\t\t$this->connection = mysqli_connect ( $host, $user, $password, $database, $port );\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\tthrow new Exception ( App_Constant::$ERROR_FAIL_DB_CONNECTION . mysqli_connect_error () );\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * if (mysqli_connect_errno()) { throw new Exception(App_Constant::$ERROR_FAIL_DB_CONNECTION . mysqli_connect_error()); }\r\n\t\t */\r\n\t}", "public function connect() {\n\t\tif (!isset(self::$connection)) {\n\t\t\tself::$connection = @new mysqli(db_hostname, db_username, db_password, db_dbname);\n\t\t}\n\n\t\tif (self::$connection->connect_error) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn self::$connection;\n\t\t}\n\t}", "public function connectDB() {}", "function create_connection(){\n\t\t$this->dbconn =& new DBConn();\r\n\t\tif($this->dbconn == NULL)\r\n\t\t\tdie('Could not create connection object');\n\t}", "protected function getConnection()\n\t{\n\t\treturn $this->createDefaultDBConnection(TEST_DB_PDO(), TEST_GET_DB_INFO()->ldb_name);\n\t}", "function createConection(){\n\n\t\tglobal $db_host;\n\t\tglobal $db_usr;\n\t\tglobal $db_pwd;\n\t\tglobal $db_name;\n\t\tglobal $db_port;\n\n\t\treturn pg_connect('user='.$db_usr.' password='.$db_pwd.' host= '.$db_host.' dbname = '.$db_name.' port = '.$db_port);\n\t}", "public function connect () {\r\n\t\t//We should try to check if the resource is already allocated.\r\n\t\tif (($this->con = mysql_connect ($this->host, $this->login, $this->password)) != -1) return true;\r\n\t\telse return $this->_error (2, \"db: Cannot connect to the database.\");\r\n\t}", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "private function Connect(){\n\t\t$dsn = sprintf('%s:host=%s;dbname=%s;port=%s',\n\t\t\t$this->connection_parameters->offsetGet('type'),\n\t\t\t$this->connection_parameters->offsetGet('hostname'),\n\t\t\t$this->connection_parameters->offsetGet('database'),\n\t\t\t$this->connection_parameters->offsetGet('port')\n\t\t);\n\n\t\t$options = array(\n\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\n\t\ttry {\n\t\t\t$this->connection = new PDO($dsn, $this->connection_parameters->offsetGet('username'), $this->connection_parameters->offsetGet('password'), $options);\n\t\t\treturn true;\n\t\t} catch(PDOException $e) {\n\t\t\t$this->error = $e->getMessage();\n\t\t\treturn false;\n\t\t}\n\t}", "function startDBConnection() {\n $connectionObject = new DatabaseFactory();\n return $connectionObject->getConnection();\n}", "public function createConn()\n {\n $this->conn = new mysqli(self::SERVER_NAME, self::USER_NAME, \n self::PASSWORD, self::DB_NAME);\n\n if(mysqli_connect_error())\n return false;\n else\n return true;\n }", "protected function getConnection()\n {\n return $this->createDefaultDBConnection($this->createPdo(), static::NAME);\n }", "private function openDatabaseConnection()\n {\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(\\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_OBJ, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new \\PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "private function setupDatabase()\n {\n try {\n $db = new PDO(sprintf('mysql:host=%s;dbname=%s', $this->host, $this->dbName), $this->userName, $this->password);\n\n } catch (PDOException $e) {\n\n if (false != strpos($e->getMessage(), 'Unknown database')) {\n $db = new PDO(sprintf('mysql:host=%s', $this->host), $this->userName, $this->password);\n $db->exec(\"CREATE DATABASE IF NOT EXISTS `$this->dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\") or die(print_r($db->errorInfo(), true));\n\n } else {\n die('DB ERROR: ' . $e->getMessage());\n }\n\n $db = new PDO(sprintf('mysql:host=%s;dbname=%s', $this->host, $this->dbName), $this->userName, $this->password);\n }\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $db;\n }", "function getDBConnection() {\n\t\n\t\tglobal $dbh;\n\n\t\tif(!$dbh) {\n\t\t\t$dbh = mysqli_connect(\"localhost\", \"sa\", \"sa\", \"travelexperts\");\n\t\t\tif(!$dbh) {\n\t\t\t\tprint(\"Connection failed: \" . mysqli_connect_errno($dbh) . \"--\" . mysqli_connect_error($dbh) . \"<br/>\");\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\t//db connection exists, do not need to create again.\n\t\t}\n\t\t\n\t}", "public function connect()\n {\n if ($this->pdo !== null) {\n return;\n }\n\n $db = $this->configs['database'] ?? '';\n $hostname = $this->configs['hostname'] ?? '';\n $port = $this->configs['port'] ?? '';\n $charset = $this->configs['charset'] ?? '';\n $username = $this->configs['username'] ?? '';\n $password = $this->configs['password'] ?? '';\n\n $this->pdo = new PDO(\n \"mysql:dbname={$db};host={$hostname};port={$port};charset={$charset}\",\n $username,\n $password\n );\n }", "public function connect()\n {\n $driver = 'DB'; // default driver\n $dsn = $this->getParameter('dsn');\n\n $do = $this->getParameter('dataobject');\n if ($do && isset($do['db_driver'])) {\n $driver = $do['db_driver'];\n }\n\n if ('DB' == $driver) {\n\n if (!class_exists('DB')) {\n include('DB.php');\n }\n\n $options = PEAR::getStaticProperty('DB', 'options');\n if ($options) {\n $this->connection = DB::connect($dsn, $options);\n } else {\n $this->connection = DB::connect($dsn);\n }\n \n } else {\n\n if (!class_exists('MDB2')) {\n include('MDB2.php');\n }\n \n $options = PEAR::getStaticProperty('MDB2', 'options');\n $this->connection = MDB2::connect($dsn, $options);\n }\n\n if (PEAR::isError($this->connection)) {\n\n throw new AgaviDatabaseException($this->connection->getMessage());\n $this->connection = Null;\n }\n }", "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 }", "public final function getConnection() {\n\t\t// if the connection hasn't been established, create it\n\t\tif($this->connection === null) {\n\t\t\t// connect to mySQL and provide the interface to PHPUnit\n\n\n\t\t\t$secrets = new \\Secrets(\"/etc/apache2/capstone-mysql/busters.ini\");\n\t\t\t$pdo = $secrets->getPdoObject();\n\t\t\t$this->connection = $this->createDefaultDBConnection($pdo, $secrets->getDatabase());\n\t\t}\n\t\treturn($this->connection);\n\t}", "public function connect(){\n\n // test if we have an open connection\n if(!$this->con){\n\n // try to open a connection to our mysql database\n try{\n\n // construct our connection\n $this->con = mysqli_connect($this->host, $this->user, $this->pass, $this->database, $this->port);\n\n // catch any exceptions\n }catch(Exception $ex){\n\n // kill the processing of our script and display the exception\n die($ex->getMessage());\n }\n }\n\n // return our connection object\n return $this->con;\n }", "function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }", "public static function makeConnection()\n {\n self::$connectionManager = new ConnectionManager();\n self::$connectionManager->addConnection([\n 'host' => self::$config['host'],\n 'user' => self::$config['user'],\n 'password' => self::$config['password'],\n 'dbname' => self::$config['dbname']\n ]);\n self::$connectionManager->bootModel();\n }", "public function ensureConnection() {\n if ( ! $this->connected) {\n $this->connect();\n }\n }", "protected function db_connect() {\n \n // Data source name\n $this->dsn = 'mysql:host=' . $this->db_host . ';dbname=' . $this->db_name . ';charset=' . $this->db_charset;\n\n // Makes a connection to the database\n $this->db_conn = new PDO( $this->dsn, $this->db_user, $this->db_password );\n\n // When fetching an SQL row it turn into an object\n $this->db_conn->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n // Gives the Error reporting atribute and throws exeptions\n $this->db_conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n \n // Returns the connection\n return $this->db_conn;\n\n }", "public function connectDatabase()\n {\n if($this->database !== null)\n {\n $this->disconnectDatabase();\n }\n\n $this->database = new mysqli(\n $this->DatabaseConfiguration['Host'],\n $this->DatabaseConfiguration['Username'],\n $this->DatabaseConfiguration['Password'],\n $this->DatabaseConfiguration['Name'],\n $this->DatabaseConfiguration['Port']\n );\n }", "public function getConnection()\n {\n if (isset($GLOBALS['db_type'], $GLOBALS['db_username'], $GLOBALS['db_password'],\n $GLOBALS['db_host'], $GLOBALS['db_name'], $GLOBALS['db_port'],\n $GLOBALS['tmpdb_type'], $GLOBALS['tmpdb_username'], $GLOBALS['tmpdb_password'],\n $GLOBALS['tmpdb_host'], $GLOBALS['tmpdb_name'], $GLOBALS['tmpdb_port'])) {\n $realDbParams = [\n 'driver' => $GLOBALS['db_type'],\n 'user' => $GLOBALS['db_username'],\n 'password' => $GLOBALS['db_password'],\n 'host' => $GLOBALS['db_host'],\n 'dbname' => $GLOBALS['db_name'],\n 'port' => $GLOBALS['db_port']\n ];\n $tmpDbParams = [\n 'driver' => $GLOBALS['tmpdb_type'],\n 'user' => $GLOBALS['tmpdb_username'],\n 'password' => $GLOBALS['tmpdb_password'],\n 'host' => $GLOBALS['tmpdb_host'],\n 'dbname' => $GLOBALS['tmpdb_name'],\n 'port' => $GLOBALS['tmpdb_port']\n ];\n\n $realConn = \\Doctrine\\DBAL\\DriverManager::getConnection($realDbParams);\n\n $platform = $realConn->getDatabasePlatform();\n\n if ($platform->supportsCreateDropDatabase()) {\n\n $dbname = $realConn->getDatabase();\n // Connect to tmpdb in order to drop and create the real test db.\n $tmpConn = \\Doctrine\\DBAL\\DriverManager::getConnection($tmpDbParams);\n $realConn->close();\n\n $tmpConn->getSchemaManager()->dropDatabase($dbname);\n $tmpConn->getSchemaManager()->createDatabase($dbname);\n\n $tmpConn->close();\n } else {\n\n $sm = $realConn->getSchemaManager();\n\n /* @var $schema Schema */\n $schema = $sm->createSchema();\n $stmts = $schema->toDropSql($realConn->getDatabasePlatform());\n\n foreach ($stmts AS $stmt) {\n try {\n $realConn->exec($stmt);\n } catch (\\Exception $e) {\n // TODO: Now is this a real good idea?\n }\n }\n }\n\n $conn = \\Doctrine\\DBAL\\DriverManager::getConnection(array_merge(['wrapperClass' => 'Pagekit\\Database\\Connection'], $realDbParams), null, null);\n } else {\n $params = [\n 'driver' => 'pdo_sqlite',\n 'memory' => true\n ];\n if (isset($GLOBALS['db_path'])) {\n $params['path'] = $GLOBALS['db_path'];\n unlink($GLOBALS['db_path']);\n }\n $conn = \\Doctrine\\DBAL\\DriverManager::getConnection(array_merge(['wrapperClass' => 'Pagekit\\Database\\Connection'], $params));\n }\n\n return $conn;\n }", "protected function getConnection()\n {\n $host = DB_HOST;\n $dbName = DB_NAME;\n $dbUser = DB_USER;\n $dbPass = DB_PASS;\n // mysql\n $dsn = 'mysql:host=' . $host . ';dbName=' . $dbName;\n $db = new \\PDO($dsn, $dbUser, $dbPass);\n $connection = $this->createDefaultDBConnection($db, $dbName);\n return $connection;\n }", "function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "public static function createConnection()\n {\n self::$conn = new mysqli(self::$db_server,self::$db_username, \n \t\tself::$db_password, self::$db_name);\n if(mysqli_connect_errno())//error connecting\n {\n echo(\"error connecting\");\n return null;\n }\n return self::$conn;\n }", "private static function connect() {\n try {\n $db = new PDO(\n \"mysql:host=\" . DB_HOST . \";dbname=\" . DB_NAME,\n DB_USER, DB_PASS\n );\n }\n catch (Exception $e) {\n $this->error_msg = \"There was a problem connecting to the database.\" . $e->getMessage();\n $db = null;\n }\n\n return $db;\n }", "public static function connect() {\n $databaseConfig = Config::getDatabase();\n $databaseClass = $databaseConfig['class'];\n $databaseFile = SRC.'lib/db/databases/'.$databaseClass.'.php';\n if (!file_exists($databaseFile)) {\n throw new SynopsyException(\"Database class file '$databaseFile' doesn't exist!\");\n }\n require_once($databaseFile);\n $c = \"\\Synopsy\\Db\\Databases\\\\$databaseClass\";\n self::$instance = new $c();\n if (!self::$instance instanceof DatabaseInterface) {\n throw new SynopsyException(\"Database class '$databaseClass' doesn't implement DatabaseInterface interface!\");\n }\t\n self::$instance->connect($databaseConfig);\n }", "private function openconnection(){\r\n $options = array(\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\r\n\r\n // PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n // PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n // PDO::ATTR_EMULATE_PREPARES => false,\r\n );\r\n try{\r\n $this->db = new PDO('mysql' . ':host=' . DBHOST . DBPORT . ';dbname=' . DBNAME.';charset='.CHARSET, DBUSER, DBPASS, $options);\r\n } catch (Exception $e) {\r\n throw new Exception($e->getMessage(), (int)$e->getCode());\r\n }\r\n }", "public function connect() {\n if (!$this->connected()) {\n tenant_connect(\n $this->db_name\n );\n }\n }", "public function getConnection(){\n $this->conn = null;\n \n $this->connection = \"host=\".$this->host.\" \";\n $this->connection .= \"port=\".$this->db_port.\" \";\n $this->connection .= \"dbname=\".$this->db_name.\" \";\n $this->connection .= \"user=\".$this->db_user.\" \";\n $this->connection .= \"dbname=\".$this->db_name.\" \";\n $this->connection .= \"password=\".$this->db_pass.\"\";\n \n try{\n $this->conn = pg_connect($this->connection) or die('Fail to connect');\n \n }catch (Exception $e){\n echo $e->getTraceAsString();\n $msg = \"[ERR] Falló al conectar con la BD. Error: \".$e.\" Fecha: \".$GLOBALS['date'].\"\\n\";\n errorLog($msg);\n \n }\n ## 3 more checks\n if(!$this->conn){\n $msg = \"[ERR] Error con la conexion en la base de datos \".$GLOBALS['date']. \"\\n\";\n errorLog($msg);\n print \"<h2 style=\\\"color:red;\\\">\".$msg.\"</h2>\";\n }\n \n $check2 = pg_get_result($this->conn);\n echo pg_result_error($check2);\n \n $check3 = pg_connection_status($this->conn);\n if ($check3 === PGSQL_CONNECTION_OK){\n $msg = \"[INFO] Connect to Database established \".$GLOBALS['date'].\"\\n\";\n controlLog($msg);\n }\n return $this->conn;\n\n }", "public function connect() {\n if ($this->db === null) {\n $this->db = new PDO($this->db_dsn, $this->db_user, $this->db_pass);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n\n if ($this->db_schema !== null && $this->db_schema !== '') {\n $this->db->exec('SET search_path = ' . $this->db_schema . ', public');\n }\n\n return $this->db;\n }", "function connect()\n\t{\n\t\t// For the shake of Windows users, I'll try persistent connections first, or reusing an existing connection\n\t\t// Ref: http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html#can-not-connect-to-server-on-windows\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t$this->handle = false;\n\t\t\t\tif( function_exists('mysql_pconnect') )\n\t\t\t\t\t$this->handle = @mysql_pconnect($this->dbhost, $this->dbuser, $this->dbpass);\n\t\t\t\tif($this->handle === false)\n\t\t\t\t\t$this->handle = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpass, false);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\t$this->handle = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpass);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif($this->handle === false)\n\t\t{\n\t\t\t// @todo Translate\n\t\t\t$this->error = 'Could not connect to MySQL server';\n\t\t\treturn false;\n\t\t}\n\n\t\t// MySQL Connection Parameters\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t$result = @mysql_query(\"SET NAMES 'utf8'\", $this->handle);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\t$result = @mysqli_query($this->handle, \"SET NAMES 'utf8'\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Select database\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t$result = @mysql_select_db($this->dbname, $this->handle);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\t$result = @mysqli_select_db($this->handle, $this->dbname);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(!$result)\n\t\t{\n\t\t\t// Database does not exist. Let's try create it.\n\t\t\tswitch($this->dbtype)\n\t\t\t{\n\t\t\t\tcase 'mysql':\n\t\t\t\t\t$result = @mysql_query('CREATE DATABASE `'.$this->dbname.'`');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'mysqli':\n\t\t\t\t\t$result = @mysqli_query($this->handle, 'CREATE DATABASE `'.$this->dbname.'`');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Check if the database was created\n\t\t\tif(!$result)\n\t\t\t{\n\t\t\t\t// @todo Translate\n\t\t\t\t$this->error = 'Could not select the '.$this->dbname.' database.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Now that it's created, select it\n\t\t\tswitch($this->dbtype)\n\t\t\t{\n\t\t\t\tcase 'mysql':\n\t\t\t\t\t$result = @mysql_select_db($this->dbname, $this->handle);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'mysqli':\n\t\t\t\t\t$result = @mysqli_select_db($this->handle, $this->dbname);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Check if the database was selected\n\t\t\tif(!$result)\n\t\t\t{\n\t\t\t\t// @todo Translate\n\t\t\t\t$this->error = 'Could not select the '.$this->dbname.' database.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t@mysql_query(\"SET NAMES 'utf8'\", $this->handle);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\t@mysqli_query($this->handle,\"SET NAMES 'utf8'\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn true;\n\t}", "function getConnection() {\n // 1. create connection obj\n $con = new mysqli($this->host, $this->id, $this->pw, $this->dbName);\n\n // 2. check\n if($con->connect_errno) {\n return false;\n }\n\n return $con;\n }", "protected function createConnection()\n\t{\n\t\t$arrHosts = $this->config['hosts'];\n\t\tif(empty($arrHosts))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$mysqli = mysqli_init();\n\t\t$intTimeoutSec = $this->config['timeout'] > 3 ? 3 : $this->config['timeout'];\n\t\tmysqli_options($mysqli, MYSQLI_OPT_CONNECT_TIMEOUT, $intTimeoutSec);\n\t\tmysqli_options($mysqli, 11, 1); //READ_TIMEOUT\n\t\tmysqli_options($mysqli, 12, 1); //WRITE_TIMEOUT\n\n\t\t$host = $arrHosts[0];\n\n\t\t$bolRet = @mysqli_real_connect($mysqli,$host,$this->config['username'],$this->config['password'],$this->dbname,$this->config['port']);\n\n\t\tif($errno = mysqli_connect_errno())\n\t\t{\n\t\t\t$this->lastErrno = $errno;\n\t\t\t$this->lastErrmsg = mysqli_connect_error();\n\t\t\t$this->lastIP = $host;\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->lastErrno = 0;\n\t\t\t$this->lastErrmsg = '';\n\t\t\t$this->lastIP = $host;\n\n\t\t\tmysqli_set_charset($mysqli, 'utf8');\n\t\t\treturn $mysqli;\n\t\t}\n\n\t\tmysqli_close($mysqli);\n\t\treturn false;\n\t}", "public function open_db_connection() {\n //$this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n //the more \"object oriented\" way of doing this is this next line:\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n if( $this->connection->connect_errno ) {\n die(\"Database connection failed badly\" . $this->connection->connect_error);\n }\n\n }", "public static function open_db_connection(){\r\n self::$connection = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\r\n\t\t}", "function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}", "public function getConnection() {\n if (is_null($this->connection)){\n try {\n if ($this->dbtype == 'mysql') {\n $this->connection = new PDO($this->buildMysqlConnectionString(), $this->user, $this->password);\n }\n return $this->connection;\n } catch (Exception $e) {\n echo \"[Fail!] \" . $e->getMessage() . \"\\n\";\n return False;\n }\n } \n }", "private function connect()\n {\n // Try\n try {\n // Create SQLite3\n $this->connection = new SQLite3(Constants::path_storage.'/Database/' . $this->file_name . '.db');\n } catch (Exception $ex) {\n // Return warning\n ErrorHandler::die(102, 'No database connection. Does to file exists? Error: ' . $ex->getMessage());\n }\n }", "function connect()\n {\n switch ($this->engine)\n {\n case \"mysql\":\n $this->connection\n = mysql_pconnect($this->host, $this->user, $this->passwd);\n if ($this->connection)\n {\n $this->resetError();\n return true;\n }\n else\n {\n $this->setError(\n \"Could not connect to the database server.\",\n \"connect #001\"\n );\n return false;\n }\n break;\n }\n }", "private function connectDBs()\n {\n // the object in the first place, and also to recreate the connections when we're woken up.\n $this->memcached = new \\Memcached();\n $this->memcached->addServer($this->environment['MEMCACHEDSERVER'], $this->environment['MEMCACHEDPORT']);\n if (!$this->memcached->set('Test', time())) {\n throw new \\Exception('REMOMTE ' . $this->memcached->getResultMessage());\n }\n\n $this->localmemcached = new \\Memcached();\n $this->localmemcached->addServer('/tmp/memcached.sock', '0');\n if (!$this->localmemcached->set('Test', time())) {\n throw new \\Exception('LOCAL ' . $this->localmemcached->getResultMessage());\n }\n\n $this->redis = new \\Redis();\n $this->redis->connect($this->environment['REDISSERVER'], $this->environment['REDISPORT']);\n\n $this->db = new \\mysqli(\n $this->environment['MYSQLSERVER'],\n $this->environment['MYSQLUSER'],\n $this->environment['MYSQLPASSWORD'],\n $this->environment['MYSQLDATABASE']\n );\n\n $this->sqlite = new \\SQLite3($this->sqlitedb);\n\n $this->api = new Client(); // Guzzle client\n\n $this->cURL = curl_init($this->environment['APIURI']);\n $version = curl_version();\n curl_setopt_array($this->cURL, [CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HEADER, false,\n CURLOPT_USERAGENT => \"cURL/$version[version] PHP/\" . PHP_VERSION,\n ]);\n }", "public function connect() {\n\t\t$cnn_string = 'host='.$this->_dbhost.' port='.$this->_dbport.' user='.$this->_dbuser.' password='.$this->_dbpass.' dbname='.$this->_dbname;\n\t\t\n\t\t$this->_instance = pg_connect($cnn_string) or PK_debug(__FUNCTION__, \"No se ha podido conectar con la DB\\n\\n\".pg_errormessage(), array('class'=>'error'));\n\t\t\n\t\tif (!$this->_instance) {\n\t\t\techo '<h1>Error en la aplicacion</h1><p>No se ha podido conectar con la base de datos</p>';\n\t\t\tPK_debug('', '', 'output');\n\t\t\texit();\n\t\t}\n\t\t\n\t\treturn $this->_instance;\n\t}", "public function connect() {\n\n\t\t$db_info_string = $this->_db_info[0]. ':host=' . $this->_db_info[1] . ';';\n\t\t$db_info_string .= 'dbname='. $this->_db_info[4]; \n\n\t\ttry {\n\t\t\t$this->_db = new pdo($db_info_string, $this->_db_info[2], $this->_db_info[3] );\n\n\t\t//set Error mode to send out exceptions\n\t\t$this->_db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); \n\n\t\t} catch (PDOException $e) {\n\t\t\t//TODO Custom error reporting\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t\t//TODO ATTEMPT TO CONNECT, IF PDO OBJECT CANNOT BE CREATED, return \n\t\t//false and use custome error reporting\n\t\t//TRY, CATCH that jazz tooo\n\t\t\n\t\t//Returns the object so that it can be chained\n\t\treturn $this;\n }", "public final function getConnection() {\n\t\t//If the connection has not been established yet, create it\n\t\tif($this->connection === null) {\n\t\t\t//connect to mySQL and provide the interface to PHPUnit\n\n\t\t\t$config = readConfig(\"/etc/apache2/capstone-mysql/jpegery.ini\");\n\t\t\t$pdo = connectToEncryptedMySQL(\"/etc/apache2/capstone-mysql/jpegery.ini\");\n\t\t\t$this->connection = $this->createDefaultDBConnection($pdo, $config[\"database\"]);\n\t\t}\n\t\treturn($this->connection);\n\t}", "public function open_db_connection(){\n\n // refer to this class connection -> procedural way\n // $this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // refer to this class connection -> oriented way\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // when error occurs during attempt of database connection\n // if(mysqli_connect_errno()){\n\n // when error occurs during attempt of database connection\n // using connect_errno is a build in function from mysqli\n if($this->connection->connect_errno){ \n // exit with message and error\n // using connect_errno is a build in function from mysqli\n die(\"Database connection failed badly!\" . $this->connection->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 }", "public static function connect()\n {\n // Only connect if we don't have a handle on the database\n if (!is_null(self::$_db))\n return self::$_db;\n \n try\n {\n // DSN FORMAT: \"mysql:host=localhost;dbname=test\"\n $dsn = Config::get('Database', 'Driver') . ':host=' . Config::get('Database', 'DBHost') . ';dbname=' . Config::get('Database', 'DB');\n self::$_db = new PDO($dsn, Config::get('Database','Username'), Config::get('Database','Password'), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n self::$_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch (PDOException $e)\n {\n throw new DaoException(\"Error (Dao::connect): \" . $e->getMessage());\n }\n }", "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 }", "protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }", "public function open_conn(){\n \n \n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n \n if(!$this->connection){\n die(\"Database Connection Failed because: \" . mysql_error());\n }else{\n $db_select = mysql_select_db(DB_NAME,$this->connection);\n if(!$db_select){\n die(\"Database Connection Failed because: \" .mysql_error());\n }\n }\n }", "public function getConnection () {\n $this->conn = null;\n \n try {\n $this->conn = new mysqli(self::$db_host, self::$db_user, self::$db_pass, $this->db_name);\n echo 'connected to the db :DDD';\n } catch (mysqli_sql_exception $exception) {\n echo \"Connection error: \" . $exception->getMessage();\n }\n return $this->conn;\n }", "private function dbConnect(){\n $database=new \\Database();\n return $database->getConnection();\n }", "abstract public function OpenConnection( $user, $pass, $ip, $port, $db, $options );", "public function connect()\n {\n if ($this->_connection !== null) {\n throw new LogicException('Connection is already established');\n }\n\n if ($this->_connectionInfo === null) {\n throw new ConfigException('No database connection information specified');\n }\n\n $params = $this->_connectionInfo['dsnParams'];\n $user = $this->_connectionInfo['dbUsername'];\n $pass = $this->_connectionInfo['dbPassword'];\n $driverOptions = $this->_connectionInfo['dbDriverOptions'];\n\n $pdo = new PDO($this->_createDsn($params), $user, $pass, $driverOptions);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $this->setConnection($pdo);\n }", "public function createConnection($db)\n {\n $this->adodb = $db;\n }", "public function getConnection()\n {\n try {\n $servername = config(\"database.connections.mysql.host\");\n $port = config(\"database.connections.mysql.port\");\n $username = config(\"database.connections.mysql.username\");\n $password = config(\"database.connections.mysql.password\");\n $dbname = config(\"database.connections.mysql.database\");\n\n $db = new PDO(\"mysql:host=$servername;port=$port;dbname=$dbname\", $username, $password);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $db;\n } catch (PDOException $e) {\n Log::error(\"Exception: \", array(\n \"message\" => $e->getMessage()\n ));\n throw new DatabaseException(\"Database Exception:\" . $e->getMessage(), 0, $e);\n }\n\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 connect()\n\t{\n\t\tif ($this->_connection)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_null(self::$_set_names))\n\t\t{\n\t\t\t// Determine if we can use mysqli_set_charset(), which is only\n\t\t\t// available on PHP 5.2.3+ when compiled against MySQL 5.0+\n\t\t\tself::$_set_names = ! \\function_exists('mysqli_set_charset');\n\t\t}\n\n\t\t/**\n\t\t * Extract the connection parameters, adding required variables\n\t\t *\n\t\t * @var $database string\n\t\t * @var $hostname string\n\t\t * @var $username string\n\t\t * @var $password string\n\t\t * @var $socket string\n\t\t * @var $port string\n\t\t * @var $persistent boolean\n\t\t */\n\t\textract($this->_config['connection'] + array(\n\t\t\t'database' => '',\n\t\t\t'hostname' => '',\n\t\t\t'username' => '',\n\t\t\t'password' => '',\n\t\t\t'socket' => '',\n\t\t\t'port' => 3306,\n\t\t\t'persistent' => FALSE,\n\t\t));\n\n\t\t// Prevent this information from showing up in traces\n\t\tunset($this->_config['connection']['username'], $this->_config['connection']['password']);\n\n\t\ttry\n\t\t{\n\t\t\tif ($persistent == TRUE)\n\t\t\t{\n\t\t\t\t// See http://www.php.net/manual/en/mysqli.persistconns.php\n\t\t\t\t$this->_connection = new \\MySQLi('p:'.$hostname, $username, $password, $database, (int)$port, $socket);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_connection = new \\MySQLi($hostname, $username, $password, $database, (int)$port, $socket);\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t// No connection exists\n\t\t\t$this->_connection = NULL;\n\n\t\t\tthrow new ConnectionException($e->getMessage(), $e->getCode());\n\t\t}\n\n\t\t// \\xFF is a better delimiter, but the PHP driver uses underscore\n\t\t$this->_connection_id = \\sha1($hostname.'_'.$username.'_'.$password);\n\n\t\tif ( ! empty($this->_config['charset']))\n\t\t{\n\t\t\t// Set the character set\n\t\t\t$this->set_charset($this->_config['charset']);\n\t\t}\n\n\t\tif ( ! empty($this->_config['connection']['variables']) AND is_array($this->_config['connection']['variables']))\n\t\t{\n\t\t\t// Set session variables\n\t\t\t$variables = array();\n\n\t\t\tforeach ($this->_config['connection']['variables'] as $var => $val)\n\t\t\t{\n\t\t\t\t$variables[] = 'SESSION '.$var.' = '.$this->quote($val);\n\t\t\t}\n\n\t\t\t$this->_connection->query('SET '.\\implode(', ', $variables));\n\t\t}\n\t}", "private function _connect()\n {\n Horde::assertDriverConfig($this->_params, 'storage',\n array('phptype', 'charset'));\n\n if (!isset($this->_params['database'])) {\n $this->_params['database'] = '';\n }\n if (!isset($this->_params['username'])) {\n $this->_params['username'] = '';\n }\n if (!isset($this->_params['hostspec'])) {\n $this->_params['hostspec'] = '';\n }\n if (isset($this->_params['prefix'])) {\n $this->prefix = $this->_params['prefix'];\n }\n\n /* Connect to the SQL server using the supplied parameters. */\n require_once 'DB.php';\n $this->write_db = &DB::connect($this->_params,\n array('persistent' => !empty($this->_params['persistent'])));\n if ($this->write_db instanceof PEAR_Error) {\n throw new Horde_Exception($this->write_db);\n }\n\n // Set DB portability options.\n switch ($this->write_db->phptype) {\n case 'mssql':\n $this->write_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);\n break;\n default:\n $this->write_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);\n }\n\n /* Check if we need to set up the read DB connection seperately. */\n if (!empty($this->_params['splitread'])) {\n $params = array_merge($this->_params, $this->_params['read']);\n $this->db = &DB::connect($params,\n array('persistent' => !empty($params['persistent'])));\n if ($this->db instanceof PEAR_Error) {\n throw new Horde_Exception($this->db);\n }\n\n // Set DB portability options.\n switch ($this->db->phptype) {\n case 'mssql':\n $this->db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);\n break;\n default:\n $this->db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);\n }\n\n } else {\n /* Default to the same DB handle for the writer too. */\n $this->db =& $this->write_db;\n }\n\n return true;\n }", "public function connect()\n\t\t{\tif (! isset($this->link))\n\t\t\t{\ttry\n\t\t\t\t{\tif (! $this->link = mysql_connect($this->host, $this->user, $this->pass))\n\t\t\t\t\t\tthrow new Exception(\"Cannot connect to \" . $this->host);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\techo $e->getMessage();\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\t$this->disconnect();\n\t\t\t\t$this->connect();\n\t\t\t}\n\t\t}", "protected function connect() {\n $db = Config::config()['user']['database'];\n\n if ($db['enabled']) {\n switch ($db['driver']) {\n case 'pdo' :\n $options = [Pdo::ATTR_STATEMENT_CLASS => ['\\Gcs\\Framework\\Core\\Pdo\\PdoStatement', []]];\n\n switch ($db['type']) {\n case 'mysql':\n try {\n $this->db = new Pdo('mysql:host=' . $db['hostname'] . ';dbname=' . $db['database'], $db['username'], $db['password'], $options);\n //self::$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->db->exec('SET NAMES ' . strtoupper($db['charset']));\n }\n catch (\\PDOException $e) {\n throw new MissingDatabaseException($e->getMessage() . ' / ' . $e->getCode() . ' / ' . $e->getFile());\n }\n break;\n\n case 'pgsql':\n try {\n $this->db = new Pdo('mysql:host=' . $db['hostname'] . ';dbname=' . $db['database'], $db['username'], $db['password'], $options);\n //self::$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->db->exec('SET NAMES ' . strtoupper($db['charset']));\n }\n catch (\\PDOException $e) {\n throw new MissingDatabaseException($e->getMessage() . ' / ' . $e->getCode());\n }\n break;\n\n default :\n throw new MissingDatabaseException(\"Can't connect to SQL Database because the driver is not supported\");\n break;\n }\n break;\n\n default :\n throw new MissingDatabaseException(\"Can't connect to SQL Database because the API is unrecognized\");\n break;\n }\n\n return $this->db;\n }\n else {\n return null;\n }\n }", "private function open_db_connection(){\n $this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME) \n or\n die(\"database connection failed\" . $this->connection->connect_error);\n \n }", "private function databaseConnection()\n {\n // connection already opened\n if ($this->db_connection != null) {\n return true;\n } else {\n // create a database connection, using the constants from config/config.php\n try {\n // Generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n // Also important: We include the charset, as leaving it out seems to be a security issue:\n // @see http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers#Connecting_to_MySQL says:\n // \"Adding the charset to the DSN is very important for security reasons,\n // most examples you'll see around leave it out. MAKE SURE TO INCLUDE THE CHARSET!\"\n $this->db_connection = new PDO(\"pgsql:host=\".DB_HOST.\" port=\".DB_PORT.\" dbname=\".DB_NAME.\" user=\".DB_USER.\" password=\".DB_PASS.\"\");\n return true;\n // If an error is catched, database connection failed\n } catch (PDOException $e) {\n $this->errors[] = MESSAGE_DATABASE_ERROR;\n return false;\n }\n }\n }", "public function connect()\r\n\t{\r\n\t\t$conn_string = \"DATABASE=\".$this->dbname.\";HOSTNAME=\".$this->host.\";PORT=\".$this->port.\";PROTOCOL=TCPIP;UID=\".$this->user.\";PWD=\".$this->pwd.\";\";\r\n\t\t$this->conn = db2_connect($conn_string, '', '');\r\n\t\t\r\n\t\tif( !$this->conn ) \r\n\t\t\ttrigger_error( db2_conn_errormsg(), E_USER_ERROR );\r\n\t\t\r\n\t\treturn $this->conn;\r\n\t}", "protected static function getDatabaseConnection() {}", "protected static function getDatabaseConnection() {}", "protected static function getDatabaseConnection() {}" ]
[ "0.7243579", "0.70972335", "0.7070726", "0.70526016", "0.7036345", "0.7028448", "0.7019534", "0.7002239", "0.6998557", "0.69977087", "0.69874656", "0.6850509", "0.68504703", "0.6839003", "0.6786968", "0.67780364", "0.6776965", "0.6774585", "0.67694515", "0.6763749", "0.6757692", "0.6723827", "0.6722915", "0.6720018", "0.67125833", "0.66893804", "0.6688767", "0.6681047", "0.66810405", "0.6679606", "0.6671311", "0.6628771", "0.6627619", "0.66234803", "0.66125965", "0.661256", "0.661174", "0.66005975", "0.6596075", "0.6591336", "0.6583468", "0.6583199", "0.65684986", "0.6557789", "0.6551594", "0.6551491", "0.6548946", "0.6543744", "0.6541481", "0.6533345", "0.6532628", "0.65257794", "0.6519325", "0.6517802", "0.6496501", "0.64924073", "0.64903086", "0.6478333", "0.6475501", "0.6471361", "0.6471068", "0.64706933", "0.64683944", "0.64669245", "0.6464458", "0.6462772", "0.6457853", "0.6457344", "0.6456598", "0.64479536", "0.64422214", "0.6439685", "0.64377326", "0.6435668", "0.6430255", "0.64281", "0.6425209", "0.64226425", "0.64214337", "0.6417949", "0.64115757", "0.64106756", "0.6404715", "0.64039266", "0.63902575", "0.63870114", "0.6381097", "0.6379832", "0.6378493", "0.6376897", "0.63763416", "0.63744265", "0.6368818", "0.6364956", "0.6364158", "0.63602114", "0.6359523", "0.63438994", "0.634334", "0.6340145", "0.6340145" ]
0.0
-1
Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.
public function getSchemaManager(Connection $conn) { return $this->wrappedDriver($conn)->getSchemaManager($conn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDoctrineSchemaManager()\n {\n return $this->getDoctrineDriver ()->getSchemaManager ( $this->getDoctrineConnection () );\n }", "public static function getDoctrineSchemaManager()\n {\n }", "public function createSchemaManager(): AbstractSchemaManager\n {\n return $this->schemaManagerFactory->createSchemaManager($this);\n }", "public function getSchema()\n\t{\n\t\tswitch($this->driver)\n\t\t{\n\t\t\tcase 'pgsql':\n\t\t\t\treturn new Schema\\PostgreSQL($this->c, $this->i);\n\t\t\tcase 'mysql':\n\t\t\t\treturn new Schema\\MySQL($this->c, $this->i);\n\t\t\tcase 'sqlite':\n\t\t\t\treturn new Schema\\SQLite($this->c, $this->i);\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('A Migration driver for ' . $this->driver . ' has not be created');\n\t\t}\n\t}", "public function getSchema()\n {\n if ($this->schema === null) {\n $this->getSchemaTables();\n }\n\n return $this->schema;\n }", "public function getDatabaseManager(): DatabaseManager\n {\n return $this->manager;\n }", "public function getDBManagerHandler(): DatabaseManager\n {\n if (empty($this->dbManager)) {\n $this->dbManager = new DatabaseManager(Config::get('database'), new ConnectionFactory());\n }\n return $this->dbManager;\n }", "public function getSchema() {\n return Cool::getInstance()->getSchema($this->databaseName);\n }", "public function getSchema(): Schema\n {\n if ($this->_schema === null) {\n $this->_schema = $this->_initializeSchema($this->getWebservice()->describe($this->getName()));\n }\n\n return $this->_schema;\n }", "public function getSchema(): Schema\n {\n if ($this->schema === null) {\n $this->schema = new Schema($this);\n }\n\n return $this->schema;\n }", "public function getDatabasePlatform()\n {\n if ($this->platform === null) {\n $this->platform = $this->detectDatabasePlatform();\n $this->platform->setEventManager($this->_eventManager);\n }\n\n return $this->platform;\n }", "public function getDBManagerHandler()\n {\n\t\tif (empty($this->dbManager)) {\n\t\t\t$this->dbManager = new DatabaseManager($this->config['database'], new ConnectionFactory());\n\t\t}\n\t\treturn $this->dbManager;\n\t}", "public function getSchemaManager(Connection $conn)\n {\n return new \\Doctrine\\DBAL\\Schema\\SQLServerSchemaManager($conn);\n }", "public function getSchema()\n {\n if ($this->schema) {\n return $this->schema;\n }\n\n return $this->schema = resolve(Bakery::getModelSchema($this));\n }", "public function getSchema()\n {\n return $this->get(self::SCHEMA);\n }", "protected function _getSchema() {\n\t\treturn $this->__schema;\n\t}", "public function get_schema() {\n\t\treturn $this->schema;\n\t}", "private function getDatabaseManager()\n {\n $file = require __DIR__ . '/../../src/settings.php';\n $dbSettings = $file['settings']['db'];\n\n $capsule = new \\Illuminate\\Database\\Capsule\\Manager;\n $capsule->addConnection($dbSettings);\n $capsule->setAsGlobal();\n $capsule->bootEloquent();\n return $capsule->getDatabaseManager();\n }", "protected function getSchemaBuilder()\n {\n return $this->getConnection()->getSchemaBuilder();\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getConnectorManager()\n {\n if (empty($this->connectorManger)) {\n $this->connectorManager = new ConnectorManager();\n }\n return $this->connectorManager;\n }", "public function guessSchemaName()\n {\n return $this->schema ?: $this->database->getSchema();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "public function getSchema($force = false)\n {\n if ($force || !$this->schema) {\n $this->schema = new DatabaseSchema();\n $this->loadInformationSchema();\n }\n\n return $this->schema;\n }", "public function getSchemaBuilder(): SchemaBuilder\n {\n return $this->getContainer()[SchemaBuilder::class];\n }", "public function getSchemaBuilder()\n\t{\n return $this->neoeloquent->getSchemaBuilder();\n\t}", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new SchemaBuilder($this);\n }", "public function schema()\n\t{\n\t\treturn $this->schema;\n\t}", "public function getSchema()\n {\n if (empty($this->schema)) {\n return 'public';\n } else {\n return $this->schema;\n }\n }", "public function getSchemaTables()\n {\n if ($this->schemaTables !== null) {\n return $this->schemaTables;\n }\n $builder = $this->app['schema.builder'];\n\n /** @deprecated Deprecated since 3.0, to be removed in 4.0. */\n $builder['extensions']->addPrefix($this->app['schema.prefix']);\n\n $schema = new Schema();\n $tables = array_merge(\n $builder['base']->getSchemaTables($schema),\n $builder['content']->getSchemaTables($schema, $this->config),\n $builder['extensions']->getSchemaTables($schema)\n );\n $this->schema = $schema;\n\n return $this->schemaTables = $tables;\n }", "private function resolveSchema() : Schema\n {\n return resolve('Schema');\n }", "public function getSchemaName()\n {\n return $this->getTable()->getSchema()->getName();\n }", "public function getSchemaName()\n {\n return $this->schemaName;\n }", "public function getSchemaName()\n {\n return $this->schemaName;\n }", "public function get_schema()\r\n\t{\r\n\t\t return $this->sql_select_exe('SELECT * FROM sys.Tables', NULL);\r\n\t}", "public function getDatabase()\n {\n\n $this->checkConnection();\n return $this->database;\n }", "public static function getDatabaseManager($reset = false)\n {\n if ($reset) {\n self::reset();\n }\n if (empty(self::$dbm)) {\n $dbConfig = SugarConfig::getDatabaseConfiguration();\n $dbmClassName = $dbConfig['dbManagerClassName'];\n $dbmClassPath = $dbConfig['dbManagerClassPath'];\n $dbmFileName = \"{$dbmClassPath}/{$dbmClassName}.php\";\n if (file_exists($dbmFileName)) {\n include_once($dbmFileName);\n }\n self::$dbm = SugarClassLoader::getInstance($dbmClassName);\n self::$dbm->dbConfig = $dbConfig;\n self::$dbm->connect();\n }\n return self::$dbm;\n }", "public function getSchema(): SchemaInterface;", "public function getDatabasePlatform()\n {\n return new RESTPlatform();\n }", "public function getSchemaType(): string\n {\n /** @var CubridSchema|MssqlSchema|MysqlSchema|OciSchema|PgsqlSchema|SqliteSchema $schema */\n $schema = $this->db->getSchema();\n return Schema::identifySchema($schema);\n }", "public function getSchemaType()\n {\n return $this->schemaType;\n }", "public function getDatabase()\r\n {\r\n return $this->connector->getBusinessDatabase();\r\n }", "public function getMetadataSchema()\n {\n return isset($this->metadata_schema) ? $this->metadata_schema : null;\n }", "protected function getPlatform()\n {\n if (null === $this->platform) {\n $this->platform = new MysqlPlatform();\n\n $configFileContent = <<<EOF\npropel:\n database:\n connections:\n bookstore:\n adapter: mysql\n classname: \\Propel\\Runtime\\Connection\\DebugPDO\n dsn: mysql:host=127.0.0.1;dbname=test\n user: root\n password:\n adapters:\n mysql:\n tableType: InnoDB\n\n generator:\n defaultConnection: bookstore\n connections:\n - bookstore\n\n runtime:\n defaultConnection: bookstore\n connections:\n - bookstore\nEOF;\n\n $file = $this->newFile('propel.yaml', $configFileContent);\n $config = new GeneratorConfig($file->url());\n\n $this->platform->setGeneratorConfig($config);\n }\n\n return $this->platform;\n }", "public function GetDefaultSchema() {\n if ($cache = fastcache::cache_get('default_schema', 'schema')) {\n $this->defaultSchema = $cache->data;\n return $this->defaultSchema;\n }\n $result = $this->connection->query_direct(\"SELECT SCHEMA_NAME()\")\n ->fetchField();\n fastcache::cache_set('default_schema', $result, 'schema');\n $this->defaultSchema = $result;\n return $this->defaultSchema;\n }", "public function getPlatform()\n {\n return $this->database ? $this->database->getPlatform() : null;\n }", "public function schemas()\n {\n return $this->schemas;\n }", "public function get_schemas()\n\t{\n\t\treturn NULL;\n\t}", "public function getSchemaManager(Connection $conn)\n {\n // TODO: Implement getSchemaManager() method.\n }", "public function getDatabaseConnectorInstance() {\n return new DatabaseConnector($this->config['general']['db']);\n }", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); }\n\n //return new Schema\\Builder($this);\n return new FBBuilder($this);\n }", "public function getSchemaBuilder()\n {\n return new Schema\\Builder($this);\n }", "public function schemaProviderProphecyFactory() {\n return $this->schemaProvider->reveal();\n }", "public function db(){\n\treturn Manager::getManager($this);\n }", "public function getSchema(): Schema;", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new Schema\\Builder($this);\n }", "public function getSchemaBuilder()\n {\n if ($this->schemaGrammar === null) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new Builder($this);\n }", "protected function getDatabaseConnection( )\n {\n if( sfConfig::get('sf_use_database') )\n {\n try\n {\n return Doctrine_Manager::connection();\n }\n catch( Doctrine_Connection_Exception $e )\n {\n new sfDatabaseManager(sfContext::getInstance()->getConfiguration());\n return Doctrine_Manager::connection();\n }\n }\n\n return null;\n }", "private function detectDatabasePlatform(): AbstractPlatform\n {\n $version = $this->getDatabasePlatformVersion();\n\n if ($version !== null) {\n assert($this->_driver instanceof VersionAwarePlatformDriver);\n\n return $this->_driver->createDatabasePlatformForVersion($version);\n }\n\n return $this->_driver->getDatabasePlatform();\n }", "public function getSchemaBuilder()\n {\n if ( is_null ( $this->schemaGrammar ) ) {\n $this->useDefaultSchemaGrammar ();\n }\n return new Schema\\Builder ( $this );\n }", "public function getSchemaPath() : string\n {\n return $this->schema;\n }", "public function getDatabase()\n\t{\n\t\tif (is_null($this->database))\n\t\t{\n\t\t\t$this->database = DatabaseDriver::getInstance(\n\t\t\t\tarray(\n\t\t\t\t\t'driver' => $this->config->get('dbtype'),\n\t\t\t\t\t'host' => $this->config->get('host'),\n\t\t\t\t\t'user' => $this->config->get('user'),\n\t\t\t\t\t'password' => $this->config->get('password'),\n\t\t\t\t\t'database' => $this->config->get('db'),\n\t\t\t\t\t'prefix' => $this->config->get('dbprefix')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// @todo Decouple from Factory\n\t\t\tFactory::$database = $this->database;\n\t\t}\n\n\t\treturn $this->database;\n\t}", "public function getPlatform()\n {\n return $this->getTable()->getDatabase()->getPlatform();\n }", "public function getSchemas() {\r\n\t\t$objSelectQuery = new SQLTableSelectStatement(\"INFORMATION_SCHEMA.SCHEMATA\");\r\n\t\t$objSelectQuery->setColumns(new SQLColumnsClause(array(\"SCHEMA_NAME\")));\r\n\t\t$objSelectQuery->setOrderBy(new SQLOrderByClause(array(\"SCHEMA_NAME\"=>\"ASC\")));\t\t\r\n\t\treturn $this->objDatabaseConnection->createStatement()->execute($objSelectQuery->toString())->toColumn();\r\n\t}", "public function getDocumentManager()\n {\n return $this->getObjectManager();\n }", "public static function schema($connection = null)\n {\n if (!static::$instance) {\n static::setInstance();\n }\n return static::$instance->connection($connection)->getSchemaBuilder();\n }", "public function getPlatform(): AbstractPlatform\n {\n return $this->conn->getDatabasePlatform();\n }", "public static function getDatabase() {\n return self::$PDO;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getMetadataSchemaUri()\n {\n return $this->metadata_schema_uri;\n }", "public function dbSchema( $schema = null ) {\n\t\treturn wfSetVar( $this->mSchema, $schema );\n\t}", "public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) {\n $this->useDefaultSchemaGrammar();\n }\n\n return new MySqlBuilder($this);\n }", "public function getDatabasePlatform()\n {\n return new \\Doctrine\\DBAL\\Platforms\\SQLServer2008Platform();\n }", "public function schemaCompiler(): Schema\\Compiler\n {\n if ($this->schemaCompiler === null) {\n switch ($this->getDriver()) {\n case 'mysql':\n $this->schemaCompiler = new Schema\\Compiler\\MySQL($this);\n break;\n case 'pgsql':\n $this->schemaCompiler = new Schema\\Compiler\\PostgreSQL($this);\n break;\n case 'dblib':\n case 'mssql':\n case 'sqlsrv':\n case 'sybase':\n $this->schemaCompiler = new Schema\\Compiler\\SQLServer($this);\n break;\n case 'sqlite':\n $this->schemaCompiler = new Schema\\Compiler\\SQLite($this);\n break;\n case 'oci':\n case 'oracle':\n $this->schemaCompiler = new Schema\\Compiler\\Oracle($this);\n break;\n default:\n throw new \\Exception('Schema not supported yet');\n }\n\n $this->schemaCompiler->setOptions($this->schemaCompilerOptions);\n }\n\n return $this->schemaCompiler;\n }", "protected function getManagerFactory()\n {\n return $this->container->get(ThuataControllerInterface::MANAGER_FACTORY_ID);\n }", "private function getDBSchema(){\n\n return \\DB::query('\n SELECT table_name \n FROM information_schema.tables\n WHERE table_type=\"BASE TABLE\" AND table_schema=\"'.\\App::config('DB_DB').'\"\n ');\n\n }", "public function getDocumentManager()\n {\n return $this->documentManager;\n }", "public function getDatabaseAdapter()\n {\n return $this->oDatabase;\n }", "protected function getManager()\n {\n return $this->manager;\n }", "public static function get_schema()\n {\n }", "public function read()\r\n {\r\n $dataDict = Doctrine_Manager::getInstance()->getCurrentConnection()->getDataDict();\r\n\r\n $schema = new Doctrine_Schema(); /* @todo FIXME i am incomplete*/\r\n $db = new Doctrine_Schema_Database();\r\n $schema->addDatabase($db);\r\n\r\n $dbName = 'XXtest'; // @todo FIXME where should we get\r\n\r\n $this->conn->set(\"name\",$dbName);\r\n $tableNames = $dataDict->listTables();\r\n foreach ($tableNames as $tableName) {\r\n $table = new Doctrine_Schema_Table();\r\n $table->set(\"name\",$tableName);\r\n $tableColumns = $dataDict->listTableColumns($tableName);\r\n foreach ($tableColumns as $tableColumn) {\r\n $table->addColumn($tableColumn);\r\n }\r\n $this->conn->addTable($table);\r\n if ($fks = $dataDict->listTableConstraints($tableName)) {\r\n foreach ($fks as $fk) {\r\n $relation = new Doctrine_Schema_Relation();\r\n $relation->setRelationBetween($fk['referencingColumn'],$fk['referencedTable'],$fk['referencedColumn']);\r\n $table->setRelation($relation);\r\n }\r\n }\r\n }\r\n\r\n return $schema;\r\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "protected function getPlatform()\n {\n return new MssqlPlatform();\n }", "public function getDocumentSchema()\n {\n return $this->document_schema;\n }", "public function getConnection()\n {\n $eManager = $this->getServiceLocator();\n $entityManager = $eManager->get('doctObjMngr');\n return $entityManager;\n }", "public function getSchema()\n {\n return $this->source;\n }" ]
[ "0.7830292", "0.72777325", "0.7111871", "0.70293283", "0.69350183", "0.68099654", "0.6788647", "0.67662406", "0.67197084", "0.6669377", "0.6640639", "0.6526776", "0.6474924", "0.6411143", "0.6359347", "0.63265806", "0.6326173", "0.6308001", "0.62875336", "0.6284409", "0.6284409", "0.6284409", "0.6284409", "0.6284409", "0.6284409", "0.62692297", "0.6219569", "0.6182961", "0.6182961", "0.6182961", "0.6002802", "0.5994677", "0.59627396", "0.5954132", "0.59421873", "0.5932861", "0.5922628", "0.59164023", "0.5909975", "0.5866069", "0.5820552", "0.5802682", "0.57913256", "0.5786894", "0.5760846", "0.57554185", "0.5754202", "0.5745401", "0.5739844", "0.5719766", "0.57007706", "0.56981903", "0.56902736", "0.5687391", "0.5682527", "0.5659093", "0.5654675", "0.564968", "0.56447226", "0.56378675", "0.5636859", "0.5614971", "0.56116086", "0.5602269", "0.55981535", "0.55775934", "0.5569875", "0.5569447", "0.55682355", "0.55625457", "0.55545455", "0.5549475", "0.5528213", "0.5522313", "0.55205196", "0.5517696", "0.5517696", "0.5517696", "0.5495961", "0.54958785", "0.54911846", "0.54784966", "0.54771525", "0.5476671", "0.5473474", "0.546035", "0.54439646", "0.5441957", "0.54419166", "0.5439971", "0.5428671", "0.5428671", "0.5428671", "0.5428671", "0.5428671", "0.5428671", "0.5428231", "0.5420052", "0.54163057", "0.540225" ]
0.6270765
25
Gets the name of the database connected to for this driver.
public function getDatabase(Connection $conn) { return $this->wrappedDriver($conn)->getDatabase($conn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatabaseName()\n {\n return $this->connection->getDatabase();\n }", "public function getDatabaseName(): string\n {\n if (isset($this->database)) {\n return $this->database;\n }\n\n $connection = $this->getConnection();\n $db = $connection->getSelectDb() ?: $connection->getDb();\n // release\n $connection->release();\n\n return $db;\n }", "public static function getDatabaseName()\n {\n global $db;\n return $db->database;\n }", "public function getDatabaseName() {\n\n if (isset($this->database)) {\n return $this->database;\n }\n\n return NULL;\n }", "public function getDatabaseName()\n {\n return $this->settings['db_database'];\n }", "public function database_name()\n\t{\n\t\treturn $this->database_name;\n\t}", "public static function GetDatabaseName() {\n\t\t\treturn QApplication::$Database[Person::GetDatabaseIndex()]->Database;\n\t\t}", "public function getDBname() {\n return $this->dbname;\n }", "public function dbname() {\n return $this->db['dbname'];\n }", "public function getDBName(){\n\n\t\treturn $this->_database;\n\t}", "public static function GetDatabaseName() {\n\t\t\treturn QApplication::$Database[PersonWithLock::GetDatabaseIndex()]->Database;\n\t\t}", "public function getConnectionName()\n {\n return config('telescope.storage.database.connection');\n }", "private function get_DB_name() {\n global $CFG;\n return $CFG->dbname;\n }", "final public function getDBname() {\n \t\treturn $this->dbase;\n }", "public function getDatabaseName()\n {\n return $this->databaseName;\n }", "function dbName()\n\t{\n\t\t$dsn = $this->dsnArray();\n\t\tif (empty($dsn))\n\t\t\treturn null;\n\t\treturn $dsn['dbname'];\n\t}", "public function getDBName()\n {\n return $this->db_name;\n }", "Public Function getDatabaseName() { Return $this->dbname; }", "function dbName()\n{\n\treturn $this->drv->dbName();\n}", "public function getConnectionName()\n {\n return config('profiler.storage.database.connection');\n }", "public static function getDatabaseName()\n {\n }", "public function getDatabaseNameIdentifier()\n {\n return $this->database_name;\n }", "protected function getCurrentDatabase()\n {\n // http://stackoverflow.com/questions/9322302/how-to-get-database-name-in-pdo\n return $this->query(\"select database()\")->fetchColumn();\n }", "public function getDBname() {\n\t\treturn $this->mDBname;\n\t}", "public function getDbName() {\n return $this->_dbName;\n }", "public function getConnectionName()\n\t{\n\t\treturn empty($this->db_conn) ? $this->db_conn_name : $this->getConnection()->getName();\n\t}", "public function getDbName()\n\t{\n\t\treturn $this->db_name;\n\t}", "public function getConnectionName()\n {\n return config('google-ads-api.database.connection') ?? $this->connection;\n }", "public function getConnectionName()\n {\n return config('yotpo.database.connection') ?? $this->connection;\n }", "static public function getDbName()\n\t{\t\t\n\t\treturn self::$_dbName;\n\t}", "public function getDbDatabase(): string\n {\n return Environment::is([Environment::ENV_TEST, Environment::ENV_HTTP_TEST])\n ? Testing::DB_NAME\n : (string) Config::get('DB_DATABASE');\n }", "public function getDbName():string {\n $database = $this->db->database;\n if($database) {\n return $database;\n }\n return $this->db->db->database;\n }", "function get_database_name()\n\t{\n\t\treturn ($this -> database_name);\n\t}", "public function getDatabase() {\n return $this->getConfig('database', $this->defaults['database']);\n }", "public function Get_ConnectionName()\r\n\t{\r\n\t\treturn $this->_dbCatalog;\r\n\t}", "function database() {\n\t\t return PHPLM_DBNAME;\n\t\t}", "protected function getDefaultDBName()\n {\n return Propel::getDefaultDB();\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\r\n\t{\r\n\t\treturn $this->database;\r\n\t}", "public function getDatabaseName(): string;", "protected function getDatabase()\n {\n $database = $this->input->getOption('database');\n\n return $database ?: $this->laravel['config']['database.default'];\n }", "public function getDatabase()\n\t{\n\t\treturn $this->database;\n\t}", "public function getDbName(): string\n {\n $parts = pathinfo($this->dbPath);\n\n return $parts['filename'];\n }", "public function getConnectionName()\n {\n return $this->connectionName;\n }", "public function getDriverName()\n {\n return $this->db->get_dbfamily();\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "public function getDatabase()\n {\n $platform = $this->getDatabasePlatform();\n $query = $platform->getDummySelectSQL($platform->getCurrentDatabaseExpression());\n $database = $this->fetchOne($query);\n\n assert(is_string($database) || $database === null);\n\n return $database;\n }", "public function database()\n {\n return $this->database;\n }", "public function getDatabaseName():string;", "public function getDatabase()\n {\n\n $this->checkConnection();\n return $this->database;\n }", "private static function _dbDriver(): string\n {\n $db = Craft::$app->getDb();\n\n if ($db->getIsMysql()) {\n $driverName = 'MySQL';\n } else {\n $driverName = 'PostgreSQL';\n }\n\n return $driverName . ' ' . App::normalizeVersion($db->getSchema()->getServerVersion());\n }", "protected function getDatabaseConnection() {\n\t\treturn $GLOBALS['TYPO3_DB'];\n\t}", "protected function getDatabaseConnection() {\n\t\treturn $GLOBALS['TYPO3_DB'];\n\t}", "protected function getDatabase(): string\n {\n $database = $this->option('database');\n if ($database == 'default') {\n return config('mysql-optimizer.database');\n }\n // Check if the database exists\n if (is_string($database) && $this->existsDatabase($database)) {\n return $database;\n }\n throw new DatabaseNotFoundException(\"This database {$database} doesn't exists.\");\n }", "public function getActualDatabaseName():string;", "public static function getDatabase() {\n return self::$PDO;\n }", "Public Function getDSN() {\n\t\tIf($this->driver == 'sqlite' || $this->driver == 'sqlite2')\n\t\t\tReturn $this->driver.':'.$this->getDatabaseName();\n\t\tElseIf($this->driver == 'pgsql')\n\t\t\tReturn sprintf ( \"pgsql:dbname=%s;user=%s;password=%s;host=%s\",\n\t\t\t\t$this->getDatabaseName(), $this->getUsername(), $this->getPassword(), $this->getHostname() );\n\t\tElse Return $this->driver.':host='.$this->getHostname().';dbname='.$this->getDatabaseName();\n\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "function connectionName ()\n\t{\n\t\tif (isset($this->conn_name)) {\n\t\t\treturn $this->conn_name;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getDatabase()\r\n {\r\n return $this->db;\r\n }", "public function getConnectionName() {\n\t\treturn null;\n\t}", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_CONF_VARS']['DB'];\n }", "public function getDatabase()\r\n {\r\n return $this->connector->getBusinessDatabase();\r\n }", "public function name()\n {\n return 'database';\n }", "public function getIdDatabase()\n {\n return $this->idDatabase;\n }", "public function getConnectionName();", "public function getConnectionName();", "public function getConnectionName();", "public function connection()\n {\n return static::$DB;\n }", "public function getDbName () {\n return $this->dbName; \n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_DB'];\n }", "private static function getDatabaseName() {\n return get_parent_class(static::getTableName());\n }", "public function getDriverName() {\n return $this->pdoObj->getAttribute( \\PDO::ATTR_DRIVER_NAME );\n }", "public function getDatabase(Connection $conn)\n {\n $params = $conn->getParams();\n return $params['dbname'];\n }", "public function getDriverName()\n {\n return $this->pdo->getAttribute ( \\PDO::ATTR_DRIVER_NAME );\n }", "static public function getDatabase()\n {\n return self::$database;\n }", "public function get_database(){\n return $this->database;\n }", "protected function db()\n\t\t{\n\t\t\tif( !$this->_db ) {\n\t\t\t\t$this->_db = \\Kalibri::db()->getConnection( $this->connectName );\n\t\t\t}\n\n\t\t\treturn $this->_db;\n\t\t}", "public function getDefaultConnectionName()\n {\n return $this->defaultConnection;\n }", "public function getDBName():? string;" ]
[ "0.8470095", "0.8443994", "0.83257097", "0.814792", "0.81198144", "0.80206156", "0.80091345", "0.7990441", "0.7976131", "0.7973927", "0.79300016", "0.7908563", "0.78884417", "0.78883564", "0.78767145", "0.78443354", "0.78153676", "0.78071433", "0.77935445", "0.7774073", "0.77719074", "0.77259153", "0.7693688", "0.76709926", "0.7661074", "0.7658137", "0.765283", "0.76475", "0.75879127", "0.7554335", "0.75124615", "0.7487515", "0.747442", "0.745961", "0.7415093", "0.7405857", "0.7337642", "0.7213084", "0.7213084", "0.7213084", "0.7213084", "0.7213084", "0.7213084", "0.7158307", "0.7150175", "0.71449447", "0.7092952", "0.7080218", "0.7058017", "0.7030157", "0.702035", "0.702035", "0.701085", "0.7001792", "0.69430226", "0.694158", "0.6918565", "0.69175446", "0.69175446", "0.6917043", "0.6916445", "0.6915755", "0.6912919", "0.6904141", "0.6904141", "0.6904141", "0.6904141", "0.6904141", "0.6904141", "0.6904141", "0.6904141", "0.6898501", "0.68843853", "0.6881995", "0.6875978", "0.6849019", "0.6844055", "0.68433636", "0.68413365", "0.68413365", "0.68413365", "0.6827469", "0.682437", "0.6817639", "0.6817639", "0.6817639", "0.6817639", "0.6817639", "0.6817639", "0.6817639", "0.6817639", "0.6817639", "0.6788995", "0.678621", "0.6776813", "0.6765869", "0.67494345", "0.67466897", "0.67362744", "0.6728661", "0.67227256" ]
0.0
-1
returns an empty model if no id is given
function __construct($id = null) { //nothing is set so we return null if (is_null($id)) return $this; parent::__construct($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find(int $id): ?Model;", "public function find(int $id): ?Model;", "public function getModelo(int $id): ?Model;", "abstract protected function model($id = NULL);", "public function get(int $id): IModel\n {\n }", "public function findById(int $id) : ?Model;", "public function findById(string $modelId): ?Model;", "public function id(object $model): ?string;", "public function getModel($id = null)\n {\n $model = Yii::createObject($this->modelClass);\n if ($id) {\n return $model->findOne($id);\n } elseif ($id === null) {\n return $model->find()->where(['is_default' => 1])->one();\n } else {\n return $model;\n }\n }", "protected function _one($id)\n {\n return $this->model($id);\n }", "public function byId($id)\n {\n return $this->model->findOrFail($id);\n }", "public function show(string $modelId): ?Model;", "public static function findModel($id='')\n {\n $model = static::find()->where(['id' => $id])->one();\n if ($model == null) {\n throw new \\yii\\web\\NotFoundHttpException(Yii::t('app',\"Page not found!\"));\n }\n return $model;\n }", "public function getById($id)\n\t{\n\t\treturn $this->model->findOrFail($id);\n\t}", "public function find($id){\n return $this->model->query()->findOrFail($id);\n }", "public function model(int $id)\n {\n }", "public function getById($id)\n\t{\n\t\tif($record = $this->record->findByPk($id))\n\t\t{\n\t\t return $this->model->populateModel($record);\n\t\t}\n\t\treturn null;\n\t}", "private function findModel($id)\n {\n return Pekerjaan::findOne($id);\n }", "public function one(int $id): ?ExternalModelInterface;", "function find($id)\n{\n\t$model = $this->newModel(null);\n\treturn $model->find($id);\n}", "public function getByID($id)\n {\n return $this->model->findOrFail($id);\n }", "public function getById() {}", "public function getById($id)\n {\n return $this->model->findOrFail($id);\n }", "public function getAuditoriaPatrimonio(int $id): ?Model\n {\n }", "public function model($model_id)\n {\n return $this->model->findOrFail($model_id);\n }", "public function find($id):Default_Model_Model{\n\n\n\t\t$result=$this->getDbTable()->find($id);\n\n\t\t//echo \"id=>$id\";\n\n\t\tif(0 == count($result)) return false;\n\n\t\t$row = $result->current();\n\t\t$object = $this->getModel($row->toArray ());\n\n\t\treturn $object;\n\n\t}", "public function loadModel($id)\n\t{\n $dataModel = SATanggunganpenjaminM::model()->findByAttributes(array('carabayar_id'=>$id), array('limit'=>1));\n\t\t$model=SATanggunganpenjaminM::model()->findByPk($dataModel->tanggunganpenjamin_id);\n\t\tif($model===null){\n\t\t\t$model = new SATanggunganpenjaminM;\n $model->carabayar_id = $id;\n }\n\t\treturn $model;\n\t}", "public function find($model, $id);", "protected function loadOneModel($id) {\n\t\treturn $this->getModel ()->with ( $this->nestedRelations )->findByPk ( $id );\n\t}", "protected function loadOneModel($id) {\n\t\treturn $this->getModel ()->with ( $this->nestedRelations )->findByPk ( $id );\n\t}", "public function getFirstRecordModel(?string $id = null): ?iterable\n {\n $companyId = Company::getCompanyIdBySubdomain();\n\n if ($companyId == 'main' or $companyId == '') {\n if (!$id) {\n empty(self::find()->one()) ? $firstRecord = $this : $firstRecord = self::find()->one();\n } else {\n $firstRecord = self::find()->where([\n 'id' => $id\n ])->one();\n }\n } else {\n if ((new OwnerManageGroup())->getViewsByGroup()) {\n if (Yii::$app->controller->action->id === 'index') { \n self::find()->where([\n 'company_id' => $companyId,\n 'owner_id' => (new OwnerManageGroup())->getViewsByGroup()\n ])->one() ?\n $firstRecord = self::find()->where([\n 'company_id' => $companyId,\n 'owner_id' => (new OwnerManageGroup())->getViewsByGroup()\n ])->one() \n : $firstRecord = $this;\n } else {\n self::find()->where([\n 'id' => $id,\n 'company_id' => $companyId\n ])->one() ?\n $firstRecord = self::find()->where([\n 'id' => $id,\n 'company_id' => $companyId\n ])->one()\n : $firstRecord = $this;\n }\n } else {\n if (Yii::$app->controller->action->id === 'index') {\n \n self::find()->where([\n 'company_id' => $companyId,\n 'owner_id' => Yii::$app->user->id\n ])->one() ?\n $firstRecord = self::find()->where([\n 'company_id' => $companyId,\n 'owner_id' => Yii::$app->user->id\n ])->one() \n : $firstRecord = $this;\n } else {\n self::find()->where([\n 'id' => $id,\n 'company_id' => $companyId\n ])->one() ?\n $firstRecord = self::find()->where([\n 'id' => $id,\n 'company_id' => $companyId\n ])->one()\n : $firstRecord = $this;\n }\n }\n }\n\n return $firstRecord;\n }", "public static function findModel($id)\n {\n if (($model = self::findOne(['id' => intval($id)])) !== null)\n return $model;\n\n return null;\n }", "protected function findModel($id)\n {\n if (($model = PdmBa14::findOne(['id_ba14'=>$id])) !== null) {\n return $model;\n } \n }", "protected function findModel($id) {\n $model = null;\n if (($model = Employee::findOne($id)) !== null) {\n return $model;\n }\n }", "protected function loadOneModel($id) {\n\t\treturn $this->getModel()->with($this->nestedRelations)->findByPk($id);\n\t}", "public function findById(int $id): ?OrmModelInterface\n {\n }", "public function one($id);", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "public function find($id)\n\t{\n\t\treturn Model::where('id', $id)->first();\n\t}", "public function GetOrFail($id)\n {\n return $this->model->findOrFail($id);\n }", "public function actionOne()\n {\n return $this->findModel(Yii::$app->request->get('id'));\n }", "public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}", "public function getById()\n {\n }", "abstract public function getPrimaryModel();", "public function getById( $id ){\n return $this->model->find($id);\n }", "public static function findOrNew($id){\n $model = static::find($id);\n\n if(is_null($model)){\n $model = new static;\n }\n \n return $model;\n }", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "public function loadModel($id)\n\t{\n\t\t$model=Coordocs::model()->findByPk($id+0);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function getOne($id) {\n\n }", "public function findModel($id)\n {\n if (($model = Chat::findOne($id)) !== null) {\n return $model;\n } else {\n return \"\";\n }\n }", "public function loadModel($id) {\n $model = InternshipPosition::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n\n $user = Users::model()->findByPk(Yii::app()->user->id);\n $department = Department::model()->findByAttributes(array('type_admin' => $user->type));\n if ($department != NULL) {\n $did = $department->id;\n if ($model->department_id != $did) {\n throw new CHttpException(404, 'You are not authorized to perform this action.');\n } else {\n return $model;\n }\n } else {\n\n return $model;\n }\n }", "protected function findModel($id)\n {\n //if (($model = Ddiet::findOne($id)) !== null) {\n if (($model = Ddiet::find($id)->active()\n ->select(['{{%diet}}.*','count_day'=>new Expression('COUNT({{%dietday}}.id)')])\n ->joinWith(['dietdays' => function($q) {\n $q->onCondition(['{{%dietday}}.status_del' => 0]);\n }],false)\n ->groupBy('{{%diet}}.id')->one()) !== null) { \n var_dump($model);exit;\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function id($id = null);", "public function getRecord($id = null);", "public function findOne(int $id);", "public function get_one($id)\n {\n }", "protected function findModel($id) {\n if (($model = PortCallData::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n {\n $model=SALookupM::model()->findByPk($id);\n return $model;\n }", "public function loadModel($id)\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->compare('id',(int)$id);\n\t\t\n\t\tif (Yii::app()->user->name != \"admin\") {\n\t\t\t$criteria->addInCondition('company_id',sUser::model()->getGroupArray());\n\t\t}\n\n\t\t$model=gSelection::model()->find($criteria);\n\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function id()\n {\n return $this->identity['modelId'];\n }", "public function getTipoContato(int $id): ?Model;", "public function findModel( $id ){\n $user = Yii::$app->user->identity;\n $school = $user->school;\n return Lesson::findOne([ 'id' => $id , 'school_id' => $school->id ] );\n }", "public function loadModel($id)\n\t{\n\t\t$model=Basic_definition::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function findById($id)\n {\n return $this->model->find($id);\n //return $this->model->whereId($id)->get();\n }", "public function getById($id)\n\t{\n\t\treturn $this->model->find($id);\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=Spam::model()->findByPk((int) $id);\n\t\tif($model===null)\n\t\t\t$this->redirect(array('notfound'));\n\t\t\t//throw new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function findOne($id)\n {\n return $this->model->find($id);\n }", "public function getIdOnly();", "protected function findModel($id)\n {\n \tif (($model = QOrder::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "public function loadModel($id) {\n $model = ArticleModel::model()->findByPk($id);\n //if ($model === null)\n //throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "public function find($id)\n {\n $params = [\n 'index' => $this->model->_index,\n 'type' => $this->model->_type\n ];\n if ($id) {\n $params['id'] = $id;\n return $this->generateModel($this->client->get($params));\n }\n return null;\n }", "public function loadModel($id)\n\t{\n\t\t$model=Alumno::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id) {\n if (($model = Bonification::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if(Yii::$app->session->get('Rules')['comp_id'] ==1){\n if (($model = Customer::findOne(['id' => $id])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }else{\n\n \n if (($model = Customer::findOne(['id' => $id,'comp_id' => Yii::$app->session->get('Rules')['comp_id']])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }\n }", "protected function findModel($id)\n {\n if (($model = Amphur::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function getById($id)\n {\n return $this->model->where('id', $id)->get();\n }", "public function find(int $id)\n {\n return $this->model->findOrFail($id);\n }", "protected function findModel($id) {\n if (($model = Menu::findOne($id)) !== NULL) {\n return $model;\n } else {\n \\Yii::error(\\Yii::t('akhdanihr', 'Data dengan kriteria yang anda cari tidak ditemukan!'));\n throw new \\Exception(\\Yii::t('akhdanihr', 'Data dengan kriteria yang anda cari tidak ditemukan!'));\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Applicant::model()->findByPk((int)$id);\n $model->imagephoto = $model->photo;\n $model->imagebarcode = $model->barcode;\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function findById(int $id)\n {\n return $this->model->findOrFail($id);\n }", "protected function findModel($id)\n\n {\n\n if (($model = Main::findOne($id)) !== null) {\n\n return $model;\n\n } else {\n\n throw new NotFoundHttpException('The requested page does not exist.');\n\n }\n\n }", "public function loadModel($id)\n\t{\n\t\t$model=Recargas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = NursingRecord::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('你所请求的页面不存在');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Stone::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id) {\n if (($model = Recetastbl::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n }", "protected function findModel($id)\n {\n if (($model = SoSheet::findOne($id)) !== null) { \n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Solicitudes::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function setId($id)\n {\n return $this->model->find($id);\n }", "public function setId($id)\n {\n return $this->model->find($id);\n }", "protected function findModel($id)\n {\n if (($model = Gl2010idid::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = PdmP44::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findOrFail($id)\n {\n return $this->getModel()->findOrFail($id);\n }", "protected function findModel($id)\n {\n if (($model = PublicNum::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function GetByID($id)\n {\n return $this->model->find($id);\n }", "public function loadModel($id){\n\t\t$model=Contact::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=ElBezQuests::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id) {\n\t\tif (($model = EntEmpleados::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t\t}\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=Posting::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected\n\tfunction findModel(\n\t\t$id\n\t) {\n\t\tif ( ( $model = Building::findOne( $id ) ) !== null ) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException( 'The requested page does not exist.' );\n\t\t}\n\t}", "protected function findModel($id)\n {\n if (($model = ShopErasureData::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }" ]
[ "0.75473714", "0.75473714", "0.75261265", "0.74345195", "0.7186421", "0.7079162", "0.70778054", "0.7032242", "0.7000289", "0.698227", "0.69608814", "0.6934301", "0.6865109", "0.6850317", "0.68411374", "0.68325025", "0.68106675", "0.6766196", "0.67621756", "0.6760718", "0.6725598", "0.67228276", "0.67135584", "0.6668738", "0.6624864", "0.6586747", "0.6558703", "0.6539404", "0.6534754", "0.6534754", "0.65301126", "0.65276206", "0.6526589", "0.6519109", "0.6511386", "0.6481088", "0.64792866", "0.64736545", "0.64736545", "0.6472416", "0.6452096", "0.64396805", "0.643266", "0.64312726", "0.64081967", "0.6402848", "0.6392748", "0.6391752", "0.6389701", "0.6361463", "0.6312782", "0.6298978", "0.6293513", "0.6279488", "0.6277515", "0.62769455", "0.62699145", "0.6269667", "0.6259959", "0.62586945", "0.62546766", "0.62483364", "0.6242938", "0.62359643", "0.6227165", "0.62249005", "0.6218735", "0.62175083", "0.6209631", "0.6209053", "0.6208574", "0.620562", "0.62005883", "0.61963797", "0.61845726", "0.6180727", "0.6179288", "0.61747235", "0.6171646", "0.617065", "0.6167837", "0.61608374", "0.6160436", "0.6159305", "0.6159267", "0.6153086", "0.6150645", "0.6150638", "0.61419797", "0.61419797", "0.61416334", "0.613963", "0.6138426", "0.6134172", "0.61340797", "0.6133532", "0.61324555", "0.612909", "0.61290306", "0.612767", "0.61268044" ]
0.0
-1
get all customers from database
public static function all() { $db = Zend_Registry::get('dbAdapter'); $result = $db->query('select id from companys')->fetchAll(); $companys = new SplObjectStorage(); foreach ($result as $c) { try { $company = new Yourdelivery_Model_Company($c['id']); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $companys->attach($company); } return $companys; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomers() {\n $sql = \"SELECT * FROM customers\";\n\n //prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //execute\n $statement->execute();\n\n //Get the results\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function GetCustomers() {\n \n //set up the query\n $this->sql = \"SELECT *\n FROM customers\";\n \n //execute the query\n $this->RunBasicQuery();\n }", "public function listAllCustomers();", "function getCustomers() {\n\t\t$customers = \"\";\n\t\t$sql = 'SELECT * FROM Customer';\n\n\t\t$customers = queryDB($sql);\n\n\t\treturn $customers;\n\t}", "public static function getAllCustomers()\n\t{\n\t\t$customers = self::where('users_role',UserRole::CUSTOMER_ROLE_ID)->get();\n\t\treturn $customers;\n\t}", "public static function getCustomers(){\n\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM customer\n\t\t\t\";\n\n\t\t// Make a PDO statement\n\t\t$statement = DB::prepare($sql);\n\n\t\t// Execute\n\t\tDB::execute($statement);\n\n\t\t// Get all the results of the statement into an array\n\t\t$results = $statement->fetchAll();\n\n\t\t$customers = [];\n\t\tforeach($results as $row) {\n\t\t\t$customers[]= new Customer($row['id'], $row['first_name'], $row['last_name'], $row['email'], $row['gender'], $row['customer_since']);\n\t\t}\n\t\treturn $customers;\n\t}", "public function getCustomers() {\n $customerList = array();\n $i = 0;\n $sql = \"SELECT email, passwd, customer_name, address, city, state, country, zip, phone From signup_app.customers\";\n $customers = $this->db->query($sql);\n //$customer = $customers->fetch();\n if ($customers->num_rows > 0) {\n while ($customer = $customers->fetch_assoc()) {\n $customerList[$i++] = new Customer(\n $customer['email'], $customer['passwd'], $customer['customer_name'], $customer['address']\n , $customer['city'], $customer['state'], $customer['country'], $customer['zip'], $customer['phone']\n );\n }\n return $customerList;\n }\n }", "public function getCustomers()\n {\n\n $customers = Customer::where('user_parent_id', auth()->user()->id)\n ->select('id', 'firstname', 'lastname', 'email', 'number_id', 'phone', 'active', 'created_at');\n\n return $customers->orderBy('created_at', 'DESC')\n ->paginate(10);\n }", "public function getAllCustomers(){\n\t\t$sql=\"select a.id,a.name,a.cust_type,a.cust_cat,b.name as customer_type_name, c.user_name \n\t\tfrom customers a, customer_type b, users c where b.id=a.cust_type and a.deleted<>1 and c.id=a.created_by order by a.id desc\";\n\t\t$result=$this->db->query($sql);\n\t\treturn $result->result();\n\t}", "public static function loadAllCustomerBySearch() {\n\t}", "function sql_getCustomers(){\r\n\t\t\r\n\t\tglobal $database;\r\n\t\t$kunden = $database->select ( \"kunden\", [\r\n\t\t\t\t\"id\",\r\n\t\t\t\t\"name\"\r\n\t\t\t\t],[\"ORDER\"=> \"name ASC\"] );\r\n\t\treturn $kunden;\r\n\t}", "public function getallCreditCustomers() \n\t{ \n\t $cid = $this->gasolinereceived_model->getCompanyId();\n\t\t $cid1 = $cid['0']->c_id;\n\t\t \n\t\t $this->db->where('c_id',$cid1);\n\t\t \n\t\t $this->db->order_by('date_created','DESC');\n\t\t $query = $this->db->get('credit_customer')->result();\n\t $q=$this->db->last_query($query );\n\t\t// print_r($q); die('err');\n\t return $query;\n\t \n\t}", "function get_all_customer()\n {\n $this->db->order_by('customer_id', 'desc');\n return $this->db->get('customer')->result_array();\n }", "public function getListCustomer() {\n $stmt = $this->conn->prepare(\"SELECT customer_id, email, api_key, fullname, phone, personalID, \n customer_avatar, status, created_at FROM customer\");\n if ($stmt->execute()) {\n // $user = $stmt->get_result()->fetch_assoc();\n $users = $stmt->get_result();\n $stmt->close();\n return $users;\n } else {\n return NULL;\n }\n }", "public function displayCustomer()\n {\n $customerList = array();\n\n try {\n $stmt = $this->db->prepare(\"SELECT * \n FROM Customer\");\n $stmt->execute();\n\n $row[] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ($stmt->rowCount() > 0) {\n foreach ($row as $customer) {\n array_push($customerList, $customer);\n\n }\n return $customerList;\n\n }\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function getCustomers()\n {\n return $this->hasMany(Customer::className(), ['currency_id' => 'currency_id']);\n }", "public function index()\n {\n $customers = Customer::all();\n return $customers;\n }", "public function all_customers() {\n\t\tif($this->input->is_ajax_request()) {\n\t\t\techo json_encode($this->customers->get_all());\n\t\t} else {\n\t\t\tredirect('cms/customers', 'refresh');\n\t\t}\n\t}", "public function query()\n {\n return Customer::query();\n }", "public function getCustomers(): array\r\n {\r\n try {\r\n $statement = $this->db->prepare(\"select * from customers\");\r\n $statement->execute();\r\n return $this->customers = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n } catch (\\PDOException $e) {\r\n throw new \\Mpopa\\ExpException(\"Can't get customers: \" . $e->getMessage());\r\n }\r\n }", "function get_customer_list()\n {\n $this->company_db->select(\"c.*\");\n $this->company_db->from('tbl_customer c');\n // $this->company_db->where('c.void', 'No');\n $query = $this->company_db->get();\n\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function getAll(): array\n {\n $customerData = $this->_doctrine->getRepository(CustomerData::class)->findAll();\n\n return $customerData;\n }", "public function getCustomerList()\n {\n $customerList = $this->customerInterface->getCustomerList();\n return response()->json($customerList);\n }", "function showCustomers($con) {\n\t\ttry {\n\t\t\t$stm = $con->prepare(\"SELECT * FROM usuarios WHERE rol = 'cliente'\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll();\t\t\t\n\t\t} catch (PDOException $e) {\n\t\t\techo $e->getMessage();\t\n\t\t}\n\t}", "public static function listData()\n\t{\n\t\t\n\t\t$customers = RestController::getAdminData('customers');\n\t\treturn CHtml::listData($customers, 'id', 'customerName');\n\t}", "public function getAllCustomer(){\n $customers = Customer::where('deleted',0)->get();\n $result = [\n \"status\" =>\n [\n \"code\" => 200,\n \"status\" => \"success\",\n \"message\" => \"getAllCustomer suceed\"\n ],\n \"result\" =>\n [\n \"data\" => $customers\n ]\n ];\n return response($result, 200);\n }", "public function get_customers () {\n \t$customers = $this->service->get_customers();\n \treturn view('admin.customers', ['customers' => $customers]);\n }", "public function getCustomers()\n {\n $role = Role::where('name', 'customer')->first();\n return $role->users;\n }", "public function get_all($arrFilter = array()){ \n\t\treturn $this->call('GET', '/admin/customers.json', $arrFilter); \n\t}", "public function index()\n {\n $resource = Customer::paginate();\n return new CustomerCollection($resource);\n }", "private function getShopifyCustomers()\n {\n $endpoint = 'customers.json';\n $shop_url = env('SHOP_URL');\n $headers = [\n 'Content-Type' => 'application/json',\n ];\n\n $client = new Client(['headers' => $headers]);\n\n try {\n $api_response = $client->request('GET', $shop_url . $endpoint);\n } catch (GuzzleException $e) {\n throw new \\Exception($e->getMessage());\n }\n\n return json_decode($api_response->getBody()->getContents(), true)['customers'];\n }", "public function displayAllCustomers() {\n global $mwAdminDB; // db connection \n\n return ($mwAdminDB->displayAllCustomers());\n }", "static function getAllCustomerWithOrders(){\r\n\t\tglobal $DB;\r\n\t\t$retval = Array();\r\n\t\t\r\n\t\t$sql = \"SELECT DISTINCT personalization_orders.customerid FROM personalization_orders WHERE `status` >= 1 AND orderdate > 0\";\r\n\r\n\t\tif($DB->num_rows($sql)){\r\n\t\t\tforeach($DB->select($sql) as $r){ \r\n\t\t\t\t$retval[] = new BusinessContact($r[\"customerid\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "private function getCustomersArray(): void {\n\n $mdlCustomer = new \\App\\Models\\Customer();\n $rows = $mdlCustomer->getAll();\n\n $this->customers = array_column($rows, 'id');\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function getCustomers() {\n $sql = \"SELECT * from usertable WHERE type = '1'\";\n foreach (parent::$this->db_connect->query($sql) as $row) {\n $dataSet[] = new user_model($row);\n }\n\n if (!empty($dataSet))\n return $dataSet;\n else\n return null;\n }", "public function getCustomers()\n {\n\t\t$customers = $this->ShopifyClient->call('GET','/admin/customers.json',$this->config);\t\t\n\t\t$arra = array();\n\t\tif(!empty($customers['customers']))\n\t\t{\n\t\t\t$keyArr = array('id','email','accepts_marketing','first_name','last_name','orders_count','state','total_spent','last_order_id','note',\n\t\t\t\t\t\t\t'verified_email','multipass_identifier','tax_exempt','tags','last_order_name','addresses');\n\t\t\t$shopifyKeyArr = array('id','email','accepts_marketing','first_name','last_name','orders_count','state','total_spent','last_order_id','note',\n\t\t\t\t\t\t\t'verified_email','multipass_identifier','tax_exempt','tags','last_order_name','addresses');\n\t\t\t\n\t\t\tforeach($customers as $key=>$var) {\n\t\t\t\tforeach($var as $k=>$val) {\n\t\t\t\t\tif(!empty($val['default_address'])){\n\t\t\t\t\t\tarray_push($keyArr, 'default_address');\n\t\t\t\t\t\tarray_push($shopifyKeyArr, 'default_address');\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t$arra['data'][] = $this->createProductArray($val,$shopifyKeyArr,$keyArr);\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$status_code = 200;\n\t\t\t$message = 'success';\t\n\t}else\n\t{\n\t\t$status_code = 404;\n\t\t$message = 'Customers not found';\n\t\t$arra['data'] = array();\n\t\t$arra['data_count'] = 0;\n\t}\t\n\t\t$customers = $this->getJsonDataFormat($arra,$status_code,$message);\t\n\t\treturn $customers;\n }", "public function getAllClients(){\n\t\t$sql = \"SELECT * FROM cliente;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function getCustomers($options = array())\n {\n return $this->getListe(\"customers\", $options);\n }", "public function customer(){\n\t\treturn Customers::find($this->customers_id);\n\t}", "protected function loadCustomersData()\n {\n //Se recupera la informacion basica\n $attributes = ['customer_id', 'first_name', 'last_name', 'archived'];\n $data = Customer::orderBy('first_name')\n ->get($attributes);\n $customers = new Collection();\n\n //Ahora se recupera su estado\n foreach ($data as $record) {\n $customer = new stdClass();\n $customer->id = $record->customer_id;\n $customer->fullName = $record->first_name . ' ' . $record->last_name;\n $customer->archived = $record->archived == 0 ? false : true;\n\n //Recupero los creditos y abonos para calcular las estadisticas\n $credits = $record->credits()->orderBy('credit_date')->get();\n $payments = $record->payments()->orderBy('payment_date')->get();\n\n $statistics = $this->getState($credits, $payments);\n\n $customer->balance = $statistics->balance;\n $customer->state = $statistics->state;\n $customer->lastCredit = $statistics->lastCredit;\n $customer->balanceColor = $statistics->balanceState;\n $customer->time = $statistics->paymentTime;\n\n $customers->push((array) $customer);\n }\n\n $this->customers = $customers;\n }", "public function getCustomers()\n {\n return $this->hasMany(User::className(), ['id' => 'customer_id'])->viaTable('favorite_contractor', ['contractor_id' => 'id']);\n }", "public function getCustomerAction()\n {\n $data = $this->Request()->getParams();\n\n /** @var Shopware_Components_CustomerInformationHandler $customerInformationHandler */\n $customerInformationHandler = Shopware()->CustomerInformationHandler();\n\n //Checks if the user used the live search or selected a customer from the drop down list\n if (isset($data['filter'][0]['value'])) {\n $result = $customerInformationHandler->getCustomerList($data['filter'][0]['value']);\n } else {\n $search = $this->Request()->get('searchParam');\n $result = $customerInformationHandler->getCustomer($search);\n }\n\n foreach ($result as $i => $customer) {\n $result[$i] = $this->extractCustomerData($customer);\n }\n\n $total = count($result);\n\n $this->view->assign(\n [\n 'data' => $result,\n 'total' => $total,\n 'success' => true\n ]\n );\n }", "public function actionCustomer()\n {\n $searchModel = new ClinicSearch();\n $dataProvider = $searchModel->searchCustomerAffiliate(Yii::$app->request->queryParams);\n\n $page = isset($param['page']) ? $param['page'] : 0;\n $per_page = isset($param['per-page']) ? $param['per-page'] : 0;\n $totalCount = $dataProvider->getTotalCount();\n if ($page * $per_page > $totalCount) {\n return [];\n }\n $pageSize = $dataProvider->pagination->pageSize;\n $totalCount = $dataProvider->totalCount;\n $totalPage = (($totalCount + $pageSize - 1) / $pageSize);\n\n $aData = $dataProvider->getModels();\n $result = [];\n foreach ($aData as $model) {\n $result[] = $this->getCustomerDetail($model);\n }\n return [\n 'data' => $result,\n 'totalPage' => $totalPage,\n 'totalCount' => $totalCount,\n ];\n }", "public function getCustomer();", "public function getCustomerData(){\n\n\t\t$customerDataSQL = \"select * FROM\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tSELECT *,\n\t\t\t\t\t\t\t(SELECT COUNT(gds_order_id) FROM gds_orders AS gord WHERE gord.cust_le_id=l.legal_entity_id) AS 'TotalOrder'\n\t\t\t\t\t\t\tFROM legal_entities AS l\n\t\t\t\t\t\t\tWHERE legal_entity_type_id LIKE '30%' AND is_posted=0\n\t\t\t\t\t\t) AS innertbl WHERE TotalOrder>0\";\n\n\t\t$customerData = DB::select(DB::raw($customerDataSQL));\n\n\t\t/*$customerData = DB::table('legal_entities_live')\n\t\t\t\t\t->where(\"legal_entity_type_id\",\"like\",\"30%\")\n\t\t\t\t\t->where('is_posted', '=', '0')\n\t\t\t\t\t->get();*/\n\t\t\t\t\t\n\t\treturn $customerData;\n\n\t}", "public function getCustomers()\n {\n $responseString = $this->apiCall('GET', 'customers');\n try\n {\n $responseObject = $this->parseResponse($responseString);\n return $responseObject->Customers;\n }\n catch(Exception $e)\n {\n echo 'Can`t parse API response: '.$e->getMessage;\n return false;\n }\n }", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "public function getAllClients() {\n // On récupère tout le contenu de la table clients\n $queryResult = $this->database->query('SELECT * FROM clients'); \n $allClientsData = $queryResult->fetchAll(PDO::FETCH_OBJ);\n return $allClientsData;\n }", "public function index()\n { \n $customers = Customer::all();\n return response($customers);\n }", "public function customers(Request $request)\n {\n $user = $request->user();\n $currentCompany = $user->currentCompany();\n\n $search = $request->search;\n\n if($search == ''){\n $customers = Customer::findByCompany($currentCompany->id)->limit(5)->get();\n }else{\n $customers = Customer::findByCompany($currentCompany->id)->where('display_name', 'like', '%' .$search . '%')->limit(5)->get();\n }\n\n $response = collect();\n foreach($customers as $customer){\n $response->push([\n \"id\" => $customer->id,\n \"text\" => $customer->display_name,\n \"currency\" => $customer->currency,\n \"billing_address\" => $customer->displayLongAddress('billing'),\n \"shipping_address\" => $customer->displayLongAddress('shipping'),\n ]);\n }\n\n return response()->json($response);\n }", "public function getCustomersProperty()\n {\n return Customer::search($this->search)->paginate(50);\n }", "public function index()\n {\n return Customer::get(['id'])->pluck('id');\n }", "function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }", "function get_customer_data($customer_id)\n {\n $this->company_db->select(\"c.*\");\n $this->company_db->from('tbl_customer c');\n $this->company_db->where('c.id', $customer_id); \n $query = $this->company_db->get();\n //echo $this->company_db->last_query();die;\n if($query->num_rows() >= 1)\n {\n return $query->row_array();\n }\n else\n {\n return array();\n }\n }", "static public function mdlCustomer($table){\n\n\t\t$stmt = Connect::connection()->prepare(\"SELECT * FROM $table\");\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "public function index()\n {\n $users = User::orderBy('id', 'desc')->paginate(30);\n return view('admin.customers.all_customer', ['customers' => $users]);\n }", "public function index()\n {\n return Customer::paginate( 50 );\n }", "public function customers(){\n\t\t$contact = DB::connection('mysql_banquet_pos')->table('contacts')->where('deleted_at','=',NULL)->get();\n\t\t return view('backend.admin.pos.contact_book.customers',compact(\n\t\t\t'contact'\n\t\t ));\n\t}", "public function index()\n {\n $cm_clientes = CmCliente::with(\"contrato.cliente\", \"cmmac\", 'orden_trabajo', \"estado_cm\")->get();\n return $cm_clientes;\n }", "public function actionAll()\r\n\r\n {\r\n $searchModel = new CustomerSearch;\r\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\r\n\r\n return $this->render('index', [\r\n 'dataProvider' => $dataProvider,\r\n 'searchModel' => $searchModel,\r\n ]);\r\n }", "public function index()\n {\n $customers = Customer::where('active', 1)\n // ->select('customer_name')\n ->orderBy('customer_name', 'asc')\n ->get();\n\n return response(['customer_list'=>$customers], 200)\n ->header('Content-Type', 'json');\n }", "public function index(){\n $articles = DB::select(\"SELECT * FROM customers ORDER BY id LIMIT 10000 OFFSET 0\");\n return $articles;\n }", "public function getCustomerById($id){ \n $query = \"SELECT * FROM tbl_customer WHERE id = '$id' \";\n $result = $this->db->select($query);\n return $result;\n }", "public function customers( $show='all' ){\n\t\t\tif( $show == 'customers' ) $statusFilter = 'NOT ISNULL(`since`)';\n\t\t\telseif( $show == 'potential' ) $statusFilter = 'ISNULL(`since`)';\n\t\t\telse $statusFilter = '1';\n\t\t\t$sql = \"SELECT\t`id_customer`,\n\t\t\t\t\t\t\t`customer`\n\t\t\t\t\tFROM `customers`\n\t\t\t\t\tWHERE {$statusFilter}\n\t\t\t\t\tORDER BY `customer`\";\n\t\t\treturn $this->asHash( $sql );\n\t\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public function viewAllCustomers()\n {\n $totalUsers = User::count();\n $users = User::paginate(30);\n return view('admin.users.viewAllCustomers', compact('users', 'totalUsers'));\n }", "function get_customer($customer_id)\n {\n return $this->db->get_where('customer',array('customer_id'=>$customer_id))->row_array();\n }", "public function index()\n {\n $user = Auth::user();\n if ($user->rol_id == 2) {\n request()->merge(['id' => $user->getCommerce->id]);\n } else {\n request()->merge(['id' => 0]);\n }\n\n $customers = $this->funGetList(request())->original['data'];\n if (!is_null(request()->document)) {\n $customers = $customers->filter(function ($customer) {\n return $customer->getUser->document == request()->document;\n });\n }\n if (!is_null(request()->fullname)) {\n $customers = $customers->filter(function ($customer) {\n return false !== stripos($customer->getUser->name . \" \" . $customer->getUser->last_name, request()->fullname);\n });\n }\n if (!is_null(request()->cellphone)) {\n $customers = $customers->filter(function ($customer) {\n return $customer->getUser->cellphone == request()->cellphone;\n });\n }\n if (!is_null(request()->state) && request()->state != -1) {\n $customers = $customers->where('state', request()->state);\n }\n $data = array(\n 'customers' => $customers\n );\n return view('customers.index', $data);\n }", "public function index()\n {\n $customers = Customer::orderBy('created_at', 'desc')->get();\n return response()->json(CustomerResource::collection($customers));\n }", "public function custList($table){\n\t\t\t\n\t\t\t$this->db->query($table);\n\t\t\t$row=$this->db->resultset();\n\t\t\t\n\t\t\treturn $row;\n\t\t\t\n\t\t}", "public function get_bl_customers(){\r\n\t\t//ClientId: ed4d82fc-b6d7-4518-a292-abad6eadb9fb\r\n\t\t//ClientSecret: d8a11026-4a8c-4650-b159-32c791e7a1b9\r\n\r\n\t\t$post_data = array(\r\n\t\t\t\"grant_type\"=>\"client_credentials\",\r\n\t\t\t\"scope\"=>\"\",\r\n\t\t\t\"client_id\"=>\"ed4d82fc-b6d7-4518-a292-abad6eadb9fb\",\r\n\t\t\t\"client_secret\"=>\"d8a11026-4a8c-4650-b159-32c791e7a1b9\"\r\n\t\t);\r\n\r\n\t\t$this->call_bl_api_auth($post_data);\r\n\t\t//$result = CallAPI(\"POST\",\"https://apigateway.blinfo.se/auth/oauth/v2/token\")\r\n\t}", "public function get_all()\n {\n $conn = db();\n \n $clientes = [];\n \n $consulta = \"SELECT * FROM cliente\";\n try{\n \n $stmt = $conn->query($consulta);\n \n }catch(PDOException $ex){\n console_log($ex->getMessage());\n }\n\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $clientes[] = [\n 'id' => $row['id'],\n 'username' => $row['username'],\n 'passwd' => $row['passwd'],\n 'nombre' => $row['nombre'],\n 'apellidos' => $row['apellidos'],\n 'email' => $row['email'],\n 'domicilio' => $row['domicilio'],\n 'fechaCreacion' => $row['fechaCreacion'],\n 'fechaModificacion' => $row['fechaModificacion'],\n 'Cesta_id' => $row['Cesta_id']\n ];\n }\n return $clientes;\n \n }", "public function getCustomer($customer_id);", "public function getCustomerData($id){\n $query = \"SELECT * FROM tbl_customer WHERE id = '$id' \";\n $result = $this->db->select($query); \n return $result;\n }", "public function index() {\r\n $conditions = array();\r\n $data = empty($this->request->data)?$this->request->params['named']:$this->request->data;\r\n if(!empty($data))\r\n { $conditions = array('Customer.nome ilike'=>'%'.$data['search'].'%'); }\r\n \r\n $this->Customer->recursive = 0;\r\n $this->set('customers', $this->paginate('Customer', $conditions));\r\n $this->set('args', $data);\r\n }", "public function list()\n {\n $customer_result = User::select('id', 'first_name', 'last_name', 'email', 'contact_no', 'status')\n ->orderBy(\"created_at\", \"ASC\")\n ->paginate(5);\n \n return view('admin.customer_list', ['customers' => $customer_result]);\n }", "public function getCustomers()\n {\n return Controllers\\CustomersController::getInstance();\n }", "public function getAllCliente() {\n try {\n $sql = \"SELECT * FROM cliente\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n } catch (PDOException $erro) {\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "public function getCustomerQueryBuilder()\n {\n $builder = Shopware()->Models()->createQueryBuilder();\n\n $builder->select(['customers', 'billing', 'shipping', 'debit', 'shop', 'languageSubShop'])\n ->from('Shopware\\Models\\Customer\\Customer', 'customers')\n ->leftJoin('customers.billing', 'billing')\n ->leftJoin('customers.shipping', 'shipping')\n ->leftJoin('customers.debit', 'debit')\n ->leftJoin('customers.languageSubShop', 'languageSubShop')\n ->leftJoin('customers.shop', 'shop')\n ->where('customers.id = :search');\n\n return $builder;\n }", "public function getAll()\r\n {\r\n // Query the database and return an array of contacts\r\n return $this->getEntityManager()\r\n ->createQuery(\r\n 'SELECT c FROM AppBundle:Contact c ORDER BY c.firstName, c.lastName ASC'\r\n )\r\n ->getResult();\r\n }", "public function index()\n {\n // return Customer::all();\n return DB::table('customers')->select(DB::raw(\"id, CONCAT(`name`, ' - ', `phone`) as `name`\"))->get();\n }", "public static function all(){\n\t\t$bdd = new DBcnx();\n\t\t\treturn $bdd->allClient();\n\t}", "public function index()\n {\n $country_code = Input::get('country_code');\n\n $customers = $this->customer->all($country_code)->get();\n\n return response()->json($customers);\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function allCustomer($orderby = 'id', $sort = 'ASC')\n {\n //profiling::\n $this->debug_methods_trail[] = __function__;\n //declare\n $conditional_sql = '';\n //check if any specifi ordering was passed\n if (! $this->db->field_exists($orderby, 'a_customer')) {\n $orderby = 'name';\n }\n //check if sorting type was passed\n $sort = ($sort == 'asc' || $sort == 'desc') ? $sort : 'ASC';\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\t\t\n\t\t\n //_____SQL QUERY_______\n $query = $this->db->query(\"SELECT a_customer.id,CONCAT(IFNULL(firstname,''),' ',IFNULL(lastname,'')) AS name,p.number,e.email\n FROM a_customer\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_phone as p ON p.customer = a_customer.id AND p.main ='1' AND p.status='1'\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_email as e ON e.customer = a_customer.id AND e.main ='1' AND e.status='1'\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 $conditional_sql \n ORDER BY $orderby $sort\");\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n $results = $query->result_array(); //multi row array\n //benchmark/debug\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n //return results\n return $results;\n }", "public function getCustomer($args)\n {\n return $this->buildQuery('GetCustomer', $args);\n }", "public function getAllCustomerByAjax()\n {\n $customers = RestaurantCustomer::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->where('del_status', 'Live')->orderBy('updated_at', 'desc')->get();\n return response()->json($customers);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $customers = $em->getRepository('AppApplicationBundle:Customer')->findAll();\n\n return $this->render('AppApplicationBundle:Customer:index.html.twig', array(\n 'customers' => $customers,\n ));\n }", "public function index()\n {\n return DB::select('call sp_getCustomerDetail('.Auth::user()->id.')');\n }", "public function client_getAll(){\n $array = array();\n if( $stmt = $this->connection->prepare(\"SELECT * FROM clients;\") ){\n $stmt->execute();\n $stmt->bind_result($id, $type, $name, $company, $address, $email, $phone);\n \n $results = array();\n while( $stmt->fetch() ){\n $Client = new Client($id, $type, $name, $company, $address, $email, $phone);\n $results[] = $Client;\n } \n \n $stmt->close();\n return $results;\n }\n return null;\n }", "public function listCustomers()\n {\n return $this->view( 'pages.dashboard.customers' );\n }", "public function getCustomers()\n {\n if (array_key_exists(\"customers\", $this->_propDict)) {\n return $this->_propDict[\"customers\"];\n } else {\n return null;\n }\n }", "public function listarClientes(){\n $this->bd->getConeccion();\n $sql = \"SELECT * FROM CLIENTE\";\n $registros = $this->bd->executeQueryReturnData($sql); \n $this->bd->cerrarConeccion(); \n $clientes = array(); \n \n foreach ($registros as $cliente) {\n $cliente = new Cliente($cliente['id'],$cliente['dni'],$cliente['Nombre'],$cliente['Apellido'],$cliente['Correo'],$cliente['Telefono']);\n array_push($clientes, $cliente);\n }\n \n return $clientes; \n }", "public function getAll() {\n $sql = \"SELECT * FROM contatos\";\n $sql = $this->pdo->query($sql);\n\n if($sql->rowCount() > 0 ) {\n return $sql->fetchAll();\n } else {\n return array();\n }\n }", "public function getCustomerData() {\n $custData = DB::table('customers')->select('id', 'comp_name')->get();\n $cData = '';\n $cData .=\"<option value='\" . '' . \"' selected='selected' > Select Customer</option>\";\n foreach ($custData as $key => $value) {\n $cData .=\"<option value='\" . $value->id . \"'>\" . $value->comp_name . \"</option>\";\n }\n return $cData;\n }", "public function index()\n {\n return UserResource::collection(User::where('role', 'customer')->get());\n }", "public function getCustomerByIdCustomer($id){\n $dbResult = $this->db->query(\"SELECT * FROM customer WHERE id_customer = ?\", array($id));\n return $dbResult->getResult();\n }", "public function fetchClients(){\n $sql = $this->db->query(\"SELECT id,dni_c,nombre_c,apellidos_c,telefono FROM cliente WHERE activo=1 ORDER BY apellidos_c\");\n $list_db = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n if($list_db != NULL) {\n return $list_db;\n } else {\n return NULL;\n }\n }", "public function index()\n {\n $results = User::getQueriedResult();\n\n return view('admin.customers.list',compact('results'));\n }", "public function listallAction(Request $request)\n {\n if (! $request->isXmlHttpRequest()) {\n throw new NotFoundHttpException();\n }\n\t\n $em = $this->getDoctrine()->getManager();\n $maincompany = $this->getUser()->getMaincompany();\n $entities = $em->getRepository('NvCargaBundle:Customer')->findBy(['maincompany'=>$maincompany,'active'=>true]);\n \n $result=array();\n $counter = 0;\n foreach ($entities as $entity) {\n foreach ($entity->getBaddress() as $dir ) {\n $city = $dir->getCity();\n if ($city) { \n $result[$counter]['name'] = $dir->getName();\n $result[$counter]['lastname'] = $dir->getLastname();\n if ($dir->getCustomer()->getPobox()) {\n $result[$counter]['pobox'] = $dir->getCustomer()->getPobox()->getNumber();\n } else {\n $result[$counter]['pobox'] = '';\n }\n $result[$counter]['email'] = $dir->getCustomer()->getEmail();\n\n $result[$counter]['docid'] = $dir->getDocid();\n $result[$counter]['address'] = $dir->getAddress();\n $result[$counter]['customerid'] = $entity->getId();\n \n $result[$counter]['cityid'] = $city->getId();\n $result[$counter]['cityname'] = $city->getName();\n $result[$counter]['state'] = $city->getState()->getName();\n $result[$counter]['country'] = $city->getState()->getCountry()->getName();\n $result[$counter]['phone'] = $dir->getPhone();\n $result[$counter]['mobile'] = $dir->getMobile();\n \n $result[$counter]['barrio'] = $dir->getBarrio();\n $result[$counter]['zip'] = $dir->getZip();\n if ($dir->getCustomer()->getType()) {\n $result[$counter]['type'] = $dir->getCustomer()->getType()->getName();\n } else {\n $result[$counter]['type'] = 'Persona';\n }\n $counter++;\n }\n }\n }\n// foreach ($entities as $entity) {\n// $result[$counter]['customerid'] = $entity->getId();\n// $result[$counter]['name'] = $entity->getName();\n// $result[$counter]['lastname'] = $entity->getLastname();\n// if ($entity->getPobox()) {\n// $result[$counter]['pobox'] = $entity->getPobox()->getNumber();\n// } else {\n// $result[$counter]['pobox'] = '';\n// }\n// $result[$counter]['email'] = $entity->getEmail();\n// \n// $result[$counter]['docid'] = $entity->getAdrdefault()->getDocid();\n// $result[$counter]['address'] = $entity->getAdrdefault()->getAddress();\n// $city = $entity->getAdrdefault()->getCity();\n// $result[$counter]['cityid'] = $city->getId();\n// $result[$counter]['cityname'] = $city->getName();\n// $result[$counter]['state'] = $city->getState()->getName();\n// $result[$counter]['country'] = $city->getState()->getCountry()->getName();\n// $result[$counter]['phone'] = $entity->getAdrdefault()->getPhone();\n// $result[$counter]['mobile'] = $entity->getAdrdefault()->getMobile();\n// \n// $result[$counter]['barrio'] = $entity->getAdrdefault()->getBarrio();\n// $result[$counter]['zip'] = $entity->getAdrdefault()->getZip();\n// $result[$counter]['type'] = $entity->getType()->getName();\n// $counter++;\n// }\n return new JsonResponse($result); \n }" ]
[ "0.8353877", "0.8298022", "0.82738394", "0.81249815", "0.80647266", "0.8025345", "0.80240315", "0.79444915", "0.77646416", "0.7755556", "0.76117975", "0.7582551", "0.7544667", "0.75086415", "0.74970555", "0.749006", "0.74579686", "0.7452684", "0.7398863", "0.73833007", "0.73705506", "0.73300034", "0.72981477", "0.72843945", "0.72797245", "0.7272257", "0.7207482", "0.7185061", "0.71675557", "0.7148201", "0.71476483", "0.7144505", "0.7140439", "0.713843", "0.7123556", "0.71214736", "0.7118233", "0.7092024", "0.70881015", "0.7078829", "0.70730937", "0.7070576", "0.7023725", "0.6998827", "0.6990819", "0.6962075", "0.6916991", "0.6901183", "0.6889919", "0.6860874", "0.6852918", "0.68287265", "0.68276244", "0.68080467", "0.6793361", "0.6777126", "0.67741936", "0.676818", "0.67435825", "0.672654", "0.6724651", "0.6718445", "0.67123955", "0.6694722", "0.6687019", "0.66777146", "0.6667027", "0.6655219", "0.66477823", "0.66476613", "0.66449034", "0.6639511", "0.66350085", "0.6630159", "0.66263473", "0.662402", "0.66232336", "0.6617251", "0.66050124", "0.6603771", "0.66012603", "0.65949404", "0.6580037", "0.656206", "0.6560593", "0.6560134", "0.65521693", "0.654965", "0.65473914", "0.65459996", "0.6542807", "0.65412205", "0.65406984", "0.6539602", "0.6534422", "0.65330476", "0.6527933", "0.65269077", "0.6525801", "0.6524746", "0.6520426" ]
0.0
-1
get all email addresses of one certian company
public static function allEmployeesEmail($companyId = null) { if (is_null($companyId)) { return array(); } $db = Zend_Registry::get('dbAdapter'); return $db->query('select c.email from customers c inner join customer_company cc on c.id=cc.customerId where c.deleted=0 and cc.companyId=' . $companyId . ' order by c.email')->fetchAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function suggestCompanyEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select email,name from company where active = 1 and email > '' and email is not null\";\n\t\t$sql .= \" and (email like '%\" . $this->emailCompany->Text . \"%' \";\n\t\t$sql .= \" or name like '%\" . $this->emailCompany->Text . \"%' )\";\n\n\t\t$result = Dao::getResultsNative($sql);\n\t\tif($result)\n\t\t{\n\t\t\tforeach($result as $rows)\n\t\t\t{\n\t\t\t\t$emails[] = array('id'=> $rows[0], 'email'=> $rows[1].\" - \".$rows[0]);\n\t\t\t}\n\t\t}\n\t\tif(count($emails)==0)\n\t\t{\n\t\t\t$emails[] = array('id'=> 0, 'email'=> 'No emails Found!');\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }", "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "function get_emails($return_email = '')\n\t{\n\t\t$xml = $this->load_url(\"settings/emailaddresses\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$emails = array();\n\t\t$_emails = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\t\tif(is_array($_emails)):\n\t\t\tif(isset($_emails[0]['link_attr']['href'])):\n\t\t\t\tforeach($_emails as $k => $v):\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\t\t\t\t\t$email = $v['content']['Email'];\n\t\t\t\t\t$email['id'] = $id;\n\n\t\t\t\t\tif($return_email && $return_email == $v['content']['Email']['EmailAddress']):\n\t\t\t\t\t\t// return single email\n\t\t\t\t\t\treturn $email;\n\t\t\t\t\tendif;\n\n\t\t\t\t\t$emails[] = $email;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$id = $this->get_id_from_link($_emails['link_attr']['href']);\n\t\t\t\t$email = $_emails['content']['Email'];\n\t\t\t\t$email['id'] = $id;\n\t\t\t\t$emails[] = $email;\n\n\t\t\t\tif($return_email && $return_email == $_emails['content']['Email']['EmailAddress']):\n\t\t\t\t\t// return single email\n\t\t\t\t\treturn $email;\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\tendif;\n\n\t\treturn $emails;\n\t}", "function get_email_hak_akses($company_id){\n\t\t$sql = \"\n\t\t\tselect \n\t\t\t\tusers.user_email as email_val, users.user_email, users.user_group_id, users.company_id, users.full_name\n\t\t\t\t, groups.user_group_description\n\t\t\tfrom tb_m_users as users \n\t\t\tinner join tb_m_user_group groups on groups.user_group_id = users.user_group_id\n\t\t\twhere users.company_id = '\" . $company_id . \"'\n\t\t\tand user_email not in (select distinct coalesce(user_email,0) from tb_m_employee where company_id = '\" . $company_id . \"')\n\t\t\";\n\t\treturn $this->db->query($sql)->result();\n\t}", "public function findAllEmails()\r\n {\r\n try {\r\n $query = 'SELECT email FROM login';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n if ($result == false) {\r\n return false;\r\n } else {\r\n return $result;\r\n }\r\n } catch (PDOException $e) {\r\n echo \"get accounts error\";\r\n die();\r\n }\r\n }", "public function getEmailReferrers();", "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "public function getAllEmail()\n {\n $query = $this->db->select('first_name, last_name, email')\n ->get('user');\n return $query->result_object();\n }", "public function getEmailAddresses()\n {\n return isset($this->EmailAddresses) ? $this->EmailAddresses : null;\n }", "public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}", "public function getEmailAddress();", "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }", "public function company_email_list($lead_email_ID)\n {\n $result = common_select_values('Distinct company_email', 'emails', ' lead_email = \"'.$lead_email_ID.'\"', 'result');\n return $result;\n }", "public function get_email_addresses($domain) \n\t{\n\t\treturn $this->vpopmail_readline(sprintf(\"L %s\", $domain));\n\t}", "public function getEmails()\n {\n return $this->emails;\n }", "public function getEmails()\n {\n return $this->emails;\n }", "public function getAllRecipients() {}", "public function getRecipients();", "function obtenirListeEmailPersonnesAJourDeCotisation()\n {\n $timestamp = time() - 60 * 86400;\n // Personne physique seule\n $requete = \"SELECT group_concat(DISTINCT email SEPARATOR ';')\n FROM (\n SELECT app.email\n FROM afup_cotisations ac\n INNER JOIN afup_personnes_physiques app ON app.id = ac.id_personne\n WHERE date_fin >= \" . $timestamp . \"\n AND type_personne = 0\n AND etat = 1\n UNION\n SELECT app.email\n FROM afup_cotisations ac\n INNER JOIN afup_personnes_physiques app ON app.id_personne_morale = ac.id_personne\n WHERE date_fin >= \" . $timestamp . \"\n AND type_personne = 1\n AND etat = 1 ) tmp\";\n return $this->_bdd->obtenirUn($requete);\n }", "public function emails()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select([DB::raw('IFNULL(prefix, \"Email\") AS type'), 'value AS url', 'is_primary'])\n ->where('type', 'email');\n }", "function getAds_email($email)\n\t\t{\n\t\t\t$seachValues = $this->manage_content->getValue_email('company_info','*','company_email',$email);\n\t\t\tif($seachValues != \"\")\n\t\t\t{\n\t\t\t\tforeach($seachValues as $searchValue)\n\t\t\t\t{\n\t\t\t\t\techo '<!--container for adds to be repeated-->\n\t\t\t\t\t\t<a href=\"manage_ads.php?comp_name='.$searchValue['company_name'].'\">\n\t\t\t\t\t\t\t<div class=\"a_content\">\n\t\t\t\t\t\t\t\t<div class=\"a_image\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.$searchValue['company_logo'].'\" alt=\"grafti cartt\" /> \n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"a_company_name\">'.$searchValue['company_name'].'</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"No se encontraron resultados para la busqueda realizada\";\n\t\t\t}\n\t\t}", "public function getEmails() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'];\n\t}", "private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "public function getExtraEmailAddresses(): array\n {\n if (empty($this->extra_emails)) {\n return [];\n }\n\n return collect($this->extra_emails)\n ->map(function ($email) {\n return trim($email['email']);\n })\n ->all();\n }", "public static function getEmails($customer_id) {\n \t$emails = array();\n \t\n \tif(is_numeric($customer_id)){\n\t \t$mainmail = Customers::getEmailAddress($customer_id);\n\t \tif(!empty($mainmail)){\n\t \t\t$emails[] = $mainmail;\n\t \t}\n\t \t\n\t $records = Doctrine_Query::create ()->select ( 'contact_id, contact as email' )\n\t \t\t\t\t\t\t\t ->from ( 'Contacts c' )\n\t \t\t\t\t\t\t\t ->leftJoin ( 'c.ContactsTypes t' )\n\t \t\t\t\t\t\t\t ->where ( \"customer_id = ? and t.name = ?\", array($customer_id, \"email\") )\n\t \t\t\t\t\t\t\t ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n\t \n\t foreach ($records as $record){\n\t \t$emails[] = $record['email'];\t\n\t }\t\t\t\t\t \n\t \n\t return !empty($emails) ? $emails : NULL;\n \t}\n }", "function _student_crm_webform_get_field_email_addresses($field, $entity, $entity_type) {\n $emails = array();\n if ($field['settings']['email_address'] == 'manual') {\n return FALSE;\n }\n if ($field['settings']['email_address'] == 'field') {\n $items = field_get_items($entity_type, $entity, $field['settings']['email_field']);\n foreach ($items as $address) {\n $emails[$address['email']] = $address['email'];\n }\n }\n if ($field['settings']['email_address'] == 'contact') {\n $contact = crm_case_get_contact($case);\n $fields = field_info_instances();\n foreach ($fields['crm_contact'][$contact->type] as $field_name => $field) {\n if ($field['widget']['module'] == 'email') {\n $items = field_get_items('crm_contact', $contact, $field_name);\n foreach ($items as $address) {\n $emails[$address['email']] = $address['email'];\n }\n }\n }\n }\n return $emails;\n}", "public function getAddresses() {\n $table = new Yourdelivery_Model_DbTable_Locations();\n return $table->fetchAll('companyId = ' . $this->getId());\n }", "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "public function getMatchedEmailAddress();", "public function getCompanyAddresses(Company $company)\n {\n $builder = $company->addresses()->getQuery();\n\n $resource = $this->datatable->setQueryBuilder($builder);\n\n return $resource->getResponse();\n }", "public function emails()\n {\n return $this->emails;\n }", "public function getAllConsents($email)\n {\n return $this->model->getAll($email);\n }", "public function lead_email_list($company_email, $lead_email)\n {\n $result = common_select_values('e.*, COUNT(e.parent_id) as mail_count, (select GROUP_CONCAT(filename) from files WHERE email_id = e.id ) as attach_file_name', 'emails e', ' e.company_email = \"'.$company_email.'\" AND e.lead_email =\"'.$lead_email.'\" GROUP BY e.parent_id ORDER BY e.mail_date ASC', 'result');\n return $result;\n }", "public function getAllRecipientAddresses()\n {\n }", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "function getCoordinatorEmailAll() {\n $sqlQuery = \"SELECT coordinatorEmail FROM congregation_coordinator\";\n $result = $this->DB->executeQuery($sqlQuery, $this->Functions->paramsIsZero(), \"select\");\n if($result) {\n return $result;\n }else {\n return null;\n }\n }", "public function emailadressen() {\r\n\t\t$objDBMaillijstEmailAdres = new clsDBMaillijstEmailAdres();\r\n\t\tforeach($objDBMaillijstEmailAdres->selectAll($this->getm_iBedrijfID(), $this->getm_iMaillijstID()) as $rs){\r\n\t\t\tarray_push($this->m_colEmailAdressen,new clsEmailAdres($rs['BedrijfID'],$rs['EmailAdresID'])); // voeg object MaillijstEmailAdres toe aan emailadressen collection\r\n\t\t};\r\n\t \treturn $this->m_colEmailAdressen;\r\n\t}", "function getContactEmailAssocList($prj_id, $customer_id)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getContactEmailAssocList($customer_id);\n }", "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "abstract function getEmailsArray() : array;", "private function clean_poea_email($email) {\n\n \t$emails = array();\n\n \t$email = str_replace('@y.c', \"@yahoo.com\", $email);\n\n\t\t$slash_email = explode(\"/\", $email);\n\t\t$or_email = explode(\" or \", $email);\n\t\t$and_email = explode(\"&\", $email);\n\n\t\tif(count($slash_email) > 1) {\n\t\t\t\n\t\t\tforeach ($slash_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t\t\t$emails[] = $v;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(count($and_email) > 1) {\n\n\t\t\tforeach ($and_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t\t\t$emails[] = $v;\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(count($or_email) > 1) {\n\n\t\t\tforeach ($or_email as $v) {\n\n\t\t\t\t$v = trim($v);\n\n\t\t\t\tif(filter_var($v, FILTER_VALIDATE_EMAIL)) {\n\t\n\t\t\t\t\t$emails[] = $v;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t} elseif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\n\t\t\t$emails[] = $email;\t\n\n\t\t}\n\n\t\tif(empty($emails)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn json_encode($emails);\n }", "public function getUserMails()\r\n\t{\r\n\t\t$userDir = __DIR__ . '/../../settings/users';\r\n\t\t\t\t\r\n\t\t/* check if users directory exists */\r\n\t\tif(!is_dir($userDir)){ return array(); }\r\n\t\t\r\n\t\t/* get all user files */\r\n\t\t$users = array_diff(scandir($userDir), array('..', '.'));\r\n\t\t\r\n\t\t$usermails\t= array();\r\n\r\n\t\tforeach($users as $key => $user)\r\n\t\t{\r\n\t\t\tif($user == '.logins'){ continue; }\r\n\r\n\t\t\t$contents \t= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);\r\n\r\n\t\t\tif($contents === false){ continue; }\r\n\r\n\t\t\t$searchfor \t= 'email:';\r\n\r\n\t\t\t# escape special characters in the query\r\n\t\t\t$pattern \t= preg_quote($searchfor, '/');\r\n\t\t\t\r\n\t\t\t# finalise the regular expression, matching the whole line\r\n\t\t\t$pattern \t= \"/^.*$pattern.*\\$/m\";\r\n\r\n\t\t\t# search, and store first occurence in $matches\r\n\t\t\tif(preg_match($pattern, $contents, $match)){\r\n\t\t\t\t$usermails[] = trim(str_replace(\"email:\", \"\", $match[0]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usermails;\r\n\t}", "public function getEmail(){\n\t\t\t\t\t\t\t$sql = \"SELECT email from users \";\n\t\t\t\t\t\t\t$statement = $this->db->prepare($sql);\n\t\t\t\t\t\t\t$statement->execute();\n\t\t\t\t\t\t\t$result = $statement->fetch();\n\t\t\t\t\t\t\t// $result = $statement->fetchAll();\n\n\t\t\t\t\t\t\tprint_r($result);\n\t\t\t\t\t\n\t\t\t\t\t}", "public function emailAddresses()\n {\n return $this->hasMany(OfficeEmailAddress::class);\n }", "public function emailAddresses()\n {\n return $this->hasMany(OfficeEmailAddress::class);\n }", "public function getEmailDomains()\n {\n $domains = array();\n \n foreach(Core_Model_DiFactory::getClientManager()->getClients() as $clientId => $client) {\n if($client->hasService(MazelabVpopqmail_Model_ConfigManager::MODULE_NAME)) {\n $domains = array_merge($domains, $this->getEmailDomainsByOwner($clientId));\n }\n }\n \n return $domains;\n }", "public function get_verified_emails() {\r\n\r\n\t\tset_error_handler( array( $this, 'ses_error_handler' ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler\r\n\r\n\t\t$data = $this->get_client()->listVerifiedEmailAddresses();\r\n\t\t$emails = array();\r\n\r\n\t\tif ( isset( $data['Addresses'] ) ) {\r\n\t\t\t$emails = $data['Addresses'];\r\n\t\t\tDebug::clear();\r\n\t\t}\r\n\r\n\t\treturn $emails;\r\n\t}", "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }", "public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getMail();", "public function getCompanyWithUsers();", "public function getCustomerEmail();", "public function getCustomerEmail();", "public function getCustomerEmail();", "public function getAllVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], null);\n }", "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "public function getEmails($filters = [])\n {\n $authUser = Auth::user();\n $user = [];\n\n if (!ine($filters, 'users')) {\n $user[] = $authUser->id;\n\t\t} else {\n\t\t\t$user = $filters['users'];\n\t\t\tif($user != 'all') {\n\t\t\t\t$user = (array)$user;\n\t\t\t}\n }\n\n if (ine($filters, 'users') && !$authUser->isAuthority()) {\n $user[] = (array)$authUser->id;\n }\n\n if ((ine($filters, 'customer_id') || ine($filters, 'job_id') || ine($filters, 'stage_code'))) {\n if($authUser->isSubContractorPrime() && isset($filters['users'])) {\n\t\t\t\t$user = (array)$filters['users'];\n\t\t\t} else {\n\t\t\t\t$user = [];\n\t\t\t}\n }\n $filters['users'] = $user;\n $emails = $this->repo->getEmails($filters);\n return $emails;\n }", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function cria_lista_emails($emails){\n $temp = explode(';', $emails);\n\n $dest = array();\n $i = 0;\n\n foreach($temp as $valor){\n if($valor != ''){\n $dest[$i]['nome'] = $valor;\n $dest[$i]['email'] = $valor;\n\n $i++;\n }\n }\n\n return $dest;\n }", "abstract public function findRelatedRecordsByEmail(): array;", "public static function emails($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_EMAIL . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}", "protected function getEmailRecipients($email)\n {\n return json_encode(array_merge(\n $this->extractAddressesFromArray($email->getTo()),\n $this->extractAddressesFromArray($email->getCc()),\n $this->extractAddressesFromArray($email->getBcc())\n ));\n }", "function getUserEmails($users)\n{\n return App\\Collection::make($users)->filter(function ($user) {\n return $user['email'] !== null;\n })->map(function ($user) {\n return $user['email'];\n })->toArray();\n}", "private function getUsersFromStruct($companyStruct){\r\n // Get users ID by emails\r\n $users = array();\r\n foreach($companyStruct as $arStruct){\r\n if($arStruct['Руководитель'])\r\n $emails[] = $arStruct['Руководитель'];\r\n\r\n foreach($arStruct['Кураторы']['Куратор'] as $email) {\r\n $emails[] = $email;\r\n }\r\n }\r\n\r\n $emails = array_unique($emails);\r\n if($emails[0]){\r\n $res = CUser::GetList(($by=\"id\"), ($order=\"desc\"), [\"EMAIL\" => implode(\" | \", $emails)], ['FIELDS' => ['ID', 'EMAIL']]);\r\n while($ar_res = $res -> GetNext(true, false)){\r\n $users[$ar_res['EMAIL']] = $ar_res['ID'];\r\n }\r\n }\r\n\r\n return $users;\r\n }", "public function getOrderEmailList(){\n // Set method and action\n $method = 'email';\n $action = 'getOrderEmailList';\n\n // Set data\n $data = array('params' => true);\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "public function getAdminEmails() {\n //get administration email array\n $administration_email = Doctrine::getTable('AdministrationEmails')->getEmails();\n\n\n //create admin email query\n $admin_email_query = Doctrine_Query::create()\n ->select('sgu.email_address')\n ->from('sfGuardUser sgu')\n ->leftJoin('sgu.sfGuardUserPermission sgup')\n ->whereNotIn('sgu.email_address', $administration_email)\n ->andWhere('sgup.user_id IS NOT NULL');\n $admin_email_record = $admin_email_query->fetchArray();\n $administration_email_array = array('Dirección de correo electrónico Selecte');\n foreach ($admin_email_record as $index => $email) {\n $administration_email_array[$email['email_address']] = $email['email_address'];\n }\n return $administration_email_array;\n }", "protected function getSenderEmailAddress() {}", "protected function getSenderEmailAddress() {}", "public function findEmployeeByEmail($email) {\n // use XPath to find the employee we're looking for\n $query = '//employees/employee/email[text() = \"' . $email . '\"]/..';\n\n // create a new XPath object and associate it with the document we want to query against\n $xpath = new DOMXPath($this->domDocument);\n $result = $xpath->query($query);\n $arrEmps = array();\n if($result->length){\n // iterate of the results\n $classCounter = 0;\n foreach($result as $emp) {\n // add the details of the employee to an array\n $arrEmps[$classCounter][\"name\"] = $emp->getElementsByTagName(\"name\")->item(0)->nodeValue;\n $arrEmps[$classCounter][\"gender\"] = $emp->getElementsByTagName(\"gender\")->item(0)->nodeValue;\n $arrEmps[$classCounter][\"phone\"] = $emp->getElementsByTagName(\"phone\")->item(0)->nodeValue;\n $arrEmps[$classCounter][\"email\"] = $emp->getElementsByTagName(\"email\")->item(0)->nodeValue;\n $classCounter++;\n }\n }\n return $arrEmps;\n }", "function cp_do_view_supplier_emails($adata) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get all email addresses for a supplier\n\t\t$sinfo\t= get_contact_supplier_info($adata['s_id']);\n\t\t$s_emails\t= get_contact_supplier_info_alias($adata['s_id'], 1);\n\t\t$x\t\t= sizeof($s_emails);\n\n\t# Set Query parameters for select.\n\t\t$query\t = 'SELECT *';\n\t\t$_from\t = ' FROM '.$_DBCFG['mail_archive'];\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$sinfo['s_email'].\"'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$sinfo['s_email'].\"'\";\n\t\t} ELSE {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t}\n\t\tIF ($x) {\n\t\t\tFOR ($i=0; $i<=$x; $i++) {\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t} ELSE {\n\t\t \t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_order = ' ORDER BY '.$_DBCFG['mail_archive'].'.ma_time_stamp DESC';\n\n\t\tIF (!$_CCFG['IPL_SUPPLIERS'] > 0) {$_CCFG['IPL_SUPPLIERS'] = 5;}\n\t\t$_limit = ' LIMIT 0, '.$_CCFG['IPL_SUPPLIERS'];\n\n\t# Get count of rows total:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= $_from;\n\t\t$query_ttl .= $_where;\n\t\t$result_ttl\t= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Do select listing records and return check\n\t\t$query\t.= $_from.$_where.$_order.$_limit;\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"7\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['l_Email_Archive'];\n\t\t$_out .= ' ('.$numrows.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\tIF ($numrows_ttl > $_CCFG['IPL_SUPPLIERS']) {\n\t \t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive&search_type=1&s_to='.$sinfo['s_email'].'&s_from='.$sinfo['s_email'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t \t\t}\n\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive', $_TCFG['_S_IMG_SEARCH_S'],$_TCFG['_S_IMG_SEARCH_S_MO'],'','');\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Id'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Date_Sent'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_ADMIN']['l_Subject'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.$row['ma_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT'] ).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=resend&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_EMAIL_S'],$_TCFG['_S_IMG_EMAIL_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'].'&_suser_id='.$adata['_suser_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod_print.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_PRINT_S'],$_TCFG['_S_IMG_PRINT_S_MO'],'_new','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=delete&obj=arch&stage=2&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return results\n\t\treturn $_out;\n}", "public static function getMailingList($criteria) {\n $mailingList = array();\n\n $arr = X2Model::model('Contacts')->findAll();\n foreach ($arr as $contact) {\n $i = preg_match(\"/$criteria/i\", $contact->backgroundInfo);\n if ($i >= 1) {\n $mailingList[] = $contact->email;\n }\n }\n return $mailingList;\n }", "private function filterEmailNotificationsRecipients()\n {\n return collect($this->getEmailNotificationsRecipients())\n ->filter(function (array $recipient) {\n return isset($recipient['address'])\n && is_email($recipient['address']);\n })\n ->toArray();\n }", "public function alertEmailList($accountId) {\n $result = $this->db->where('id', $accountId)->select('support_email,fault_alert_email,safety_alert_email')->from('accounts')->get();\n\n if ($result->num_rows() > 0) {\n\n return $result->result_array();\n } else {\n return FALSE;\n }\n }", "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "public function buscarPorEmail($email){\n\t\t$conexion = $GLOBALS['conexion'];\t\t\n\t\t$query=\"SELECT * FROM persona WHERE email='$email'\";\n\t\t$enlace=$conexion->query($query);\n\t\t$dataPersona=array();\n\t\t//$id = 0;\n\t\twhile($fila=$conexion->fetch_array($enlace)){\n\t\t\t//$id = $fila['id'];\n\t\t\t$dataPersona = array(\n\t\t\t\t\t\t\t\t'id'=>$fila['id'],\n\t\t\t\t\t\t\t\t'estado_procesado'=>$fila['estado_procesado'],\n\t\t\t\t\t\t\t\t'estado'=>$fila['estado'],\n\t\t\t\t\t\t\t);\n\t\t}\n\t\treturn $dataPersona;\t\t\n\t\t//return $id;\n\t}", "function getAddresses($headerObjs, $charset) {\n $addresses = array();\n\n for ($i = 0; $i < count($headerObjs); $i++) {\n $headerObj = $headerObjs[$i];\n\n // add the address part\n $address = $headerObj->mailbox;\n if($headerObj->host != \"UNKNOWN\")\n $address .= \"@\" . $headerObj->host;\n\n // add the name part\n if ($headerObj->personal != \"\")\n $address = formatHeaderForDisplay($headerObj->personal, $charset) . \" <\" . $address . \">\";\n\n $addresses[] = $address;\n }\n\n return $addresses;\n}", "public function filterValidEmailsProvider() {}" ]
[ "0.76817536", "0.73950094", "0.7093795", "0.6934842", "0.6911653", "0.6858012", "0.67932844", "0.6753917", "0.6744513", "0.6726846", "0.6710811", "0.66739064", "0.6659107", "0.6590686", "0.6579141", "0.65581965", "0.6490907", "0.6490127", "0.648841", "0.6458377", "0.64563", "0.64536846", "0.6426762", "0.6426762", "0.6425208", "0.63783157", "0.63468176", "0.6328501", "0.6315996", "0.6309611", "0.630681", "0.62656987", "0.6261583", "0.62612206", "0.6260689", "0.62541586", "0.6250577", "0.62367463", "0.623225", "0.6230744", "0.62262726", "0.6201662", "0.6159856", "0.6139923", "0.6128252", "0.6127965", "0.6107374", "0.60954654", "0.6052133", "0.6049996", "0.60465354", "0.60429704", "0.60429704", "0.6035467", "0.6022891", "0.6017301", "0.6015282", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.6013967", "0.5973163", "0.59543955", "0.59416544", "0.59416544", "0.59416544", "0.593936", "0.5932847", "0.5926684", "0.59131545", "0.59131545", "0.59131545", "0.59117645", "0.59117645", "0.5909202", "0.59090143", "0.5884268", "0.5884006", "0.58713573", "0.58711123", "0.5853148", "0.5851248", "0.5845435", "0.5845435", "0.58351886", "0.5817852", "0.5816665", "0.5814583", "0.5812151", "0.5771258", "0.5751497", "0.5750137", "0.57385004" ]
0.7053258
3
Returns Customer_Company objects of all employees of this company
public function getEmployees() { if ( is_null($this->_employees) ){ $customers = $this->getTable()->getEmployees(); $objects = new splObjectStorage(); foreach ($customers AS $customer) { try { $ccust = new Yourdelivery_Model_Customer_Company($customer->customerId, $this->getId()); if ($ccust->isDeleted()) { continue; } } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $objects->attach($ccust); } $this->_employees = $objects; } return $this->_employees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCompanyEmployees();", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public static function employees(Company $company): array\n {\n // number of employees in total\n $totalNumberOfEmployees = $company->employees()->notLocked()->count();\n\n // 10 random employees\n $tenRandomEmployeesCollection = collect([]);\n $allEmployees = $company->employees()\n ->notLocked()\n ->with('picture')\n ->inRandomOrder()\n ->take(10)\n ->get();\n\n foreach ($allEmployees as $employee) {\n $tenRandomEmployeesCollection->push([\n 'id' => $employee->id,\n 'name' => $employee->name,\n 'avatar' => ImageHelper::getAvatar($employee, 32),\n 'url' => route('employees.show', [\n 'company' => $company,\n 'employee' => $employee,\n ]),\n ]);\n }\n\n // ten random employees\n\n // number of employees hired in the current year\n $employeesHiredInTheCurrentYear = $company->employees()\n ->notLocked()\n ->whereYear('hired_at', (string) Carbon::now()->year)\n ->count();\n\n return [\n 'employees_hired_in_the_current_year' => $employeesHiredInTheCurrentYear,\n 'ten_random_employees' => $tenRandomEmployeesCollection,\n 'number_of_employees_left' => $totalNumberOfEmployees - $tenRandomEmployeesCollection->count(),\n 'view_all_url' => route('employees.index', [\n 'company' => $company,\n ]),\n ];\n }", "public static function FilterByEmployees() {\n\t\t\t\n\t\t\t$sql = \"SELECT Code,Employee_Name FROM employees\";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees1 = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees1[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees1;\n\t\t}", "public function getAllEmployees();", "public function getEmployees() {\n\n /* Fetch all included employee IDs */\n $employeeIDs = $this->getIncludedEmployeeIDs();\n\n\n /* Set orWhereIn variables */\n array_push($this->whereIn, [\n 'column' => 'employee_id',\n 'array' => $employeeIDs\n ]);\n }", "public static function DisplayAll() {\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM employees \";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees;\n\t\t}", "public function getCompaniesReport() : CompaniesReport\n\t{\n\t\t$response = $this->execute('Empresa');\n\t\t\n\t\t$companiesByArea = [];\n\t\tforeach($response['e'] as $areaPool){\n\t\t\t$i = $areaPool['a'];\n\t\t\tforeach($areaPool['e'] as $company){\n\t\t\t\t$companiesByArea[$i][]=new Company(\n\t\t\t\t\t$company['a'],\n\t\t\t\t\t$company['c'],\n\t\t\t\t\t$company['n']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn new CompaniesReport($response['hr'],$companiesByArea);\n\t}", "public function companies(): Collection\n {\n return Company::all();\n }", "public function employees()\n {\n $response = $this->client->get('employees');\n\n return collect($response->json('collection'))->mapInto(Employee::class);\n }", "public function getAllEmployees() \n {\n $employees = Employees::getEmployees();\n\n foreach($employees as $key => $employee){\n $newArrayEmployees[$key] = $this->generateEmployeeData($employee);\n }\n\n sort($newArrayEmployees);\n\n return $newArrayEmployees;\n }", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public static function getEmployees($conn) {\r\n\r\n \r\n // set static database connection\r\n $dbc = $conn->getdbc();\r\n\r\n // for now (or permanently) directly include SQL here\r\n $sql_showEmployees = \"SELECT * FROM employees\";\r\n\r\n\r\n if ($result = $dbc->query($sql_showEmployees)) {\r\n\r\n $employees = [];\r\n\r\n while ($row = $result->fetch()) {\r\n\r\n $employees[] = Employee::create($conn, $row['id'], $row['fname'], $row['lname'], $row['email']);\r\n }\r\n // return users array\r\n return $employees;\r\n } else {\r\n\r\n echo \"<p> Could not run query </p>\";\r\n }\r\n }", "public function getEmployee()\n\t{\n\t\t$arr = $this->queryToDbObj->getEmployeeList();\n\n\t\treturn $arr;\n\t}", "public function getAllEmployees() {\n\t\t$em = $this->getEntityManager();\n\t\t$employees = $em->createQueryBuilder()\n\t\t\t->select('e.employeeID,e.userName')\n\t\t\t->from('Employee', 'e')\n\t\t\t->orderBy('e.employeeID')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"employees\" => $employees\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public function employees()\n {\n return $this->users->where('account_type', 'Employee');\n }", "public function Employees()\n {\n $this->_Employees->ClearAllOptions();\n return $this->_Employees;\n }", "public static function allEmployeesEmail($companyId = null) {\n if (is_null($companyId)) {\n return array();\n }\n\n $db = Zend_Registry::get('dbAdapter');\n return $db->query('select c.email from customers c inner join customer_company cc on c.id=cc.customerId where c.deleted=0 and cc.companyId=' . $companyId . ' order by c.email')->fetchAll();\n }", "public function getAllEmployers();", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function selectAll() {\r\n $query = \"SELECT * FROM \" . EmpleoDAO::EMPLEO_TABLE;\r\n $result = mysqli_query($this->conn, $query);\r\n $empleos = array();\r\n while ($empleoBD = mysqli_fetch_array($result)) {\r\n\r\n $empleo = new Empleo();\r\n $empleo->setId($empleoBD[\"idJob\"]);\r\n $empleo->setPosition($empleoBD[\"position\"]);\r\n $empleo->setCompany($empleoBD[\"company\"]);\r\n $empleo->setLogo($empleoBD[\"logo\"]);\r\n $empleo->setDescription($empleoBD[\"description\"]);\r\n $empleo->setSalary($empleoBD[\"salary\"]);\r\n\r\n array_push($empleos, $empleo);\r\n }\r\n return $empleos;\r\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function getAdmins() {\n $a = new SplObjectStorage();\n $admins = $this->getTable()->getAdmins();\n foreach ($admins as $admin) {\n try {\n $customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId());\n $a->attach($customer);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n }\n return $a;\n }", "public function getCompaniesToSuspend() {\n return $this->createQuery('c')\n ->select('c.*')\n ->from('Companies_Model_Company c')\n ->where('c.status = ?', Companies_Model_Company::STATUS_EXPIRED)\n ->addWhere('c.payment_date IS NOT NULL AND ADDDATE(c.payment_date, 8) < NOW()')\n ->execute();\n }", "public static function vehicles_employees_crits(){\n\t\treturn array('(company_name'=>CRM_ContactsCommon::get_main_company(),'|related_companies'=>array(CRM_ContactsCommon::get_main_company()));\n }", "public function getCompanyWithUsers();", "function exeGetAllEmployees() {\n $exeGetAllEmployees = $this->db->query(\"SELECT *\n FROM employees\n WHERE status >= 0\n ORDER BY firstname ASC, lastname ASC\");\n \n return $exeGetAllEmployees->result_array();\n }", "public function getEmployees()\n {\n return $this->hasMany(Employee::className(), ['Emp_tumbol' => 'id']);\n }", "public function getAllOfficeEmployers();", "public function getAllEmp(){\n\t\t$sql = \"SELECT * FROM empreendimento;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function findAllEmployeesAsArray()\n {\n return $this->createQueryBuilder('e')\n ->getQuery()\n ->getArrayResult();\n\n }", "public function getAllCompanyAccounts()\n { \n // select all fields and columns form the 'companies' table and return is as an array of objects\n $companies = Company::all();\n\n // if the length of array of company objects is greater than 0 (contains elements)\n if (count($companies) > 0) {\n // loop through each company, get the token from the 'company_activation_codes' table and update the object\n foreach ($companies as $key => $value) {\n $token = CompanyActivationCode::where('company_id', $value['id'])->first()->activation_code;\n $value['token'] = $token;\n $companies[$key] = $value;\n }\n }\n \n // send a response to the requester of the data\n $response_message = array('success' => true, 'message' => 'Data fetched', 'data' => $companies);\n return response()->json($response_message);\n }", "public function selectAll() {\n\t\t$employees = $this->employee->all();\n\n\t\t$data = array();\n\t\tforeach ($employees as $employee) {\n\t\t\t$data[] = array(\n\t\t\t\t'name' => $employee->name . ' (' . $employee->contact_number . ')',\n\t\t\t\t'id' => $employee->id,\n\t\t\t);\n\t\t}\n\n\t\treturn $data;\n\t}", "function getEmployees($crewName) {\r\n\t\tglobal $databaseName;\r\n\t\tglobal $timesheetDate;\r\n\t\tglobal $builder;\r\n\t\tglobal $subdivision;\r\n\t\tglobal $lot;\r\n\t\tglobal $action;\r\n\t\t$employeesArr = array();\r\n\t\t\r\n\t\t$timesheetDateTS = strtotime($timesheetDate);\r\n\t\tif($timesheetDateTS > 0) {\r\n\t\t\t$date = date('m/d/y', $timesheetDateTS);\r\n\t\t}\r\n\r\n\t\t// Get Forman employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_forman`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\tarray_push($employeesArr, $employee);\r\n\t\t}\r\n\t\t\r\n\t\t// Get Mason employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_mason`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Apprentice employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_apprentice`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Apprentice employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_labor`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Driver employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_driver`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Operator employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_operator`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $employeesArr;\r\n\t}", "public function listAllEmployees()\n {\n foreach (Employee::all() as $employee) {\n $response[] = new EmployeeResource($employee);\n }\n return $this->responseSuccess(['employees' => $response]);\n }", "public function get_employees() {\n\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->uri->segment(4);\n\t\t\n\t\t$data = array(\n\t\t\t'company_id' => $id\n\t\t\t);\n\t\t$session = $this->session->userdata('username');\n\t\tif(!empty($session)){ \n\t\t\t$this->load->view(\"admin/assets/get_employees\", $data);\n\t\t} else {\n\t\t\tredirect('admin/');\n\t\t}\n\t\t// Datatables Variables\n\t\t$draw = intval($this->input->get(\"draw\"));\n\t\t$start = intval($this->input->get(\"start\"));\n\t\t$length = intval($this->input->get(\"length\"));\n\t }", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function get_employees() {\n\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->uri->segment(4);\n\t\t\n\t\t$data = array(\n\t\t\t'company_id' => $id\n\t\t\t);\n\t\t$session = $this->session->userdata('username');\n\t\tif(!empty($session)){ \n\t\t\t$this->load->view(\"admin/events/get_employees\", $data);\n\t\t} else {\n\t\t\tredirect('admin/');\n\t\t}\n\t\t// Datatables Variables\n\t\t$draw = intval($this->input->get(\"draw\"));\n\t\t$start = intval($this->input->get(\"start\"));\n\t\t$length = intval($this->input->get(\"length\"));\n\t }", "public function GetAllEmployees()\r\n\t{\t\r\n\t\t$WhereCondition = \"\";\r\n\t\t$query = $this->db->query(\" \t\r\n\t\t\t\t\t\t\t\t\tSELECT * FROM `tbl_user`\r\n\t\t\t\t\t\t\t\t\tWHERE user_designation_id = 3\r\n\t\t\t\t\t\t\t\t\t$WhereCondition\r\n\t\t\t\t\t\t\t\t\tORDER BY user_name\r\n\t\t\t\t\t\t\t\t\");\r\n\t\t$result = $query->result_array();\t\t\t\r\n\t\treturn $result;\r\n\t}", "public static function getList(){\n return DB::table('employees')->get();\n }", "public function companies()\n {\n return $this->hasMany('App\\Company');\n }", "public function getOwnerCompanies () {\n\t\t\tif (count($this) === 0) return new ArrayObjectList;\n\n\t\t\t$db \t\t= db::singleton();\n\t\t\t$table \t\t= TABLE_DOCUMENTOS_ELEMENTOS . \" INNER JOIN \". TABLE_DOCUMENTO_ATRIBUTO . \" USING (uid_documento_atributo)\";\n\t\t\t$set \t\t= $this->toComaList();\n\t\t\t$SQL \t\t= \"SELECT uid_empresa_propietaria FROM {$table} WHERE uid_documento_elemento IN ({$set}) GROUP BY uid_empresa_propietaria\";\n\t\t\t$collection\t= $db->query($SQL, '*', 0, \"empresa\");\n\n\n\t\t\treturn new ArrayObjectList($collection);\n\t\t}", "public function getEmployees()\n {\n if ($this->_employees === null) {\n // Use the internal _getProperty() API to read the actual property.\n // NOTE: This function only throws if \"employees\" contains any\n // invalid non-basic data. Only basic PHP types are accepted.\n $this->_employees = $this->_getProperty('employees'); // Throws.\n }\n\n foreach ($this->_employees as &$value) {\n if (is_array($value)) {\n $value = new User($value); // Throws.\n }\n }\n\n return $this->_employees;\n }", "public function GetCompaniesArray()\n\t{\n\t\tif (!$this->companies)\n\t\t{\n\t\t\t$this->dbase->Select('job_companies', array('company_id', 'name', 'OPF'), array(), array('name' => 'ASC'));\n\t\t\t$this->companies = array();\n\t\t\twhile ($company = $this->dbase->FetchArray())\n\t\t\t{\n\t\t\t\t$this->companies[$company['company_id']] = $company['name'] . \", \" . $this->lang[$company['OPF'] . \"_short\"];\n\t\t\t}\n\t\t}\n\t\treturn $this->companies;\n\t}", "public function getEmployees() { // gets all employees who have the responsability of dealing with visitor comments\n $db = Database::getDB();\n $query = 'SELECT * FROM planners WHERE employeeID < 5\n ORDER BY employeeID';\n $statement = $db->prepare($query);\n $statement->execute();\n \n $employees = array();\n foreach ($statement as $row) {\n $employee = new Employee($row['employeeID'],$row['fname']);\n $employees[] = $employee;\n }\n return $employees;\n }", "public function findCompanies(){\n $data = SCompany::select('id_company', 'name')\n ->get();\n return response()->json($data);\n }", "public static function getEmployee()\n {\n $employees = Employee::select('id', 'name')\n ->where('owner_id', auth_cache()->userable->id)\n ->whereDoesntHave('roles')\n ->get();\n\n return response()->json($employees);\n }", "public function index(){\n $companies=Company::where('client_id',Auth::user()->profile_id)->get();\n\n if($companies!=null){\n $employees = collect(new Employee);\n \n foreach($companies as $company){\n $employees->push(Employee::where('company_id',$company->id)->get());\n }\n\n $employees = $employees->collapse();\n\n \n return view('/client/client_home' , ['companies'=> $companies , 'employees'=>$employees]);\n }\n else \n return view('/client/client_home');\n\n \n}", "public static function FilterByActivity() {\n\t\t\t\n\t\t\t$sql = \"SELECT Code,Title FROM employees\";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees1 = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees1[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees1;\n\t\t}", "public function employees() {\n return $this->hasMany(Employee::class);\n }", "public function employees()\n {\n return $this->hasMany(Employee::class);\n }", "function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$CompArr[$Sql->Position]['Name']=htmlspecialchars(stripslashes($Row->NAME));\n\t\t$CompArr[$Sql->Position]['Value']=$Row->ID;\n\t}\n\treturn $CompArr;\n}", "public function getOriginCompanies () {\n $corp = $this->perteneceCorporacion();\n\n if ($corp) {\n return new ArrayObjectList([$corp, $this]);\n }\n\n return new ArrayObjectList([$this]);\n }", "public function getAllCompanies(){\n\t\t$path=\"../db/data.json\";\n\t\t$file=$this->getData($path);\n\t\n\t\t$arrayFile = json_decode($file, true);\n\t\n\t\treturn $arrayFile['companies'];\n\t}", "public function getAll()\r\n {\r\n // Query the database and return an array of contacts\r\n return $this->getEntityManager()\r\n ->createQuery(\r\n 'SELECT c FROM AppBundle:Contact c ORDER BY c.firstName, c.lastName ASC'\r\n )\r\n ->getResult();\r\n }", "public function findAll()\r\n {\r\n $sql = \"select * from tb_employer where employerid <> 1 order by employerid asc\";\r\n $statement = $this->commonPDO->query($sql);\r\n return $statement->fetchAll();\r\n }", "public function getCustomers() {\n $customerList = array();\n $i = 0;\n $sql = \"SELECT email, passwd, customer_name, address, city, state, country, zip, phone From signup_app.customers\";\n $customers = $this->db->query($sql);\n //$customer = $customers->fetch();\n if ($customers->num_rows > 0) {\n while ($customer = $customers->fetch_assoc()) {\n $customerList[$i++] = new Customer(\n $customer['email'], $customer['passwd'], $customer['customer_name'], $customer['address']\n , $customer['city'], $customer['state'], $customer['country'], $customer['zip'], $customer['phone']\n );\n }\n return $customerList;\n }\n }", "public function index()\n {\n return Api_Employees::all()->toArray(); \n }", "public function getCompanies($eliminadas = false, $limit = false){\n return $this->obtenerEmpresasSuperiores($eliminadas, $limit);\n }", "public function getCompaniesForSelect()\n {\n return Company::whereNull('deleted_at')->pluck('name', 'id');\n }", "static function getAllCustomerWithOrders(){\r\n\t\tglobal $DB;\r\n\t\t$retval = Array();\r\n\t\t\r\n\t\t$sql = \"SELECT DISTINCT personalization_orders.customerid FROM personalization_orders WHERE `status` >= 1 AND orderdate > 0\";\r\n\r\n\t\tif($DB->num_rows($sql)){\r\n\t\t\tforeach($DB->select($sql) as $r){ \r\n\t\t\t\t$retval[] = new BusinessContact($r[\"customerid\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "function select_all_company() {\n\t\t$qury=\"SELECT * FROM company\";\n\t\t$requet=mysqli_query($link,$qury);\n\t\t\n\t\twhile($res=mysqli_fetch_assoc($requet)) {\n\t\t\t$data[]=$res;\n\t\t}\n\t\treturn $data;\n\t}", "public function getCompany();", "function get_all_employees($terms = null ){\n\t\tif(!is_null($terms)){\n\t\t\t$sql = \"SELECT *\n\t\t\tFROM employees\n\t\t\tWHERE employee_name LIKE '$terms%' \";\n\t\t\tif(is_numeric($terms)){\n\t\t\t$sql = \"SELECT *\n\t\t\tFROM employees\n\t\t\t\tWHERE employee_id = '$terms' \";\n\t\t\t}\n\t\t\t$query = $this->db->query($sql);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t$query = $this->db->get('employees');\n\t\t}\n\t\treturn $query->result();\n\t\t\n\t}", "public function getAllDataEmployees(){\n\t\t\t$this->db->select('*')->from('tbl_employees');\n\t\t\treturn $this->db->count_all_results();\n\t\t}", "function getAllEmpleadosDatos()\n\t\t\t{\n\t\t\t\t$request=\"SELECT `Id_Empleado` FROM `empleados` WHERE 1\";\n\t\t\t\t$result=$this->query->consulta($request);\n\t\t\t\t$empleadosIds=array();\n\t\t\t\t$empleadosDatos=array();\n\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t \n\t\t\t\t while($datos = $result->fetch_assoc()) {\n\n\t\t\t\t array_push($empleadosIds,$datos[\"Id_Empleado\"]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\tforeach ($empleadosIds as $id_empleado) {\n\t\t\t\t\t\n\t\t\t\t\t$empleado_temp=new Empleado();\n\t\t\t\t\t$empleado_temp->obtenerDatosId($id_empleado);\n\t\t\t\t\tarray_push($empleadosDatos,$empleado_temp->getAllDatos2());\n\n\t\t\t\t}\n\n\t\t\t\treturn $empleadosDatos; \n\t\t\t}", "public function getCustomers(): array\r\n {\r\n try {\r\n $statement = $this->db->prepare(\"select * from customers\");\r\n $statement->execute();\r\n return $this->customers = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n } catch (\\PDOException $e) {\r\n throw new \\Mpopa\\ExpException(\"Can't get customers: \" . $e->getMessage());\r\n }\r\n }", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function getCompany() {}", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "public function index()\n {\n $company = $this->repository->all();\n return $company;\n }", "public function getCompany() : \\App\\Domain\\Model\\Company\n {\n return $this->getRef('from__company_id__to__table__companies__columns__id', 'products');\n }", "public function employees()\n {\n return $this->hasMany(Employee::class);\n\n }", "public function companies()\n {\n return $this->morphedByMany('App\\Company', 'taggable');\n }", "public static function findAllEmpls(){\n try {\n\t\t\t$liste = new Liste();\n\t\t\t$requete = \"SELECT * FROM user where type_user='emp'\";\n\t\t\t$cnx = Database::getInstance();\n\t\t\t$res = $cnx->query($requete);\n\t\t foreach($res as $row) {\n\t\t\t\t$u = new User();\n\t\t\t\t$u->loadFromRecord($row);\n\t\t\t\t$liste->add($u);\n\t\t }\n\t\t $cnx = null;\n\t\t\treturn $liste;\n\t\t} catch (PDOException $e) {\n\t\t print \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t return $liste;\n\t\t}\t\n }", "public function employees() {\n return $this->hasMany('App\\Employee');\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function companylist() {\r\n $companies = $this->model->getCompanies();\r\n return $this->view('company/companylist', $companies);\r\n }", "public function getPersonelAdd() {\n $companies = Companies::all();\n return $companies;\n }", "public static function getList()\n {\n $companies = static::find()->select(['id', 'name'])->asArray()->all();\n return array_column($companies, 'name', 'id');\n }", "public static function getAllCustomers()\n\t{\n\t\t$customers = self::where('users_role',UserRole::CUSTOMER_ROLE_ID)->get();\n\t\treturn $customers;\n\t}", "public static function getCustomers(){\n\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM customer\n\t\t\t\";\n\n\t\t// Make a PDO statement\n\t\t$statement = DB::prepare($sql);\n\n\t\t// Execute\n\t\tDB::execute($statement);\n\n\t\t// Get all the results of the statement into an array\n\t\t$results = $statement->fetchAll();\n\n\t\t$customers = [];\n\t\tforeach($results as $row) {\n\t\t\t$customers[]= new Customer($row['id'], $row['first_name'], $row['last_name'], $row['email'], $row['gender'], $row['customer_since']);\n\t\t}\n\t\treturn $customers;\n\t}", "public function employees()\n\t{\n\t\treturn $this->hasOne(Employee::class,'id','emp_id');\t\t\t\t\n\t}", "public function index()\n {\n return Employee::all();\n }", "public function listeEmployee(){\n\t\t\t\t\t $sql = \"SELECT * FROM employee\";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "public static function searchPotentialLead(Company $company, string $criteria = null): Collection\n {\n if (is_null($criteria)) {\n $criteria = '';\n }\n\n $potentialEmployees = $company->employees()\n ->select('id', 'first_name', 'last_name', 'email')\n ->notLocked()\n ->where(function ($query) use ($criteria) {\n $query->where('first_name', 'LIKE', '%'.$criteria.'%')\n ->orWhere('last_name', 'LIKE', '%'.$criteria.'%')\n ->orWhere('email', 'LIKE', '%'.$criteria.'%');\n })\n ->orderBy('last_name', 'asc')\n ->take(10)\n ->get();\n\n $employeesCollection = collect([]);\n foreach ($potentialEmployees as $employee) {\n $employeesCollection->push([\n 'id' => $employee->id,\n 'name' => $employee->name,\n ]);\n }\n\n return $employeesCollection;\n }", "public static function birthdaysThisWeek(Company $company): array\n {\n $employees = $company->employees()\n ->where('locked', false)\n ->whereNotNull('birthdate')\n ->get();\n\n $now = Carbon::now();\n $minDate = $now->copy()->startOfWeek(Carbon::MONDAY);\n $maxDate = $now->copy()->endOfWeek(Carbon::SUNDAY);\n\n $birthdaysCollection = collect([]);\n foreach ($employees as $employee) {\n $birthdateWithCurrentYear = $employee->birthdate->copy()->year($now->year);\n\n if (BirthdayHelper::isBirthdayInRange($birthdateWithCurrentYear, $minDate, $maxDate)) {\n $birthdaysCollection->push([\n 'id' => $employee->id,\n 'name' => $employee->name,\n 'avatar' => ImageHelper::getAvatar($employee, 35),\n 'birthdate' => DateHelper::formatMonthAndDay($birthdateWithCurrentYear),\n 'sort_key' => Carbon::createFromDate($now->year, $birthdateWithCurrentYear->month, $birthdateWithCurrentYear->day)->format('Y-m-d'),\n 'url' => route('employees.show', [\n 'company' => $company,\n 'employee' => $employee->id,\n ]),\n ]);\n }\n }\n\n // sort the entries by soonest birthdates\n // we need to use values()->all() so it resets the keys properly.\n $birthdaysCollection = $birthdaysCollection->sortBy('sort_key')->values()->all();\n\n return $birthdaysCollection;\n }", "public function employees()\n {\n return $this->belongsToMany(Employee::class);\n }", "public function listAllCustomers();", "public function getThemAll(){\n $query = '//employees/employee/.';\n //$employees = $this->domDocument->getElementsByTagName('employee');\n\n // create a new XPath object and associate it with the document we want to query against\n $xpath = new DOMXPath($this->domDocument);\n $result = $xpath->query($query);\n $arrEmps = array();\n if($result->length){\n // iterate of the results\n $classCounter = 0;\n foreach($result as $emp) {\n // add the details of the employee to an array\n $arrEmps[$classCounter][\"name\"] = $emp->getElementsByTagName(\"name\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"name\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"gender\"] = $emp->getElementsByTagName(\"gender\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"gender\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"phone\"] = $emp->getElementsByTagName(\"phone\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"phone\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"email\"] = $emp->getElementsByTagName(\"email\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"email\"].\"<br><hr>\";\n $classCounter +=1;\n //echo $classCounter.\"<br><hr>\";\n }\n }\n return $arrEmps;\n }", "public function index()\n {\n $employees = Employee::with('company')->paginate(10);\n\n return view('adminlte::employees.employees', compact('employees'));\n }", "public function getCompaniesCrmSearchUrl()\n {\n $type = 'company' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }", "private function listEmployee()\n\t{\n\t\t$employees = $this->employee->getEmployee();\n\t\t$cnt = 1;\n\t\tforeach($employees as $key => $val)\n\t\t{\n\t\t\t$arr = array('CNT' => $cnt,\n\t\t\t\t\t\t 'EMPLOYEE_NAME' => $val['name_employee'],\n\t\t\t\t\t\t 'EMPLOYEE_ID' => $val['id_employee'],\n\t\t\t\t\t\t 'EMPLOYEE_MAIL' => $val['mail_employee']);\n\t\t\t$cnt ++;\n\t\t\t$this->view->addToReplace($arr);\n\t\t\t$this->arrRender['LISTEMPLOYEES'] .= $this->view->\n\t\t\tsetTemplateFile('employeeslist')->renderFile();\n\t\t}\n\t}", "public function getEmployeesByCostCenter($costCenter) {\n\t\t$em = $this->getEntityManager();\n\t\t$employees = $em->getRepository('Employee')->findByCostCenter($costCenter);\n\t\t\n\t\tforeach ($employees as &$employee) {\n\t\t\t$metaData = $em->getRepository('MetaData')->findBy(array(\n\t\t\t\t'type' => 'employee',\n\t\t\t\t'typeID' => $employee->getEmployeeID()\n\t\t\t), array(\n\t\t\t\t'valueOrder' => 'ASC'\n\t\t\t));\n\t\t\t$employee->meta_data = $metaData;\n\t\t}\n\t\t\n\t\treturn $this->respond($employees);\n\t}", "public function employees(): HasMany\n {\n return $this->hasMany(Employee::class);\n }", "public function getAll(): array\n {\n $customerData = $this->_doctrine->getRepository(CustomerData::class)->findAll();\n\n return $customerData;\n }" ]
[ "0.80659366", "0.7450481", "0.72915214", "0.69716215", "0.69016933", "0.6851105", "0.6811749", "0.6801597", "0.67012745", "0.6626089", "0.6619283", "0.65692306", "0.6564905", "0.65477973", "0.6546318", "0.6536029", "0.65336025", "0.6453452", "0.6442147", "0.64110345", "0.638719", "0.63721645", "0.6364135", "0.62932247", "0.6231704", "0.6227918", "0.6223712", "0.6204367", "0.6180595", "0.61646205", "0.6156158", "0.61217797", "0.61042047", "0.6099076", "0.6078557", "0.60484815", "0.6011409", "0.59994835", "0.5989219", "0.5985021", "0.59818625", "0.59788954", "0.597523", "0.59721196", "0.59111357", "0.59099734", "0.5898001", "0.58791554", "0.5874271", "0.5840361", "0.5833454", "0.58290535", "0.58071333", "0.577341", "0.57686037", "0.573774", "0.573069", "0.57006794", "0.5699388", "0.56972265", "0.5696936", "0.5696489", "0.5696258", "0.5694629", "0.56910855", "0.5687773", "0.5670808", "0.56603813", "0.56250405", "0.5612565", "0.56069684", "0.5606398", "0.560313", "0.56029826", "0.5600169", "0.5583965", "0.55644816", "0.5561299", "0.55578595", "0.55578595", "0.554704", "0.55440235", "0.5540181", "0.5535095", "0.5527983", "0.5527742", "0.5511516", "0.5510258", "0.5502196", "0.549065", "0.54861003", "0.5483385", "0.5482738", "0.5478765", "0.54768", "0.5464133", "0.5461319", "0.54481596", "0.5447891", "0.544393" ]
0.85140556
0
Returns count of employees
public function getEmployeesCount() { return $this->getTable()->getEmployeesCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countEmployee(){\n\t\t\t\t\t return count($this->listeEmployee());\n\t\t\t\t\t }", "public function getAllDataEmployees(){\n\t\t\t$this->db->select('*')->from('tbl_employees');\n\t\t\treturn $this->db->count_all_results();\n\t\t}", "function get_all_empresas_count()\n {\n $this->db->from('empresas');\n return $this->db->count_all_results();\n }", "public function getNumberOfEmployees(): ?int;", "public function employees() \r\n\t{\r\n\t\t$query = \"SELECT count(id_radnik) as Zaposlenih FROM \" . $this->table;\r\n\r\n\t\t$stmt = $this->conn->prepare($query);\r\n\t\t$stmt->execute();\r\n\r\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\t\t$zaposlenih = $row['Zaposlenih'];\r\n\t\treturn $zaposlenih;\r\n\t}", "public function filteredDataEmployees(){\n\t\t\t$this->ajaxEmployeeList();\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->num_rows();\n\t\t}", "public function countByEmpID($emp_id){\n return $this->count('emp_id=:emp_id', array(':emp_id' => $emp_id));\n }", "function count_all(){\n\t $this->db->count_all($this->tbl_Employeeinfo);\n\t \n return $this->db->count_all($this->tbl_Employeeinfo);\n }", "function getEmpCount(){\n\t\t$con = connect();\t\t\n\t\t$sql = \"SELECT count(*) FROM employee\"; //count emp from view\n\t\t$stmt = $con->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchColumn();\n\t\techo $result;\n\t}", "function getNrEmployeesBranch($username){\n\n global $db;\n\n $stmt=$db->prepare('SELECT count(*) as nrEmployees from employee\n WHERE employee_branch_id=(\n SELECT client_branch\n FROM client\n JOIN\n (\n SELECT client_id AS client\n FROM person\n JOIN\n client ON client_id = person_id\n WHERE username = ?\n )\n ON client_id = client)');\n \n $stmt->execute(array($username));\n return $stmt->fetch();\n }", "function assign_subordinate_count($employee) {\n\t$count = 0;\n\t//Get subordinate employees of current employee\n\t$employees = $employee->getSubordinates();\n\t//Add to count\n\t$count += count($employees);\n\t//Recursively add all subordinate employees number of employees to current employees count\n\tforeach($employees AS $emp) {\n\t\t$count += assign_subordinate_count($emp);\n\t}\n\t//Update number of subordinate employees for this employee\n\t$employee->setNumSubordinates($count);\n\t//Destroy the subordinates attribute so returned data will be flat array/chop off multidimensional array\n\t$employee->destroySubordinates();\n\treturn $count;\n}", "function exeGetTotalEmp() { \n $exeGetTotalEmp = $this->db->query(\"SELECT *\n FROM employees\n WHERE status = 1\n ORDER BY firstname ASC, lastname ASC\");\n \n return $exeGetTotalEmp->num_rows(); \n }", "public function nbEmprunt()\n\t\t{\n\t\treturn $this->lesEmprunts->count();\n\t\t}", "public static function getEmployeeShiftsCounts($employee_id){\n return DB::table('table_employee_shifts')\n ->join('table_employees', 'table_employee_shifts.employee_id', '=', 'table_employees.employee_id')\n ->join('table_shifts', 'table_employee_shifts.shift_id', '=', 'table_shifts.shift_id')\n ->where(['table_employee_shifts.employee_id' => $employee_id])\n ->count();\n }", "function TotalEmployee() {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"SELECT \n\t\t\" . $db_table_prefix . \"users.id, \" . $db_table_prefix . \"user_permission_matches.permission_id\n\t\tFROM \" . $db_table_prefix . \"users LEFT JOIN \" . $db_table_prefix . \"user_permission_matches ON \n\t\t\" . $db_table_prefix . \"users.id = \" . $db_table_prefix . \"user_permission_matches.user_id where \" . $db_table_prefix . \"user_permission_matches.permission_id = '1'\");\n $stmt->execute();\n $stmt->store_result();\n $num_returns = $stmt->num_rows;\n $stmt->close();\n\n return $num_returns;\n}", "public function countEntities(): int;", "public static function getCount(){\n \t$sql = \"SELECT COUNT(*) as count FROM yy_hospital\";\n \t$res = self::getDb()->query($sql)->fetchAll();\n \t$count = $res[0]['count'];\n \treturn $count;\n }", "function vcn_get_career_count() {\t\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry(), 'ignoreworktype' => 'Y'), 'json');\r\n\treturn count($data);\r\n}", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "public function countEm()\n {\n $qb = $this->createQueryBuilder('g');\n $qb->select('count(g.id) AS counter');\n $query = $qb->getQuery();\n return $query->getSingleScalarResult();\n }", "public function employeesStefan(Request $request)\n {\n $employees = Employees::getEmployeesStefan();\n\n foreach($employees as $employee){\n print_r($employee->cn[0].', '.$employee->department[0].', '.$employee->title[0].', '.$employee->streetaddress[0].', '.$employee->l[0]);\n echo '<br>';\n }\n\n echo '<hr>';\n print_r('TOTAL: '.count($employees));\n\n die();\n }", "public function employees_head_count()\n\t{\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$date = date('Y');\n \t $query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-01%'\");\n\t\t$row1 = $query->num_rows();\n\t\t$Return['january'] = $row1;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-02%'\");\n\t\t$row2 = $query->num_rows();\n\t\t$Return['february'] = $row2;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-03%'\");\n\t\t$row3 = $query->num_rows();\n\t\t$Return['march'] = $row3;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-04%'\");\n\t\t$row4 = $query->num_rows();\n\t\t$Return['april'] = $row4;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-05%'\");\n\t\t$row5 = $query->num_rows();\n\t\t$Return['may'] = $row5;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-06%'\");\n\t\t$row6 = $query->num_rows();\n\t\t$Return['june'] = $row6;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-07%'\");\n\t\t$row7 = $query->num_rows();\n\t\t$Return['july'] = $row7;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-08%'\");\n\t\t$row8 = $query->num_rows();\n\t\t$Return['august'] = $row8;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-09%'\");\n\t\t$row9 = $query->num_rows();\n\t\t$Return['september'] = $row9;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-10%'\");\n\t\t$row10 = $query->num_rows();\n\t\t$Return['october'] = $row10;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-11%'\");\n\t\t$row11 = $query->num_rows();\n\t\t$Return['november'] = $row11;\n\t\t\n\t\t$query = $this->db->query(\"SELECT * from xin_employees WHERE created_at like '%\".$date.\"-12%'\");\n\t\t$row12 = $query->num_rows();\n\t\t$Return['december'] = $row12;\n\t\t\n\t\t$Return['current_year'] = date('Y');\n\t\t$this->output($Return);\n\t\texit;\n\t}", "public function getCount()\n {\n if (null === $this->count) {\n $qb = clone $this->getQueryBuilder();\n $query = $qb->addSelect('count(e.id) as total_count');\n $result = $query->getQuery()->execute();\n $this->count = $result[0]['total_count'];\n }\n return $this->count;\n }", "public function total() {\n $totEmployees = Employee::count();\n\n return response()->json([$totEmployees]);\n }", "public function verCantidadEmpresas()\n {\n $query = \"SELECT COUNT(*) as cantidad_empresa FROM empresa\";\n $stmt = $this->conexion->prepare($query);\n if (!$stmt->execute()) {\n $stmt->closeCursor();\n return 0;\n } else {\n $cantidad = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $cantidad;\n }\n }", "function erp_hr_count_departments() {\n\n return \\WeDevs\\ERP\\HRM\\Models\\Department::count();\n}", "public function getAllEmployees();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function countUsers()\n\t{\n \treturn $this\n \t->createQueryBuilder('u')\n \t->select('COUNT(u)')\n \t->getQuery()->getSingleScalarResult();\n\t}", "public function count() {\n if ($this->_count <= 0) {\n $where = new Where();\n if (isset($this->_options[\"eventData\"]) && $this->_options[\"eventData\"] != '') {\n $where->expression($this->_sql_search_expression, \"%\" . $this->_options[\"eventData\"] . \"%\");\n }\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from($this->table)->where($where)->columns(array('count' => new Expression('COUNT(*)')));\n $sqlTxt = $sql->getSqlStringForSqlObject($select);\n $resultSet = $this->adapter->query($sqlTxt, Adapter::QUERY_MODE_EXECUTE);\n foreach ($resultSet as $row) {\n $this->_count = intval($row->count);\n break;\n }\n }\n return $this->_count;\n }", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function listarCount($id_empleador, $WHERE) {\n $query = \"\n SELECT\n count(*) as counteo\n FROM prestamos \n WHERE id_empleador = ?\n -- AND estado = 1\n $WHERE\n \";\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $id_empleador);\n $stm->execute();\n $lista = $stm->fetchAll();\n $stm = null;\n return $lista[0]['counteo'];\n }", "public function count()\n {\n return count($this->entities);\n }", "public function count()\n {\n return count($this->entities);\n }", "public function totalCount();", "public function totalCount();", "public function getNumeroEmploye() {\n return $this->numeroEmploye;\n }", "public function getNumeroEmploye() {\n return $this->numeroEmploye;\n }", "public function getNumeroEmploye() {\n return $this->numeroEmploye;\n }", "public function record_count() {\r\n return $this->db->count_all(\"pessoafisica\");\r\n }", "public function countLigne_equipe_personne(){\n\t\t\t\t\t return count($this->listeLigne_equipe_personne());\n\t\t\t\t\t }", "public function emailCounts($email);", "public function getCompanyEmployees();", "public function getCountUsers(){\n $connect = ConnectionManager::get('default');\n $fila = $connect->execute(\"select count(*) from Usuarios;\")->fetchAll();\n return $fila[0];\n }", "public function getEntryCount() {}", "public function count_items() {\n\t\treturn SalesHistoryDetailQuery::create()->filterByOrdernumber($this->oehhnbr)->count();\n\t}", "public function countAll() : int\n {\n $result = $this->em->createQueryBuilder()->select('count(u.username)')\n ->from(User::class, 'u')\n ->getQuery()->getSingleScalarResult();\n\n return intval($result);\n }", "public function rowResultVacancyCount() {\n if (is_null($this->response)) {\n throw new Exception('Response is NULL');\n }\n return count($this->response->vacancies);\n }", "public function getUsersCount()\n {\n return $this->manager->createQuery('SELECT COUNT(u) FROM App\\Entity\\User u')->getSingleScalarResult();\n }", "public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"jobdata\");\n\t}", "public function record_count() {\r\n return $this->db->count_all(\"administradores\");\r\n }", "public function employeesStefanIMG(Request $request)\n {\n $employees = Employees::getEmployeesStefanIMG();\n\n foreach($employees as $employee){\n print_r($employee->cn[0].', '.$employee->department[0].', '.$employee->title[0].', '.$employee->streetaddress[0].', '.$employee->l[0]);\n echo '<br>';\n }\n\n echo '<hr>';\n print_r('TOTAL: '.count($employees));\n\n die();\n }", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "private function getCount()\n {\n $bd = Core::getBdd()->getDb();\n $u_insc_c = \"SELECT DISTINCT COUNT(u.id) as c FROM c_user u\";\n $insc = 0 + $bd->query($u_insc_c)->fetchObject()->c;\n return ($insc);\n }", "public function findCount()\n {\n return $this->getEntityManager()\n ->createQuery(\"SELECT t.number, COUNT(f.id) as cnt\n FROM GazMainBundle:Finance f\n LEFT JOIN f.terminal t\n LEFT JOIN f.clientSale cs\n\t\t\t\t\t\t\tLEFT JOIN f.clientBuy cb\n\t\t\t\t\t\t\tWHERE f.financeType = FALSE\n\t\t\t\t\t\t\tGROUP BY t.number\n\t\t\t\t\t\t\tORDER BY t.number ASC\n \")\n ->getResult();\n }", "public function countEvents()\n {\n $count = 0;\n foreach ($this->listEvents() as $dayevents) {\n $count += count($dayevents);\n }\n return $count;\n }", "public function getNbUsers(){\r\n $nb = 0 ;\r\n $q = \"select count(*) as nb from UserTab \";\r\n $res = execute($q) ;\r\n $l = mysql_fetch_assoc($res);\r\n $nb = $l['nb'];\r\n \r\n return $nb ;\r\n\r\n }", "function CountActive() {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT count(Natregno) val FROM employee WHERE EmpStatus='Active' AND DelFlg='N';\");\r\n $stmt->execute();\r\n $result_array = $stmt->fetchAll();\r\n foreach ($result_array as $value) {\r\n $this->activepersons = $value['val'];\r\n }\r\n return $this->activepersons;\r\n $conn = NULL;\r\n }", "public function count() {\n\t\treturn count($this->getData());\n\t}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {\n $repo = $this->getRepository();\n\n return $repo->aggregate($this->limit(0), __FUNCTION__, $repo->getPrimaryKey());\n }", "public function examenes_tatalExamenes(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idExamen) as cantidadExamenes from tb_examenes \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadExamenes'];\t\t\t\n\t\t\t\n\t\t\t\n }" ]
[ "0.83989877", "0.7367075", "0.72336376", "0.72261834", "0.7167031", "0.7027701", "0.699077", "0.69037336", "0.6776866", "0.6690841", "0.6654862", "0.6573313", "0.6515685", "0.64769894", "0.642788", "0.63113743", "0.62977064", "0.62742156", "0.6230173", "0.621434", "0.6199207", "0.6179927", "0.6175081", "0.6151251", "0.6147487", "0.61371815", "0.61119366", "0.6102614", "0.6102614", "0.6102614", "0.60846007", "0.60397077", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60167456", "0.60160124", "0.5996099", "0.5996099", "0.59834045", "0.59834045", "0.597562", "0.597562", "0.597562", "0.59608054", "0.59352314", "0.5932386", "0.59211475", "0.5907075", "0.58978367", "0.5894745", "0.5894418", "0.589133", "0.5890616", "0.5877426", "0.58750445", "0.583836", "0.58312637", "0.58312637", "0.58312637", "0.58312637", "0.5830074", "0.5825383", "0.58222497", "0.58211863", "0.581961", "0.5816244", "0.58099234", "0.58099234", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.58087635", "0.5808621", "0.5797295" ]
0.8466051
0
Returns the company name
public function getCompanyName() { return $this->getName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCompanyName() {\n \t$company = $this->getCompany();\n \treturn instance_of($company, 'Company') ? $company->getName() : lang('-- Unknown --');\n }", "public function company(): string\n {\n return $this->getData('CompanyName');\n }", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName() {\n\t\treturn $this->company_name; \n\t}", "public function getCompanyName()\n {\n return $this->getProperty(\"CompanyName\");\n }", "public function getCompany_name()\n {\n return $company_name;\n }", "public function getCompanyName() {\n\n return $this->company_name;\n\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName()\r\n {\r\n return $this->companyName;\r\n }", "public function getCompanyName() \n\t{\n\t return $this->companyName;\n\t}", "public function getCompanyNameIdentifier()\n {\n return 'company_name';\n }", "public function getCompanyNameAttribute() {\n\t\treturn $this->company_name;\n\t}", "public function getCompanyShortName()\n {\n return $this->companyShortName;\n }", "public function getCompanyName(): ?string\n {\n return $this->CompanyName;\n }", "public function getUserVisibleName(){\n $info = $this->getInfo();\n\n if (isset($info[\"nombre\"])) {\n return $info[\"nombre\"];\n }\n\n error_log(\"no name for company {$this->getUID()}\");\n return \"\";\n }", "public function get_company() \n {\n return $this->company;\n }", "public function getCompany(): ?string\n {\n return $this->_company;\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function publicName()\n {\n if($this->type === 'natural_person') {\n return $this->first_name . ' ' . $this->last_name;\n }\n\n return $this->company_name;\n }", "public function getCompany() {}", "public function getCompany();", "function company_name_meta() {\n echo '<li class=\"company\">';\n echo '<span class=\"value\">'. get_the_company_name() .'</span>';\n echo '</li>';\n }", "public function getCompany()\n {\n return $this->getParameter('billingCompany');\n }", "public function getReadableCompanyNameAttribute()\n {\n if ($this->company_id){\n $company = Company::find($this->company_id);\n $companyName = $company->name;\n return $companyName;\n }else{\n return null;\n }\n\n }", "public function getUsername()\n {\n return $this->company_id.'+'.$this->username;\n }", "public function getCompany()\n {\n return isset($this->company) ? $this->company : null;\n }", "public function company()\n {\n return $this->author()->company();\n }", "public function getOrganizationName(): string {\n\t\treturn ($this->organizationName);\n\t}", "public function getCompanyAlias() \n\t{\n\t return $this->companyAlias;\n\t}", "public static function company()\n {\n return new TextNode('company');\n }", "function wac_vendor_company($user){\n\t$company = get_user_meta($user->ID,'_vendor_company',true);\n\tif(!empty($company)){\n\t\treturn $company;\n\t}\n\t\n\treturn wac_vendor_name($user);\n}", "public function getYomiCompany()\n {\n return $this->getProperty(\"YomiCompany\");\n }", "public static function getCompanyByCustomerId()\n\t{\n\t\t$userId = Auth::getUser()->ID;\n\t\t$companyName = self::select('company')->where('ID', $userId)->first()->company;\n\t\treturn $companyName;\n\t}", "public function getContactName()\n {\n return $this->contactName;\n }", "public function getSponsorname() {}", "public function getCompany()\n {\n if (array_key_exists('company', $this->data)) {\n return $this->data['company'];\n }\n\n if ($this->getType() == Reader\\Reader::TYPE_YML) {\n $company = $this->xpath->evaluate('string(/yml_catalog/shop/company)');\n }\n\n if (! $company) {\n $company = null;\n }\n\n $this->data['company'] = $company;\n\n return $this->data['company'];\n }", "public function getProdCompany()\n {\n return $this->prod_company;\n }", "public function getAuthorcompany() {}", "public function getCustomerName();", "public function getCompanyNameByCompanyCode()\n {\n $nombre = $this->db->select(\"t.empresa as value\")\n ->from(\"token t\") \n ->where(\"t.codigo\", $this->codigo)\n ->get()->row();\n\n // echo '<pre>' . var_dump($nombre) . '</pre>';\n return $nombre;\n }", "public function getBillingCompany()\n {\n return $this->getParameter('billingCompany');\n }", "public function getBusinessName()\n {\n return isset($this->business_name) ? $this->business_name : '';\n }", "public function getName(): string\n {\n return $this->account->account_name ?? '';\n }", "public static function find_company_name( $id )\n {\n try{\n\n $company = Company::where( 'id' , $id )->first();\n\n return $company['name'];\n }\n catch ( Exception $e){\n return 'Not Found';\n }\n }", "public function getSiteName();", "public function getCustomerName(){\n return $this->_getData(self::CUSTOMER_NAME);\n }", "function findCompanyWebsite($company_name) \n {\n \n }", "public function getCustname()\n {\n return $this->custname;\n }", "private function getName ()\n\t\t{\t\n\t\t\t$dbs = new DB ( $this->config['database'] );\n\t\t\t$search = $dbs->query(\"SELECT * FROM tbl_vpn_org WHERE org_id = \" . trim($this->c) );\n\t\t\tif ( count($search) ) {\n\t\t\t\t// Convert result to human code \n\t\t\t\t$this->result['data']['id'] = $search[0]['org_id'];\n\t\t\t\t$this->result['data']['name'] = $search[0]['org_name'];\n\t\t\t\t$this->result['data']['description'] = $search[0]['org_desc'];\n\t\t\t} else \n\t\t\t\t$this->result['data']['result'] = \"Not found\";\n\t\t\n\t\t\t$dbs->CloseConnection ();\t\n\t\t\treturn;\n\t\t}", "public function contact_company()\n {\n }", "public function organisationName();", "public function getCompanyCode(){\n\t\t/* return company code */\n\t\treturn $this->_intCompanyCode;\n\t}", "public function getBillingLastName();", "public function getCompanyName() {\n $company_id = $this->session->userdata('company_id');\n\n $path = base_url();\n $url = $path . 'api/admin/Employee_api/getCompanyName?company_id=' . $company_id;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n // authenticate API\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);\n curl_setopt($ch, CURLOPT_USERPWD, API_USER . \":\" . API_PASSWD);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPGET, 1);\n $output = curl_exec($ch);\n //close cURL resource\n curl_close($ch);\n $response = json_decode($output, true);\n //print_r($output);die();\n return $response;\n }", "public function getBusinessName()\n {\n return $this->business_name;\n }", "public function getOperatingCompany()\n {\n return $this->operatingCompany;\n }", "public function getDisplayName() {}", "public function getCustomerName(){\n return $this->customer ? $this->customer->name : '- no name provided -';\n }", "public function getName()\n {\n return implode(',', $this->components['CN']);\n }", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "function getTitle()\n {\n\n $title = $this->getName();\n if (!empty($this->getCity()) && strpos(strtolower($title), strtolower($this->getCity())) === false) {\n $title .= \" - \" . $this->getCity();\n }\n return $title;\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getCompanyId()\n {\n return $this->company_id;\n }", "public function getNome() {\n return $this->oCgm->getNome();\n }", "public function getCustomerMiddlename();", "public function getTitle()\n {\n if ('invoice' === \\XLite\\Core\\Request::getInstance()->mode) {\n $result = (\n \\XLite\\Core\\Config::getInstance()->Company->company_name\n ? \\XLite\\Core\\Config::getInstance()->Company->company_name . ': '\n : ''\n ) . static::t('Invoice');\n\n } elseif ('XLite\\View\\Address\\OrderModify' == ltrim(\\XLite\\Core\\Request::getInstance()->widget, '\\\\')) {\n $result = static::t('Customer information');\n\n } elseif ('XLite\\View\\SelectAddressOrder' == ltrim(\\XLite\\Core\\Request::getInstance()->widget, '\\\\')) {\n $result = static::t('Pick address from address book');\n\n } else {\n $result = static::t('Order details');\n }\n\n return $result;\n }", "private function _getSiteName()\n {\n return 'Santander Consumer Bank';\n }", "public function getDisplayName();", "public function getUserCompany()\n {\n $user_company = \\App\\User::with(['company'])->where('id', Auth::user()->id)->first();\n return $user_company ? $user_company : null;\n }", "public function get_name();", "public function get_name();", "public function get_name();", "function showCompany() {\n\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\n\t\t\t\t\t$editForm = new h2o('views/editCompany.html');\n\t\t\t\t\techo $editForm->render(compact('company'));\n\t\t\t\t}", "public function getMarketplaceName()\n {\n return $this->_fields['MarketplaceName']['FieldValue'];\n }", "function get_company_name($userid, $prevent_empty_company = true)\n{\n $_userid = get_client_user_id();\n if ($userid !== '') {\n $_userid = $userid;\n }\n $CI =& get_instance();\n $CI->db->where('userid', $_userid);\n $client = $CI->db->select(($prevent_empty_company == false ? 'CASE company WHEN \"\" THEN (SELECT CONCAT(firstname, \" \", lastname) FROM tblcontacts WHERE userid = tblclients.userid and is_primary = 1) ELSE company END as company' : 'company'))->from('tblclients')->get()->row();\n if ($client) {\n return $client->company;\n } else {\n return '';\n }\n}", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function companyInfo()\n {\n $this->startBrokerSession();\n $user = null;\n\n// $userId = $this->getSessionData('sso_user');\n $companyId = $this->getSessionData('sso_company');\n\n if ($companyId) {\n $company = $this->getCompanyInfo($companyId);\n if (!$company) return $this->fail(\"company not found\", 500); // Shouldn't happen\n }\n\n header('Content-type: application/json; charset=UTF-8');\n echo json_encode($company);\n }", "public function getCompany() {\n if(!$this->department || !$this->department->department || !$this->department->department->division || !$this->department->department->division->company)\n return false;\n\n return $this->department->department->division->company;\n }", "public function getNomComplet()\n {\n return $this->getPrenomContact() . ' ' . $this->getNomContact();\n }", "private function _getCompanySelector()\n {\n $sSearch = getValue('q');\n if(empty($sSearch))\n return json_encode(array());\n\n $oDB = CDependency::getComponentByName('database');\n\n $sQuery = 'SELECT * FROM company WHERE status = 1 AND lower(company_name) LIKE '.$oDB->dbEscapeString('%'.strtolower($sSearch).'%').' ORDER BY company_name desc';\n $oDbResult = $oDB->ExecuteQuery($sQuery);\n $bRead = $oDbResult->readFirst();\n if(!$bRead)\n return json_encode(array());\n\n $asJsonData = array();\n while($bRead)\n {\n $asData['name'] = $oDbResult->getFieldValue('company_name');\n $asJsonData[] = json_encode($asData);\n $bRead = $oDbResult->readNext();\n }\n echo '['.implode(',', $asJsonData).']';\n }", "public function getCompany()\n\t{\n\t\tif (!isset($this->_r_company)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getCompanyId())){\n\t\t\t\t$filters['company_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new DYCompaniesControllerRealR();\n\t\t\t$this->_r_company = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_company;\n\t}", "public function getMarketingCompany()\n {\n return $this->marketingCompany;\n }", "public function getDisplayNameInCheckout()\n {\n return $this->displayNameInCheckout;\n }", "public function getFullName()\n {\n return \"Brand Citozi\";\n }", "public function getCompanyFieldDefault ()\n {\n $companyDefault = $this->scopeConfig->getValue(\n 'customer/address/company_show',\n ScopeInterface::SCOPE_STORE\n );\n return $companyDefault;\n }", "public function setCompanyName($value)\n {\n return $this->setProperty(\"CompanyName\", $value, true);\n }", "function accountName()\n {\n // Fetch the shop account handler\n $accountHandler = eZShopAccountHandler::instance();\n\n return $accountHandler->accountName( $this );\n }", "public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }", "public function get_name()\n {\n // TODO: Implement get_name() method.\n }", "function getCompanyId() {\n return $this->getAdditionalProperty('company_id');\n }", "public function getHumanName();", "public function getCompanyValue()\n {\n return $this->CompanyValue;\n }", "public function company()\n {\n return $this->business();\n }", "public function getCompaniesCrmSearchUrl()\n {\n $type = 'company' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "public static function domainWord()\n {\n list($first) = explode(' ', Company::name());\n return strtolower(preg_replace('/\\W/', '', $first));\n }", "public function get_nameChannel () {\r\n\t\treturn $this->get_info()['author_name'];\r\n\t}", "public function getShippingCompany()\n {\n return $this->getParameter('shippingCompany');\n }", "protected function _getContactOwner()\n {\n return $this->params['name'];\n }", "public static function getMealCompanyNames()\n {\n\n $search_names_query = \"SELECT DISTINCT companyName FROM TiffinHouseDb.Dealer\";\n\n try {\n $menu = new Menu();\n self::$db->query($search_names_query);\n self::$db->execute();\n $menu = self::$db->resultSetByArr();\n return $menu;\n } catch (PDOException $err) {\n echo \"Error : \" . $err->getMessage();\n }\n }" ]
[ "0.89471596", "0.89091057", "0.88816816", "0.88703275", "0.88102436", "0.87965125", "0.87851685", "0.87735665", "0.87735665", "0.874932", "0.87313443", "0.84817505", "0.7727293", "0.77159256", "0.767065", "0.76011", "0.74843526", "0.74494916", "0.73294085", "0.732553", "0.7236455", "0.7235888", "0.7198252", "0.7165322", "0.7151303", "0.7082953", "0.70664227", "0.70104086", "0.69960135", "0.6956024", "0.68820894", "0.68811774", "0.6845411", "0.6833621", "0.680524", "0.6753173", "0.6730868", "0.6724937", "0.67244893", "0.6723095", "0.6716561", "0.6708733", "0.6690072", "0.666078", "0.66495174", "0.6638545", "0.6628878", "0.6581944", "0.65792733", "0.65613425", "0.65590996", "0.6545464", "0.6543128", "0.6520891", "0.6517423", "0.6512706", "0.6509655", "0.65079516", "0.64996713", "0.64948046", "0.64935", "0.6487341", "0.6485243", "0.6485243", "0.6476567", "0.6473506", "0.64638984", "0.6452398", "0.6451094", "0.6440846", "0.643671", "0.643671", "0.643671", "0.64277756", "0.6420654", "0.64175445", "0.6409331", "0.64004344", "0.6397217", "0.6392255", "0.63914245", "0.6389469", "0.63848084", "0.63831705", "0.6368983", "0.6367328", "0.63662827", "0.6365871", "0.63656354", "0.63622224", "0.63481486", "0.63465095", "0.63453585", "0.63301337", "0.63226855", "0.6320674", "0.6318598", "0.6317187", "0.630688", "0.6290198" ]
0.8818909
4
Returns the contact Object of this company
public function getContact() { try { return new Yourdelivery_Model_Contact($this->getContactId()); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return isset($this->contact) ? $this->contact : null;\n }", "public function getContact()\n {\n return $this->contact;\n }", "protected function buildContactObject()\n {\n return new Contact();\n }", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function returnContact(){\n return $this->contact->getContact(); //Chama a função getContact do objeto contact\n }", "public function contact()\n {\n return new Contact($this);\n }", "public function getContact()\n {\n $userId = Yii::$app->user->id;\n\n if ($userId == $this->author_id) {\n return $this->recipient;\n } elseif ($userId == $this->recipient_id) {\n return $this->author;\n }\n\n }", "public function contact()\n {\n return $this->hasOne(OrderContact::class);\n }", "public function getBillingContact() {\n try {\n return new Yourdelivery_Model_Contact($this->getBillingContactId());\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n return null;\n }\n }", "public static function aContact()\n {\n $contact = new Contact();\n return $contact;\n\n }", "public function getContactInfo()\n {\n $phoneNumbers = [];\n if (isset($this->properties['contact_mobile_phone'])) {\n $phoneNumbers[] = $this->properties['contact_mobile_phone']->value;\n }\n if (isset($this->properties['contact_home_phone'])) {\n $phoneNumbers[] = $this->properties['contact_home_phone']->value;\n }\n $emailAddresses = [];\n if (isset($this->properties['email'])) {\n $emailAddresses[] = $this->properties['email']->value;\n }\n if (isset($this->properties['contact_alt_email'])) {\n $emailAddresses[] = $this->properties['contact_alt_email']->value;\n }\n return new Model\\ContactInfo(\n $phoneNumbers,\n $emailAddresses\n );\n }", "public function getContactInfo() {\n return $this->contactInfo;\n }", "public function getPortalContact()\n {\n return BeanFactory::getBean('Contacts', $_SESSION['contact_id']);\n }", "public function getContacts(): stdClass {\n\n\t\treturn $this->greenApi->request( 'GET',\n\t\t\t'{{host}}/waInstance{{idInstance}}/GetContacts/{{apiTokenInstance}}' );\n\t}", "public function contacts()\n {\n return $this->hasOne(Contact::class);\n }", "public function getIdContact()\n {\n return $this->id_contact;\n }", "private function getContactsModel()\n\t{\n\t\tif (!$this->model_contacts)\n\t\t{\n\t\t\t$this->model_contacts = $this->getServiceLocator()->get(\"FrontContacts\\Models\\FrontContactsModel\");\n\t\t}//end if\n\n\t\treturn $this->model_contacts;\n\t}", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getContact(): string\n {\n return $this->_contact;\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function getMainContact()\n {\n return $this->mainContact;\n }", "public function getContact(): ?array\n\t{\n\t\treturn $this->contact;\n\t}", "public function getContacts()\n\t{\n\t\treturn $this->contacts; \n\n\t}", "public function getContacts() {\n return $this->contacts;\n }", "public function getCompany()\n {\n return isset($this->company) ? $this->company : null;\n }", "public function getReadableContact()\n {\n return Extra::getBeautifulPhone($this->contact);\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function getCompany() : \\App\\Domain\\Model\\Company\n {\n return $this->getRef('from__company_id__to__table__companies__columns__id', 'products');\n }", "public function getCompany()\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('company');\n\t\t\t\t\n\t\t$company = new Company($this->company_id);\t\t\t\n\n\t\treturn $company;\n\t}", "public function getContacts()\r\n {\r\n return $this->_contacts;\r\n }", "public function getContactID()\n {\n return $this->ContactID;\n }", "public function getContactId()\n\t{\n\t\treturn $this->_contactId;\n\t}", "public function get_company() \n {\n return $this->company;\n }", "public function getContact(){\n return $this->getParameter('contact');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function get_contact(){\n $this->relative = array_shift(Relative::find_all(\" WHERE dead_no = '{$this->id}' LIMIT 1\"));\n if ($this->relative) {\n return $this->relative->contact();\n } else {\n return \"Not Specified\";\n }\n }", "public function getContact()\n {\n return dd(22222);\n }", "public function contact(){\n return $this->hasOne(Contact::class,'id','contact_id');\n }", "public function getContacts()\n {\n if (array_key_exists(\"contacts\", $this->_propDict)) {\n return $this->_propDict[\"contacts\"];\n } else {\n return null;\n }\n }", "public function fetchContacts()\n {\n return $this->contacts;\n }", "public function get()\n {\n $contacts = $this->contact->orderBy('name', 'asc')->get();\n\n foreach ($contacts as $contact){\n array_add($contact, 'get_company', $contact->getCompany);\n }\n\n return json_encode($contacts);\n }", "public function getContact(){\n return $this->db->get('contact')->result();\n }", "public function get(int $id): ActiveCampaignContact\n {\n return ContactFactory::make($this->request(\n method: 'get',\n path: 'contacts/'.$id,\n responseKey: 'contact'\n ));\n }", "public function getInfosContact() {\n $listeInfos = $this->getInfos(\"contact\");\n return $listeInfos;\n }", "public function getContacts()\n {\n if (! isset($this->contacts)) {\n $this->contacts = new AddressBook\\Model\\Collection\\ContactCollection();\n }\n return $this->contacts;\n }", "public function getCompany()\n\t{\n\t\tif (!isset($this->_r_company)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getCompanyId())){\n\t\t\t\t$filters['company_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new DYCompaniesControllerRealR();\n\t\t\t$this->_r_company = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_company;\n\t}", "public function company()\n {\n return $this->author()->company();\n }", "public function get() {\n\t\t$request = $this->send(\"GET\", \"contacts/\" . $this->contactId, [\n\t\t\t'headers' => [\n\t\t\t\t'Accept' => 'application/json, */*',\n\t\t\t]\n\t\t]);\n\t\treturn $request;\n\t}", "public function contact_company()\n {\n }", "function InfGetContactDetails($inf_contact_id) {\n $object_type = \"Contact\";\n $class_name = \"Infusionsoft_\" . $object_type;\n $object = new $class_name();\n $objects = Infusionsoft_DataService::query(new $class_name(), array('Id' => $inf_contact_id));\n\n $contact_array = array();\n foreach ($objects as $i => $object) {\n $contact_array[$i] = $object->toArray();\n }\n\treturn $contact_array[0];\n}", "public function contact(): \\Illuminate\\Database\\Eloquent\\Relations\\HasOne\n {\n return $this->hasOne('App\\Models\\UserContactDetail');\n }", "public function getCurrentPrimaryContact(){\n\t\t$author = Author::select()->where('is_principal_contact', 1)->first();\n\n\t\treturn $author;\n\t}", "public function getSellerContact()\n {\n return $this->sellerContact;\n }", "protected function getEntity(Order $order): ContactCompanyEntity\n\t{\n\t\t/** @var Contact $contact */\n\t\t$contact = $order->getContactCompanyCollection()->createContact();\n\t\tif (!$order->getContactCompanyCollection()->isPrimaryItemExists(\\CCrmOwnerType::Contact))\n\t\t{\n\t\t\t$contact->setField('IS_PRIMARY', 'Y');\n\t\t}\n\n\t\treturn $contact;\n\t}", "public function getTelContact() {\n return $this->telContact;\n }", "public function company()\n {\n return $this->business();\n }", "public function company() {\n\t\treturn $this->has_one('Company_User');\n\t}", "public function getContactsList() {\n return $this->_get(7);\n }", "public function getContactPhone()\n {\n return isset($this->contactPhone) ? $this->contactPhone : null;\n }", "public function getContactInfo()\n {\n return array_filter([\n 'email' => $this->getEmail(),\n 'phoneNumber' => $this->getPhoneNumber(),\n ]);\n }", "public function company()\n {\n return $this->hasOne('Company', 'id', 'id_company');\n }", "public function getCustomer()\n {\n return \\tabs\\api\\core\\Customer::create($this->getCusref());\n }", "public function findContactById($id)\n {\n return $this->getContacts()->findContactById($id);\n }", "public function getContact()\n\t{\n\t\treturn view('contact');\n\t}", "public function getContact()\n {\n return view('frontend.info.contact');\n }", "public function contact($contact_id = null)\n {\n return new Ledger\\Contact($this->endpoint, $this->ledger_id, $contact_id, $this->client);\n }", "public function fromContact()\n {\n return $this->hasOne(User::class, 'id', 'from');\n }", "function getDefaultContact() {\n $defaultContact = NULL;\n $opt = $this->getProperty('DEFAULT_CONTACT', '');\n if ($opt != '') {\n $defaultContact = $opt;\n }\n return $defaultContact;\n }", "public function getContact(): ?string;", "public function contact()\n {\n return $this->BelongsTo(User::class, 'parent_contact_id');\n }", "public function getCurrentPrimaryContact(){\n\t\t$author = Author::selectRaw('CONCAT(first_Name, \" \", last_Name) AS name')->where('is_principal_contact', 1)->first();\n\n\t\tif($author){\n\t\t\t$primaryContact = $author;\n\t\t}\n\t\telse{\n\t\t\t$primaryContact = null;\n\t\t}\n\t\treturn $this->setStatusCode(201)\n\t\t\t->respondUpdatedWithData('Primary Contact', $primaryContact);\n\t}", "public function getContactName()\n {\n return $this->contactName;\n }", "public function getContacts(){\n $contacts = [];\n if ($this->data instanceof IPPCustomer){\n $newContact = $this->parseData($this->data);\n $contacts[] = $newContact;\n }\n else {\n foreach ($this->data as $contact) {\n $newContact = $this->parseData($contact);\n $contacts[] = $newContact;\n }\n }\n\n return $contacts;\n }", "public function getUserCompany()\n {\n $user_company = \\App\\User::with(['company'])->where('id', Auth::user()->id)->first();\n return $user_company ? $user_company : null;\n }", "public function getContactsList() {\n return $this->_get(6);\n }", "public function getCompany();", "public function getContactsCrmSearchUrl()\n {\n $type = 'contact' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "public function getConnectorContactId()\n {\n return $this->contactId;\n }", "public function getContactList()\r\n {\r\n return $this->exec('contact_list');\r\n }", "public function model()\n {\n return Contact::class;\n }", "public function contact()\n {\n return $this->hasMany(contact::class);\n }", "public function getCompany() {}", "public function company()\n {\n return ($this->entity_type == 'c') ? $this->belongsTo('App\\Models\\Company\\Company', 'entity_id') : null;\n }", "public function getContacts();", "private static function _getConstantContact()\n\t{\n\t\tstatic $constanceContant;\n\n\t\tif (!is_object($constanceContant)) {\n\n\t\t\t// Instantiate constant contact object\n\t\t\t$constanceContant = new ConstantContact();\n\n\t\t\t// Load settings\n\t\t\t$constantContactSettings = unserialize(BluApplication::getSetting('pluginConstantContact'));\n\t\t\t$constanceContant->setUsername($constantContactSettings['username']);\n\t\t\t$constanceContant->setPassword($constantContactSettings['password']);\n\t\t\t$constanceContant->setCategory($constantContactSettings['constCategory']);\n\n\t\t}\n\n\t\t// Return instance\n\t\treturn $constanceContant;\n\t}", "public function tenant()\n\t{\n\t\treturn $this->hasOne('App\\Contact');\n\t}", "function get_contacts_by_company($id) {\n return get_view_data_where('org_contact_list', $id);\n}", "public function getCiviContactByEmail($email) {\n\n return $this->getCiviContact('email', $email);\n }", "public function getCurrentPrimaryMagazineContact(){\n\t\t$author = Author::selectRaw('CONCAT(first_Name, \" \", last_Name) AS name')->where('is_principal_magazine_contact', 1)->first();\n\n\t\tif($author){\n\t\t\t$primaryContact = $author;\n\t\t}\n\t\telse{\n\t\t\t$primaryContact = null;\n\t\t}\n\t\treturn $this->setStatusCode(201)\n\t\t\t->respondUpdatedWithData('Primary Magazine Contact', $primaryContact);\n\t}", "public function getContactsForAdding()\n {\n return $this->contactsForAdding;\n }", "public function contact()\n {\n return $this->belongsTo('App\\Models\\Contact');\n }", "public function contact()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('contact');\n\n return $this->loadPublicView('user.contact', $breadCrumb['data']);\n }", "public function getCustomer()\n {\n if (null === $customer && isset($this['CUSTOMER_ID']))\n {\n $this->customer = \\Fastbill\\Customer\\Finder::findOneById($this['CUSTOMER_ID']);\n }\n return $this->customer;\n }", "function get_contact($uid) {\n //make sure the uid is set\n if (!isset($uid) || empty($uid)) {\n throw new Zim_Exception_UIDNotSet();\n }\n $q = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.uid = ?', $uid)\n ->limit(1);\n $contact = $q->fetchOne();\n if (empty($contact)) {\n throw new Zim_Exception_ContactNotFound();\n }\n $contact = $contact->toArray();\n if (!isset($contact['uname']) || trim($contact['uname']) == ''){\n $contact['uname'] = $this->update_username(array('uid' => $contact['uid']));\n }\n\n //return the contact\n return $contact;\n }", "public function company()\n {\n return $this->hasOne(Company::class, 'user_id');\n }" ]
[ "0.7963606", "0.7963606", "0.7963606", "0.7882679", "0.7853498", "0.76508796", "0.7586052", "0.7529791", "0.7468985", "0.7440269", "0.7366003", "0.7218517", "0.72165984", "0.7204348", "0.7200452", "0.7086083", "0.7038686", "0.69324344", "0.68644106", "0.6861885", "0.6808596", "0.67985064", "0.6773447", "0.67536736", "0.6697397", "0.6667587", "0.6659663", "0.6656152", "0.6604852", "0.6601908", "0.6562882", "0.6558485", "0.6553394", "0.65529287", "0.6549502", "0.6544144", "0.6542412", "0.6517406", "0.6517406", "0.6516888", "0.6496557", "0.6469958", "0.64655864", "0.64388615", "0.64102674", "0.64033484", "0.6392394", "0.63827026", "0.6372298", "0.6370589", "0.6366531", "0.6344802", "0.63388187", "0.6291209", "0.62885195", "0.6281733", "0.62695336", "0.6267167", "0.6247139", "0.6239375", "0.6194032", "0.6181375", "0.61735106", "0.61584085", "0.61563617", "0.61540645", "0.61533535", "0.6149583", "0.61488616", "0.6119733", "0.6100044", "0.6093426", "0.6081766", "0.60803497", "0.60795087", "0.6072182", "0.60590667", "0.6055958", "0.60504377", "0.6036392", "0.6034579", "0.6032336", "0.6019994", "0.6012458", "0.600068", "0.5999829", "0.5999412", "0.5980905", "0.5969919", "0.59627867", "0.595779", "0.5953063", "0.59467053", "0.5938514", "0.5930761", "0.59278494", "0.59103566", "0.5891372", "0.5890301", "0.58800536" ]
0.78569067
4
Returns the billing contact object if this company
public function getBillingContact() { try { return new Yourdelivery_Model_Contact($this->getBillingContactId()); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContact() {\n try {\n return new Yourdelivery_Model_Contact($this->getContactId());\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n return null;\n }\n }", "public function getContact()\n {\n return isset($this->contact) ? $this->contact : null;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getBilling()\n {\n return isset($this->billing) ? $this->billing : null;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function contact()\n {\n return $this->hasOne(OrderContact::class);\n }", "public function getBilling()\n {\n return $this->billing;\n }", "public function getBilling()\n {\n return $this->billing;\n }", "public function getAddressBilling()\n {\n return $this->addressBilling;\n }", "public function billing_address() {\n if(is_null($this->billing_address)){\n $this->billing_address = new Address($this->billing_address_id);\n }\n return $this->billing_address;\n }", "public function getBillingCompany()\n {\n return $this->getParameter('billingCompany');\n }", "public function getBillingReference()\n {\n return $this->billingReference;\n }", "public function getBillingReference()\n {\n return $this->billingReference;\n }", "public function getBillingAddress()\n {\n if (is_null($this->billingAddress)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_BILLING_ADDRESS);\n if (is_null($data)) {\n return null;\n }\n\n $this->billingAddress = BaseAddressModel::of($data);\n }\n\n return $this->billingAddress;\n }", "public function getBillingAddress(){\n return $this->_getData(self::BILLING_ADDRESS);\n }", "public function getBillingDetails()\n {\n return $this->_billing;\n }", "public function getBillingCustomized() {\n $customized = new Yourdelivery_Model_Billing_Customized();\n $cid = $this->getTable()->getBillingCustomized();\n if ($cid === false) {\n $customized->setMode('comp');\n } else {\n $customized->load($cid['id']);\n }\n\n $customized->setCompany($this);\n $customized->setRefId($this->getId());\n\n return $customized;\n }", "public function billingCustomer()\n {\n $customer = new Customer();\n $this->setBilling($customer);\n\n return $customer;\n }", "public function getCompany()\n {\n return isset($this->company) ? $this->company : null;\n }", "public function getCompany()\n {\n return $this->getParameter('billingCompany');\n }", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "protected function buildContactObject()\n {\n return new Contact();\n }", "public function getBillingAddress();", "public function getBillingAddress();", "public function getBillingAddress() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->billingAddress;\r\n\t}", "public function getBillingAddress(): ?Address\n {\n return $this->billingAddress;\n }", "public function getContact()\n {\n $userId = Yii::$app->user->id;\n\n if ($userId == $this->author_id) {\n return $this->recipient;\n } elseif ($userId == $this->recipient_id) {\n return $this->author;\n }\n\n }", "public function billing_address()\n {\n return $this->hasOne(AddressProxy::modelClass(), 'saas_subscription_recurring_profile_id');\n }", "public function contact()\n {\n return new Contact($this);\n }", "public function returnContact(){\n return $this->contact->getContact(); //Chama a função getContact do objeto contact\n }", "public function getBillingAddress() : Address;", "public function getCompany()\n {\n return $this->company;\n }", "public function getBillingAddressModel()\n {\n if (is_null($this->_billingAddressModel)) {\n $object = Mage::getModel('customer/address');\n $this->_billingAddressModel = Mage::objects()->save($object);\n }\n return Mage::objects()->load($this->_billingAddressModel);\n }", "public function getCustomerBillingAddress() {\n\n if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\n $customerID = $customerData->getId();\n }\n\n $visitorData = Mage::getModel('customer/customer')->load($customerID);\n $billingaddress = Mage::getModel('customer/address')->load($visitorData->default_billing);\n $addressdata = $billingaddress->getData();\n\n return $addressdata;\n }", "public function getBilling();", "public function getContactInfo() {\n return $this->contactInfo;\n }", "public function getContactPhone()\n {\n return isset($this->contactPhone) ? $this->contactPhone : null;\n }", "public function get_company() \n {\n return $this->company;\n }", "public function getCompany()\n\t{\n\t\tif (!isset($this->_r_company)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getCompanyId())){\n\t\t\t\t$filters['company_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new DYCompaniesControllerRealR();\n\t\t\t$this->_r_company = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_company;\n\t}", "public function getContactInfo()\n {\n $phoneNumbers = [];\n if (isset($this->properties['contact_mobile_phone'])) {\n $phoneNumbers[] = $this->properties['contact_mobile_phone']->value;\n }\n if (isset($this->properties['contact_home_phone'])) {\n $phoneNumbers[] = $this->properties['contact_home_phone']->value;\n }\n $emailAddresses = [];\n if (isset($this->properties['email'])) {\n $emailAddresses[] = $this->properties['email']->value;\n }\n if (isset($this->properties['contact_alt_email'])) {\n $emailAddresses[] = $this->properties['contact_alt_email']->value;\n }\n return new Model\\ContactInfo(\n $phoneNumbers,\n $emailAddresses\n );\n }", "public function getAddress()\n {\n return $this->billingAddress;\n }", "public function getPhone()\n {\n return $this->billingPhone;\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "protected function getEntity(Order $order): ContactCompanyEntity\n\t{\n\t\t/** @var Contact $contact */\n\t\t$contact = $order->getContactCompanyCollection()->createContact();\n\t\tif (!$order->getContactCompanyCollection()->isPrimaryItemExists(\\CCrmOwnerType::Contact))\n\t\t{\n\t\t\t$contact->setField('IS_PRIMARY', 'Y');\n\t\t}\n\n\t\treturn $contact;\n\t}", "public function getBillingPhone();", "public function getBillingFrom()\n {\n return $this->billing_from;\n }", "public function company()\n {\n return $this->business();\n }", "public function getContact(): string\n {\n return $this->_contact;\n }", "public function getCustomer()\n {\n return $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer;\n }", "public function getCustomer()\n {\n return $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer;\n }", "public function getMarketingCompany()\n {\n return $this->marketingCompany;\n }", "function getPaypalBillingAddress()\n {\n return $this->getPaypalAddress('billing');\n }", "public function setBillingCompany($value)\n {\n return $this->setParameter('billingCompany', $value);\n }", "public function getCompany() : \\App\\Domain\\Model\\Company\n {\n return $this->getRef('from__company_id__to__table__companies__columns__id', 'products');\n }", "public function getCustomer()\n {\n if (null === $customer && isset($this['CUSTOMER_ID']))\n {\n $this->customer = \\Fastbill\\Customer\\Finder::findOneById($this['CUSTOMER_ID']);\n }\n return $this->customer;\n }", "public function getContact(): ?array\n\t{\n\t\treturn $this->contact;\n\t}", "public function getIdContact()\n {\n return $this->id_contact;\n }", "public static function aContact()\n {\n $contact = new Contact();\n return $contact;\n\n }", "public function getCompany() {\n if(!$this->department || !$this->department->department || !$this->department->department->division || !$this->department->department->division->company)\n return false;\n\n return $this->department->department->division->company;\n }", "public function getPortalContact()\n {\n return BeanFactory::getBean('Contacts', $_SESSION['contact_id']);\n }", "public function getCustomer()\n {\n return \\tabs\\api\\core\\Customer::create($this->getCusref());\n }", "public function billingIsActive()\n {\n return $this->billing_active;\n }", "public function getReadableContact()\n {\n return Extra::getBeautifulPhone($this->contact);\n }", "public function contacts()\n {\n return $this->hasOne(Contact::class);\n }", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function get(int $id): ActiveCampaignContact\n {\n return ContactFactory::make($this->request(\n method: 'get',\n path: 'contacts/'.$id,\n responseKey: 'contact'\n ));\n }", "public function getCompany()\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('company');\n\t\t\t\t\n\t\t$company = new Company($this->company_id);\t\t\t\n\n\t\treturn $company;\n\t}", "public function getSellerContact()\n {\n return $this->sellerContact;\n }", "public function getBillingTo()\n {\n return $this->billing_to;\n }", "public function getBillingAddress(): Address\n {\n if (!isset($this->billingAddress)) {\n throw new LocalizedException(__('Billing address is not defined for instance purchase.'));\n }\n return $this->billingAddress;\n }", "public function getCompany(): ?V1AccountsPostBodyCompany\n {\n return $this->company;\n }", "public function getUserCompany()\n {\n $user_company = \\App\\User::with(['company'])->where('id', Auth::user()->id)->first();\n return $user_company ? $user_company : null;\n }", "public function getCompany(): ?string\n {\n return $this->_company;\n }", "public function getMail()\n {\n return $this->billingMail;\n }", "public function company()\n {\n return $this->author()->company();\n }", "public function getBillingAddressBox()\n {\n return $this->_rootElement->find('.billing-address .info-address-edit');\n }", "public function contact(){\n return $this->hasOne(Contact::class,'id','contact_id');\n }", "function getDefaultContact() {\n $defaultContact = NULL;\n $opt = $this->getProperty('DEFAULT_CONTACT', '');\n if ($opt != '') {\n $defaultContact = $opt;\n }\n return $defaultContact;\n }", "public static function getCompanyByCustomerId()\n\t{\n\t\t$userId = Auth::getUser()->ID;\n\t\t$companyName = self::select('company')->where('ID', $userId)->first()->company;\n\t\treturn $companyName;\n\t}", "public function getContacts(): stdClass {\n\n\t\treturn $this->greenApi->request( 'GET',\n\t\t\t'{{host}}/waInstance{{idInstance}}/GetContacts/{{apiTokenInstance}}' );\n\t}", "public static function getBillingAddress($_oID, $_cID) {\n global $lC_Database;\n\n $QorderBilling = $lC_Database->query('select billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state_code, billing_country, billing_address_format from :table_orders where orders_id = :orders_id');\n $QorderBilling->bindTable(':table_orders', TABLE_ORDERS);\n $QorderBilling->bindInt(':orders_id', $_oID);\n $QorderBilling->execute();\n \n $billing_data = array('firstname' => self::getFirstName($_cID),\n 'lastname' => self::getLastName($_cID),\n 'company' => $QorderBilling->value('billing_company'),\n 'street_address' => $QorderBilling->value('billing_street_address'),\n 'suburb' => $QorderBilling->value('billing_suburb'),\n 'city' => $QorderBilling->value('billing_city'),\n 'postcode' => $QorderBilling->value('billing_postcode'),\n 'zone_code' => $QorderBilling->value('billing_state_code'),\n 'country_title' => $QorderBilling->value('billing_country'),\n 'format' => $QorderBilling->value('billing_address_format'));\n\n $QorderBilling->freeResult();\n \n return $billing_data;\n }", "public function getContactId()\n\t{\n\t\treturn $this->_contactId;\n\t}", "public function getBillingAccountId()\n {\n return $this->billingAccountId;\n }", "public function getCiviContactByEmail($email) {\n\n return $this->getCiviContact('email', $email);\n }", "public function getBillingType()\n {\n return $this->billingType;\n }", "public function getBillingType()\n {\n return $this->billingType;\n }", "public function getCompanyFieldDefault ()\n {\n $companyDefault = $this->scopeConfig->getValue(\n 'customer/address/company_show',\n ScopeInterface::SCOPE_STORE\n );\n return $companyDefault;\n }", "public function contact_company()\n {\n }", "public function contact($contact_id = null)\n {\n return new Ledger\\Contact($this->endpoint, $this->ledger_id, $contact_id, $this->client);\n }", "public function getCreditCard()\n {\n return $this->creditCard;\n }", "public function contactAction() {\n $request = $this->getRequest();\n\n if ( $request->isPost() ){\n $post = $request->getPost();\n\n // remove billing contact\n if ($request->getParam('removeBillingContact', false)) {\n $this->company->setBillingContactId('0');\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"Billing contact for company #%d was deleted\", $this->company->getId()));\n $this->success(__b(\"Billing contact successfully removed. Contact person now is billing contact too\"));\n }\n //new contact was selected from drop-down menu\n else if ( $request->getParam('selContactId') > 0) {\n if ($request->getParam('selContactId') != $this->company->getContactId()) {\n $this->company->setContactId($request->getParam('selContactId'));\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"Set new contact for company #%d\", $this->company->getId()));\n $this->success(__b(\"New contact was set\"));\n }\n else {\n $this->success(__b(\"Contact is the same. No changes.\"));\n }\n }\n //new billing contact was selected from drop-down menu\n else if ($request->getParam('selBillingContactId') > 0 ) {\n if ($request->getParam('selBillingContactId') != $this->company->getBillingContactId()) {\n $this->company->setBillingContactId($request->getParam('selBillingContactId'));\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"Set new billing contact for company #%d\", $this->company->getId()));\n $this->success(__b(\"New Billing Contact was set\"));\n }\n else {\n $this->success(__b(\"Billing contact is the same. No changes.\"));\n }\n }\n //create new contact\n else {\n $contact = new Yourdelivery_Model_Contact();\n\n $form = new Yourdelivery_Form_Administration_Company_ContactEdit();\n\n $id = Yourdelivery_Model_Contact::getByEmail($values['email']);\n if (strlen($values['email'])>0 && !is_null($id) && ($id!=0)) {\n $this->error(__b(\"There is already a contact with this email. id: \") . $id);\n $this->logger->adminInfo(sprintf(\"contact could not be created for company #%d - email already in use\", $this->company->getId()));\n return $this->_redirect('/administration_company_edit/contacts/companyid/' . $this->company->getId());\n }\n \n if ( $form->isValid($post) ){\n $values = $form->getValues();\n \n $id = Yourdelivery_Model_Contact::getByEmail($values['email']);\n if (strlen($values['email'])>0 && !is_null($id) && ($id!=0)) {\n $this->logger->adminInfo(sprintf(\"contact could not be created for company #%d - email already in use\", $this->company->getId()));\n $this->error(__b(\"Unter dieser E-mail Adresse ist bereits ein Kontakt registriert. id: \") . $id);\n return $this->_redirect('/administration_company_edit/contacts/companyid/' . $this->company->getId());\n }\n\n $city = new Yourdelivery_Model_City($values['cityId']);\n $values['plz'] = $city->getPlz();\n\n //edit contact object\n $contact->setData($values);\n $contact->save();\n\n // we are assigning new billing contact\n if ( $request->getParam('saveBillingContact', false) ) {\n $this->company->setBillingContact($contact);\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"New billing contact was created for company #%d\", $this->company->getId()));\n $this->success(__b(\"New billing contact was created\"));\n }\n // we are assigning new contact\n else {\n $this->company->setContact($contact);\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"New contact was created for company #%d\", $this->company->getId()));\n $this->success(__b(\"New contact was created\"));\n }\n }\n else{\n $this->error($form->getMessages());\n }\n }\n }\n return $this->_redirect('/administration_company_edit/contacts/companyid/' . $this->company->getId() . $link);\n }", "public function getContactID()\n {\n return $this->ContactID;\n }", "public function getBillingAddressId();", "public function tenant()\n\t{\n\t\treturn $this->hasOne('App\\Contact');\n\t}", "public function getBillingName(){\n return $this->_getData(self::BILLING_NAME);\n }", "public function contact(): \\Illuminate\\Database\\Eloquent\\Relations\\HasOne\n {\n return $this->hasOne('App\\Models\\UserContactDetail');\n }", "public function customer()\n {\n return Customer::retrieve($this->customer);\n }", "public function company() {\n\t\treturn $this->has_one('Company_User');\n\t}" ]
[ "0.6930654", "0.6894252", "0.6823665", "0.6823665", "0.6823665", "0.68114996", "0.6693355", "0.66731006", "0.6621222", "0.6621222", "0.6559425", "0.6542592", "0.64734906", "0.64569074", "0.64569074", "0.6341582", "0.632374", "0.63229895", "0.62913233", "0.6269803", "0.6246155", "0.61843467", "0.616345", "0.61393", "0.61288065", "0.61288065", "0.612202", "0.61133504", "0.6075762", "0.6074257", "0.60653025", "0.60393375", "0.6038443", "0.6029655", "0.6020846", "0.6016194", "0.5939134", "0.5913419", "0.5898435", "0.5882226", "0.58763", "0.5876039", "0.5863107", "0.58581233", "0.58458763", "0.58398354", "0.5837697", "0.5828779", "0.5817046", "0.5814383", "0.58075315", "0.58075315", "0.57992816", "0.57947505", "0.57852435", "0.57596326", "0.5746052", "0.57457393", "0.573697", "0.5730154", "0.5709515", "0.5693306", "0.5686423", "0.5685956", "0.5665429", "0.56637543", "0.564897", "0.56456715", "0.5635235", "0.5624521", "0.5623859", "0.5610156", "0.56095", "0.55698156", "0.55447155", "0.55377144", "0.55240124", "0.5520544", "0.55169183", "0.5514557", "0.55114", "0.5510244", "0.5500667", "0.55000603", "0.5495046", "0.54873484", "0.54866844", "0.54866844", "0.54851437", "0.54849434", "0.54819924", "0.54763377", "0.54626346", "0.54552865", "0.5452961", "0.54362714", "0.54295856", "0.5419129", "0.5410985", "0.5409587" ]
0.8246131
0
returns all budget objects of this company
public function getBudgets() { $table = new Yourdelivery_Model_DbTable_Company_Budgets(); $all = $table->fetchAll('companyId = ' . $this->getId()); $obj = new splObjectStorage(); foreach ($all AS $budget) { try { $budget = new Yourdelivery_Model_Budget($budget->id); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $obj->attach($budget); } return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findAll() {\n $sql = \"SELECT * FROM budget\";\n $result = $this->db->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $budget = array();\n foreach ($result as $row) {\n $budgetID = $row['id'];\n $budget[$budgetID] = $this->buildBudget($row);\n }\n return $budget;\n }", "public function budgets()\n {\n return $this->hasMany(Budget::class);\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function companies(): Collection\n {\n return Company::all();\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public function getGlBudgets()\n {\n return $this->hasMany(GlBudget::className(), ['account_id' => 'account_id']);\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function budgets() : HasMany\n {\n return $this->hasMany('App\\Budget');\n }", "public function getProductBudgets()\n {\n return $this->productBudgets;\n }", "public function cycleBudgets()\n {\n return $this->hasMany(CycleBudget::class);\n }", "public static function getBudgetWithAllProperties()\n {\n $budget = new FakeBudget();\n $budget->setBudgetId(-1);\n $budget->setName('Test Budget');\n\n $money = new FakeMoney();\n $money->setMicroAmount(50000000);\n $budget->setAmount($money);\n\n return $budget;\n }", "public function cargarbodegas()\n {\n \treturn Cont_Bodega::all();\n }", "public function getBuildingsWithBudgets()\n {\n $buildings_budgets = $this->find('all', [\n 'contain' => ['Budgets' =>\n function ($q) {\n return $q\n ->select(['id', 'building_id']);\n }],\n 'conditions' => ['Buildings.softland_id IS NOT NULL', 'Buildings.omit' => false]\n ]);\n $buildingsWithBudget = array();\n foreach ($buildings_budgets as $buildings_budget) {\n if (!empty($buildings_budget['budget'])) {\n $buildingsWithBudget[$buildings_budget['softland_id']]['budget_id'] = $buildings_budget['budget']['id'];\n $buildingsWithBudget[$buildings_budget['softland_id']]['active'] = $buildings_budget['active'];\n }\n }\n return $buildingsWithBudget;\n }", "public function getBillings($filter = null) {\n $billingTable = new Yourdelivery_Model_DbTable_Billing();\n $all = $billingTable->fetchAll('mode=\"company\" AND refId=\"' . $this->getId() . '\"');\n $storage = new splObjectStorage();\n foreach ($all AS $bill) {\n try {\n $bill = new Yourdelivery_Model_Billing($bill->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $storage->attach($bill);\n }\n return $storage;\n }", "public function companyBillings($request)\n {\n if (Auth::user()->type != 'company') {\n throw new \\Exception('Unauthorized viewing of billing accounts.');\n }\n\n $data = [\n 'company_id' => Auth::user()->company->id,\n ]; \n\n $with = ['billable' => function($sub_query) { \n $sub_query->select('id', 'title', 'reference_id', 'price', 'incentive_per_share');\n \n }];\n \n $billings = $this->jobChoiceRepository->billing()->whereWhereMonthAndYear(\n $data, \n 'created_at', \n $request->month,\n $request->year,\n $with \n );\n \n // Fixed tax percentage\n $tax_percentage = Billing::VARIABLES['tax_percentage'];\n // Sub total amount of bills\n $sub_total_amount = $billings->sum('billable.incentive_per_share');\n // Result to be returned\n $result['billings'] = $billings; \n $result['sub_total_amount'] = $sub_total_amount;\n $result['consumption_tax_fee'] = $sub_total_amount * $tax_percentage;\n $result['total_amount_fee'] = $sub_total_amount + ($sub_total_amount * $tax_percentage);\n \n return $result;\n }", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function index()\n {\n $budgets = Budget::where(\"user_id\", \"=\", Auth::user()->id)->paginate(\n Config::get(\"constants.pagination.per_page\")\n );\n return BudgetResource::collection($budgets);\n }", "public function getContracts()\n {\n return $this->hasMany(Contracts::className(), ['company_id' => 'id']);\n }", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "public function getCompaniesToSuspend() {\n return $this->createQuery('c')\n ->select('c.*')\n ->from('Companies_Model_Company c')\n ->where('c.status = ?', Companies_Model_Company::STATUS_EXPIRED)\n ->addWhere('c.payment_date IS NOT NULL AND ADDDATE(c.payment_date, 8) < NOW()')\n ->execute();\n }", "public function getAll($companyId)\n {\n return\n DB::table('company_bank_accs')\n ->select(\n 'company_id as companyId',\n 'bank_id as bankId',\n 'acc_number as accNumber',\n 'acc_name as accName'\n )\n ->where([\n ['company_id', $companyId]\n ])\n ->get();\n }", "public function getDoctorCashBacks()\n {\n try {\n return $this\n ->cash\n ->join('doctor_income', 'doctor_income.request_id', 'cash_back.id')\n ->where('doctor_income.account_id', auth()->user()->account_id)\n ->select(\n DB::raw(\"(DATE_FORMAT(doctor_income.created_at,'%b')) as month_name\"),\n DB::raw('SUM(doctor_income.income) as doctor_income'),\n DB::raw('SUM(cash_back.seena_cash) as seena_income'),\n DB::raw('SUM(cash_back.patient_cash) as patient_income'),\n DB::raw(\"(DATE_FORMAT(doctor_income.created_at,'%m')) as month\"),\n DB::raw(\"(DATE_FORMAT(doctor_income.created_at,'%Y')) as year\")\n )\n ->groupBy('month', 'year')\n ->orderBy('year', 'desc')\n ->orderBy('month', 'desc')\n ->get();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return new Collection();\n }\n }", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function viewBudget()\n {\n $result = Budget::paginate(50);\n return view('data.list_budget', ['budget' => $result]);\n }", "public function all(): array\n {\n return Billingo::get('bank_accounts');\n }", "public function getAllBusinesses() {\n\t\t$em = $this->getEntityManager();\n\t\t$businesses = $em->createQueryBuilder()\n\t\t\t->select('b.businessID,b.costCenter,b.name')\n\t\t\t->from('Business', 'b')\n\t\t\t->orderBy('b.name')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"businesses\" => $businesses\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public function all()\n {\n return $this->atividadeComercialRepository->all();\n }", "public static function getAll() {\n self::checkConnection();\n $sql = \"SELECT p.*, (p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id GROUP BY p.id ORDER BY end_date DESC, rem DESC;\"; //coalesce similar with isnull;\n if(isset($_GET['_category'])) {\n $category_id = $_GET['_category'];\n settype($category_id, 'integer');\n $sql = sprintf(\"SELECT p.*,(p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id WHERE p.id IN (SELECT c.project_id FROM project_category c WHERE c.category_id = %d) GROUP BY p.id ORDER BY end_date DESC, rem DESC;\", $category_id);\n }\n $results = self::$connection->execute($sql);\n $projects = array();\n foreach ($results as $project_arr) {\n array_push($projects, new Project($project_arr));\n }\n return $projects;\n }", "public function getBudgetsByAddressId($addressId) {\n $nnTable = new Yourdelivery_Model_DbTable_Company_Location();\n $all = $nnTable->fetchAll('locationId = \"' . $addressId . '\"');\n $collector = new SplObjectStorage();\n foreach ($all AS $budget) {\n try {\n $budget = new Yourdelivery_Model_Budget($budget->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $collector->attach($budget);\n }\n return $collector;\n }", "public function getFreeCompanies() { return $this->FreeCompanies; }", "function getAll( $OrderBy = \"ID\", $LimitStart = \"None\", $LimitBy = \"None\" )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n switch ( strtolower( $OrderBy ) )\r\n {\r\n case \"description\":\r\n case \"desc\":\r\n $OrderBy = \"ORDER BY Description\";\r\n break;\r\n case \"name\":\r\n $OrderBy = \"ORDER BY Name\";\r\n break;\r\n case \"parentid\":\r\n case \"pid\":\r\n $OrderBy = \"ORDER BY ParentID\";\r\n break;\r\n case \"id\":\r\n case \"typeid\":\r\n $OrderBy = \"ORDER BY ID\";\r\n break;\r\n default:\r\n $OrderBy = \"ORDER BY ID\";\r\n break;\r\n }\r\n\r\n if ( is_numeric( $LimitStart ) )\r\n {\r\n $LimitArray = array( \"Offset\" => $LimitStart );\r\n\r\n if ( is_numeric( $LimitBy ) )\r\n {\r\n $LimitArray =& array_merge( $LimitArray, array( \"Limit\" => $LimitBy ) );\r\n }\r\n }\r\n else\r\n {\r\n $LimitArray = array();\r\n }\r\n\r\n $company_type_array = array();\r\n $return_array = array();\r\n\r\n\r\n $db->array_query( $company_type_array, \"SELECT ID FROM eZContact_CompanyType $OrderBy\", $LimitClause );\r\n\r\n foreach ( $company_type_array as $companyTypeItem )\r\n {\r\n $return_array[] = new eZCompanyType( $companyTypeItem[ $db->fieldName( \"ID\" ) ] );\r\n }\r\n return $return_array;\r\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function peopleCbo() {\n $people = Person::all();\n return $people;\n }", "public static function getBrandsAll()\n {\n $pdo = Database::getPDO();\n $sql = \"SELECT * FROM `\". static::$table .\"` \n WHERE `order` > 0\n ORDER BY `order` ASC \";\n \n $statement = $pdo->query( $sql );\n $modelListFromDatabase = $statement->fetchAll( PDO::FETCH_ASSOC );\n\n // Etape 2 : On vérifie qu'on a des résultats\n if( $modelListFromDatabase === false ) :\n exit( static::$table.\" not found !\" );\n endif;\n \n // Etape 3 : On prépare un tableau d'objets\n $modelsArray = [];\n\n // Etape 4 : On parcours nos résultats pour créer les objets\n // à partir des données récupérées en BDD\n foreach( $modelListFromDatabase as $modelDataFromDatabase ) :\n $model = new static( $modelDataFromDatabase );\n $modelsArray[] = $model;\n endforeach;\n\n // Etape 5 : On renvoi notre tableau d'objets (ici de type Brand)\n return $modelsArray;\n }", "public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $livres = array();\n foreach ($result as $row) {\n $livreId = $row['book_id'];\n $livres[$livreId] = $this->buildDomainObject($row);\n }\n return $livres;\n }", "public function companies()\n {\n return $this->morphedByMany('App\\Company', 'taggable');\n }", "public function getAll(): PriceListCollectionTransfer;", "function getAllCargos(){\n\t\t\tDB_DataObject::debugLevel(0);\n\t\t\t$obj = DB_DataObject::Factory('VenCargo');\n\t\t\t$data=false;\n\t\t\t$obj->find();\n\t\t\t$i=0;\n\t\t\twhile($obj->fetch()){\n\t\t\t\t$data[$i]['idCargo']=$obj->idCargo;\n\t\t\t\t$data[$i]['nombre']=utf8_encode($obj->nombre);\n\t\t\t\t$data[$i]['estado']=$obj->estado;\n\t\t\t\t$data[$i]['fechaMod']=$obj->fechaMod;\n\t\t\t\t$data[$i]['fecha']=$obj->fecha;\t\n\t\t\t\t$i++;\t\t\n\t\t\t}\n\t\t\t$obj->free();\n\t\t\t//printVar($data,'getAllCargos');\n\t\t\treturn $data;\n\t\t}", "public function get_all_data_bonifications_company($id)\n {\n $datos = $this->db->query('select * from money_usuario left join money_back on usuariosMoneyBackId = moneyBackId where usuarioMoneyId = ' . $id);\n return $datos->row();\n }", "public static function all(){\n\n\t\t//Connection to DB\n\t\t$db = $_COOKIE[\"db\"];\n\n\t\t//Fields\n\t\t$sql = \"SELECT * FROM company_types\";\n\n\t\t//Query\n\t\t$statement = $db->prepare($sql);\n\n\t\t//SET FETCH MODE\n\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\n\t\t//EXECUTE\n\t\t$statement->execute();\n\n\n\t\treturn $statement->fetchAll();\n\t}", "public function company() \n\t{\n\t\treturn $this->belongsTo('Company', 'object_id')->where('soft_deleted', 0);\n\t}", "public function allBranches()\n {\n $client = new Client();\n \t$response = $client->request('GET', 'http://www.dpdparcelshop.cz/api/get-all');\n $statusCode = $response->getStatusCode();\n \t$body = $response->getBody()->getContents();\n\n $result = json_decode($body);\n if($result->code != 200){\n return 'External service error';\n }\n\n\n $branches = array();\n foreach($result->data->items as $item){\n $branch = new BranchModel($item);\n array_push($branches, $branch->getBranchData());\n }\n return $branches;\n }", "public function getCalculos() {\n\n if (count($this->aCalculos) == 0 && !empty($this->iPlanilha)) {\n\n $oDaoBensCalculo = new cl_benshistoricocalculobem();\n $sWhereCalculos = \"t58_benshistoricocalculo = {$this->iPlanilha}\";\n $sSqlBensCalculo = $oDaoBensCalculo->sql_query(null, \"benshistoricocalculobem.*, bens.*, bensdepreciacao.*\", \"t58_sequencial\", $sWhereCalculos);\n $rsBensCaculo = $oDaoBensCalculo->sql_record($sSqlBensCalculo);\n\n if ($oDaoBensCalculo->numrows > 0) {\n\n for ($iCalculo = 0; $iCalculo < $oDaoBensCalculo->numrows; $iCalculo++) {\n\n $oDadosCalculo = db_utils::fieldsMemory($rsBensCaculo, $iCalculo);\n\n $oCalculo = new CalculoBem();\n $oCalculo->setHistoricoCalculo($oDadosCalculo->t58_benshistoricocalculo);\n $oCalculo->setPercentualDepreciado($oDadosCalculo->t58_percentualdepreciado);\n $oCalculo->setSequencial($oDadosCalculo->t58_sequencial);\n $oCalculo->setTipoDepreciacao($oDadosCalculo->t58_benstipodepreciacao);\n $oCalculo->setValorAnterior($oDadosCalculo->t58_valoranterior);\n $oCalculo->setValorAtual($oDadosCalculo->t58_valoratual);\n $oCalculo->setValorCalculado($oDadosCalculo->t58_valorcalculado);\n $oCalculo->setValorResidual($oDadosCalculo->t58_valorresidual);\n $oCalculo->setValorResidualAnterior($oDadosCalculo->t58_valorresidualanterior);\n\n $oBem = new Bem();\n $oBem->setCodigoBem($oDadosCalculo->t52_bem);\n $oBem->setCodigoBemDepreciacao($oDadosCalculo->t44_sequencial);\n $oBem->setTipoDepreciacao( BemTipoDepreciacaoRepository::getPorCodigo($oDadosCalculo->t44_benstipodepreciacao) );\n $oBem->setTipoAquisicao( BemTipoAquisicaoRepository::getPorCodigo($oDadosCalculo->t44_benstipoaquisicao) );\n $oBem->setClassificacao(BemClassificacaoRepository::getPorCodigo($oDadosCalculo->t52_codcla));\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setValorAquisicao($oDadosCalculo->t52_valaqu);\n $oBem->setValorResidual($oDadosCalculo->t44_valorresidual);\n $oBem->setValorDepreciavel($oDadosCalculo->t44_valoratual);\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setDescricao($oDadosCalculo->t52_descr);\n\n $oCalculo->setBem($oBem);\n\n array_push($this->aCalculos, $oCalculo);\n }\n }\n\n unset($oDaoBensCalculo);\n unset($rsBensCaculo);\n }\n return $this->aCalculos;\n }", "public function getAllCompanyRecruitment()\n {\n return \\App\\Recruitment::getAllCompanyRecruitments(\\Auth::id());\n }", "public function getBills()\n {\n return $this->hasMany(Bill::className(), ['cust_id' => 'id']);\n }", "function select_all_company() {\n\t\t$qury=\"SELECT * FROM company\";\n\t\t$requet=mysqli_query($link,$qury);\n\t\t\n\t\twhile($res=mysqli_fetch_assoc($requet)) {\n\t\t\t$data[]=$res;\n\t\t}\n\t\treturn $data;\n\t}", "public function getCashBacks()\n {\n try {\n return $this\n ->cash\n ->where('account_id', auth()->user()->account_id)\n ->orderBy('created_at', 'desc')// get last requests first\n ->orderBy('is_approved', 'asc')// then order them by approved asc 0 -> 1 as not paid first\n ->get();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return new Collection();\n }\n }", "public function all()\n {\n return TipoCabelo::all();\n }", "public function companies()\n {\n return $this->hasMany('App\\Company');\n }", "public function getAllCompanies(){\n\t\t$path=\"../db/data.json\";\n\t\t$file=$this->getData($path);\n\t\n\t\t$arrayFile = json_decode($file, true);\n\t\n\t\treturn $arrayFile['companies'];\n\t}", "public function banks()\n {\n return Cache::remember('banks', $this->cacheTime, function () {\n return collect(Paymentmethods::getBanks(10))->pluck('name', 'id');\n });\n }", "public static function getNormalizedBudgetWithAllProperties()\n {\n return [\n 'budgetId' => -1,\n 'name' => 'Test Budget',\n 'amount' => [\n '@xsi:type' => 'ns1:FakeMoney',\n 'microAmount' => 50000000\n ]\n ];\n }", "public function findAll() {\n $sql = \"select * from billets order by billet_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n \n // Convert query result to an array of domain objects\n $billets = array();\n foreach ($result as $row) {\n $billetId = $row['billet_id'];\n $nbComment = $this->commentDAO->countAllByBillet($billetId);\n $billets[$billetId] = $this->buildDomainObject($row);\n $billets[$billetId]->setNbComment($nbComment);\n }\n return $billets;\n }", "private function getOverBudgetList() {\r\n\t\t$sql = \"SELECT TOP 10 summary, TicketNbr, status_description AS status, Hours_Actual, \";\r\n\t\t$sql .= \"Hours_Budget, company_name, (Hours_Budget - Hours_Actual) AS hours_remaining \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"AND Hours_Budget > 0 \";\r\n\t\t$sql .= \"AND (Hours_Budget - Hours_Actual) < 0 \";\r\n\t\t$sql .= \"ORDER BY hours_remaining\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['hremaining'] = (float)$row['hours_remaining'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function allConductores(){\n global $baseDatos;\n $listaConductores = array();\n if ($this->existeConductor()){\n $sql = \"SELECT * FROM `conductores`\";\n $resultado = $baseDatos->query($sql);\n $conductores = $resultado->fetch_all(MYSQLI_ASSOC);\n foreach ($conductores as $con){\n $conductor = new Conductor();\n $conductor->constructorConductor($con);\n $listaConductores[] = $conductor;\n }\n return $listaConductores;\n }else{\n return null;\n }\n }", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function listAll()\n {\n return $this->contractor->all()->pluck('name', 'id')->all();\n }", "public function getCompaniesForSelect()\n {\n return Company::whereNull('deleted_at')->pluck('name', 'id');\n }", "static function getAll()\n\t\t{\n\t\t\t$returned_brands = $GLOBALS['DB']->query(\"SELECT * FROM brands;\");\n\t\t\t$all_brands = [];\n\t\t\tforeach($returned_brands as $brand){\n\t\t\t\t$name = $brand['name'];\n\t\t\t\t$id = $brand['id'];\n\t\t\t\t$new_brand = new Brand($name, $id);\n\t\t\t\tarray_push($all_brands, $new_brand);\n\t\t\t}\n\t\t\treturn $all_brands;\n\t\t}", "public function getBorrowings();", "public function index()\n {\n $this->getRepository()->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $budgets = $this->getRepository()->orderBy('id', 'desc')->paginate();\n $employees = Employe::where(['isSaler' => 1])->pluck('name', 'id');\n $clients = Client::all()->pluck('name', 'id');\n $cars = Clientcar::all()->pluck('name', 'id');\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $budgets,\n ]);\n }\n\n return view('budgets.index', compact('budgets', 'employees', 'clients', 'cars'));\n }", "public function getAll($tenantId)\n {\n return\n DB::table('companies')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'name',\n 'description',\n 'file_logo as fileLogo',\n 'company_tax_number as companyTaxNumber',\n 'tax_withholder_number as taxWithholderNumber',\n 'tax_withholder_name as taxWithholderName',\n 'location_code as locationCode',\n 'sort_order as sortOrder'\n )\n ->where([\n ['tenant_id', $tenantId]\n ])\n ->get();\n }", "public static function getDecodedBudgetWithAllProperties()\n {\n return [\n 'budgetId' => -1,\n 'name' => 'Test Budget',\n 'amount' => [\n '@xsi:type' => 'FakeMoney',\n 'microAmount' => 50000000\n ]\n ];\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "function getContractList() {\n $sql = \"SELECT * FROM contract ORDER BY id DESC\";\n return getAll($sql);\n}", "public function index()\n {\n $query = Company::query();\n\n $parameters = $parameters = request()->query->all();\n\n $this->sortBy(Company::class, $query, $parameters);\n\n $this->filterBy(Company::class, $query, $parameters);\n \n return CompanyResource::collection($query->paginate(10));\n }", "public function getAll()\n {\n $data = array();\n $rs = parent::findAll(array(\"name\" => \"Commande\"));\n foreach ($rs as $k => $v) {\n foreach ($v as $vi) {\n $data[$k] = new Commande($v['ID'],$v['CLIENTID'],$v['PRODID'],$v['NBPRODUITS'],$v['DATEAJOUT']);\n }\n }\n return $data;\n }", "public function getCompanyFreeVehicles($id_company = null) {\n\t\ttry {\n\t\t\tglobal $con;\t\t\t\n\t\t\t/* Statement declaration */\n\t\t\t$sql = \t\"SELECT * \".\n\t\t\t\t\t\"FROM vehicles v, kinds k, brands b, states s, categories c, energies en, models m, sites si, currencies cu \".\n\t\t\t\t\t\"WHERE v.id_energy = en.id_energy \".\n\t\t\t\t\t\t\"AND v.id_model = m.id_model \".\n\t\t\t\t\t\t\"AND v.id_kind = k.id_kind \".\n\t\t\t\t\t\t\"AND v.id_category = c.id_category \".\n\t\t\t\t\t\t\"AND v.id_state = s.id_state \".\n\t\t\t\t\t\t\"AND v.id_currency = cu.id_currency \".\n\t\t\t\t\t\t\"AND v.id_site = si.id_site \".\n\t\t\t\t\t\t\"AND si.id_company = :id_company \".\n\t\t\t\t\t\t\"AND m.id_brand = b.id_brand \".\n\t\t\t\t\t\t\"AND v.id_vehicle NOT IN (SELECT id_vehicle FROM maintenance WHERE date_endmaintenance > NOW()) \".\n\t\t\t\t\t\t\"AND v.id_vehicle NOT IN (SELECT id_vehicle FROM maintenance WHERE date_endmaintenance = '0000-00-00');\";\n\t\t\t\t\t\n\t\t\t/* Statement values & execution */\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindParam(':id_company', $id_company);\n\t\t\t\n\t\t\t/* Statement execution */\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t/* Handle errors */\n\t\t\tif ($stmt->errno)\n\t\t\t throw new PDOException($stmt->error);\n\t\t\telse\n\t\t\t return $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\n\t\t\t/* Close statement */\n\t\t\t$stmt->close();\n\t\t} catch(PDOException $e) {\n\t\t\treturn array(\"error\" => $e->getMessage());\n\t\t}\n }", "public static function all()\n\t{\n\t\t$portfolios = ORM::factory('portfolio')->where('deleted', '=', '')->find_all();\n\n\t\treturn $portfolios;\n\n\t}", "public function getAll()\n {\n return $this->banque->paginate(10);\n }", "public function getAllCAtegories()\n {\n return $this->dao->findAll();\n }", "public static function getAllBank()\n {\n return DB::table('banks')->select('id', 'name')->get();\n }", "public function getCompanyWithUsers();", "public function index()\n {\n $company = $this->repository->all();\n return $company;\n }", "public function getCreditmemoWarehouseList();", "public function all() {\n $stmt = $this->pdo->query('SELECT id, symbol, company '\n . 'FROM stocks '\n . 'ORDER BY symbol');\n $stocks = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $stocks[] = [\n 'id' => $row['id'],\n 'symbol' => $row['symbol'],\n 'company' => $row['company']\n ];\n }\n return $stocks;\n }", "public static function all(){\n\t\t$bdd = new DBcnx();\n\t\t\treturn $bdd->allClient();\n\t}", "public function getAll()\n {\n return DB::table('bukus')->all();\n }", "function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$CompArr[$Sql->Position]['Name']=htmlspecialchars(stripslashes($Row->NAME));\n\t\t$CompArr[$Sql->Position]['Value']=$Row->ID;\n\t}\n\treturn $CompArr;\n}", "public function getAll() {\n\n $query = $this->db->prepare('SELECT * FROM comentario ORDER BY puntaje');\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function getBanks()\n {\n return $this->hasMany(Bank::className(), ['currency_id' => 'currency_id']);\n }", "public function company()\n {\n return $this->hasMany('\\App\\Company', 'id_plan');\n }", "public static function getAll() : array {\n return self::$objects;\n }", "public function getAllActive()\n {\n\n $qb = $this->createQueryBuilder('u')->select('u')\n ->andWhere('u.isDeleted =:is_deleted')\n ->andWhere('u.status =:status')\n ->setParameters(array(\n 'is_deleted' => false,\n 'status' => $this->sm->active()\n ));\n $qb->orderBy('u.company', 'DESC');\n return $qb->getQuery()->getResult();\n }", "public function getAll()\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('p.*')\n ->from('Pc', 'p');\n\n $statement = $queryBuilder->execute();\n $PcData = $statement->fetchAll();\n foreach ($PcData as $computerData) {\n $PcEntityList[$computerData['id']] = new Pc($computerData['id'], $computerData['marque']);\n }\n\n return $PcEntityList;\n }", "public function selectAllContracteData(){\n $sql = \"SELECT * FROM contract ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function getCompaniesReport() : CompaniesReport\n\t{\n\t\t$response = $this->execute('Empresa');\n\t\t\n\t\t$companiesByArea = [];\n\t\tforeach($response['e'] as $areaPool){\n\t\t\t$i = $areaPool['a'];\n\t\t\tforeach($areaPool['e'] as $company){\n\t\t\t\t$companiesByArea[$i][]=new Company(\n\t\t\t\t\t$company['a'],\n\t\t\t\t\t$company['c'],\n\t\t\t\t\t$company['n']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn new CompaniesReport($response['hr'],$companiesByArea);\n\t}", "public function all()\n {\n $accounts = $this->walletAccounts()->get()\n ->tap(function ($accounts) use (&$totalAvailablePrice) {\n $totalAvailablePrice = $accounts->sum('available_price');\n })\n ->each(function ($account) use ($totalAvailablePrice) {\n $divisor = $totalAvailablePrice > 0 ? $totalAvailablePrice : 1;\n $quota = ceil(($account->available_price * 100) / $divisor);\n $account->setAttribute('available_price_quota', $quota);\n });\n\n return WalletAccountResource::collection($accounts);\n }", "public static function getBudgetWithAllValuesAsAdwords()\n {\n $budget = new FakeBudget();\n $budget->setBudgetId('adwords');\n $budget->setName('adwords');\n\n return $budget;\n }", "public function company()\n {\n return $this->business();\n }", "public function getAllCompanyAccounts()\n { \n // select all fields and columns form the 'companies' table and return is as an array of objects\n $companies = Company::all();\n\n // if the length of array of company objects is greater than 0 (contains elements)\n if (count($companies) > 0) {\n // loop through each company, get the token from the 'company_activation_codes' table and update the object\n foreach ($companies as $key => $value) {\n $token = CompanyActivationCode::where('company_id', $value['id'])->first()->activation_code;\n $value['token'] = $token;\n $companies[$key] = $value;\n }\n }\n \n // send a response to the requester of the data\n $response_message = array('success' => true, 'message' => 'Data fetched', 'data' => $companies);\n return response()->json($response_message);\n }", "public static function getBudgetWithNoAmountObject()\n {\n $budget = new FakeBudget();\n $budget->setBudgetId(-1);\n $budget->setName('Interplanetary Cruise #57a058e71f2b9');\n\n return $budget;\n }", "public function companies()\n {\n return $this->belongsToMany('App\\Company')->withTimestamps();\n }", "public function index()\n {\n // return $request->all();\n return Company::all();\n }", "public function index(Request $request)\n {\n //\n if ($request->filled('all'))\n {\n $budgets = \\App\\Budget::with(['workflow', 'department', 'action'])->orderBy('id', 'desc')->get();\n return ['data'=>$budgets]; \n }\n else\n {\n $budgets = \\App\\Budget::with(['workflow', 'department', 'action'])->orderBy('id', 'desc')->paginate(15);\n // $imprest[] = 0;\n // foreach($budgets as $budget)\n // {\n // $imprest[] = \\App\\Imprest::where('budget_id', $budget->id)->first(); \n // }\n // // $imprest;\n // return ['data'=>$budgets, 'imprest'=>$imprest]; \n return BudgetResource::collection($budgets);\n }\n \n \n }", "public function getBudgetObjectById($id) {\n\t\t$dbh = Database::getPdo();\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM \" . self::DB_TABLE . \" WHERE id = :id LIMIT 1\";\n\t\t\t$stmt = $dbh->prepare($sql);\n\t\t\t$stmt->bindParam(':id', $id, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$budget = new Budget();\n\t\t\t$stmt->setFetchMode(PDO::FETCH_INTO, $budget);\n\t\t\t$result = $stmt->fetch();\n\t\t\treturn $result;\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Unable to retrieve record ' . $e->getMessage();\n\t\t}\n\t}", "public function CahierDesCharges()\n\t{\n\t\treturn $this->hasMany('App\\CahierDesCharges', 'company_id');//mise en place de la relation (clef etrangère) cahier des charges a pour clef etrangère la clef primaire de la table company\n\t}", "public function getCompany(Company $company)\n {\n return TimelineResource::collection($company->timeline()->paginate());\n }" ]
[ "0.80036753", "0.69953966", "0.68506557", "0.67112535", "0.65952253", "0.64342594", "0.6264919", "0.6158434", "0.60893327", "0.60579413", "0.60140085", "0.59997874", "0.59993225", "0.5892793", "0.58861786", "0.58673936", "0.58306706", "0.5820295", "0.5809164", "0.58073443", "0.5776085", "0.57415384", "0.57374954", "0.573621", "0.5727508", "0.5719525", "0.5661433", "0.56612104", "0.5645164", "0.5642133", "0.5626821", "0.5613018", "0.56006324", "0.56006324", "0.5584138", "0.55759144", "0.55698603", "0.55657023", "0.5545997", "0.5523915", "0.5501158", "0.5495017", "0.549469", "0.54919606", "0.54875803", "0.54780334", "0.5475951", "0.5469567", "0.54692775", "0.5466507", "0.5452182", "0.5438158", "0.5430992", "0.54189765", "0.54148096", "0.5396079", "0.5394764", "0.53821903", "0.53816694", "0.537465", "0.5369279", "0.5367805", "0.536162", "0.5359206", "0.53553486", "0.53538", "0.53524864", "0.5340372", "0.5330501", "0.53300196", "0.5320357", "0.530309", "0.5298559", "0.52960193", "0.5295906", "0.5293009", "0.5284667", "0.52575105", "0.5253555", "0.5251901", "0.5246083", "0.5246068", "0.5244732", "0.5231237", "0.5230529", "0.5221095", "0.5220499", "0.5220413", "0.521846", "0.5216318", "0.5201287", "0.51990694", "0.5191323", "0.5180337", "0.5173913", "0.51703227", "0.5157515", "0.51547647", "0.5141553", "0.51370937" ]
0.83090556
0
create new relation between company address and budget
public function addBudget($budget, $location) { if (!is_object($budget) || !is_object($location)) { return false; } $rel = new Yourdelivery_Model_DbTable_Company_Locations(); $row = $rel->createRow(); $row->budgetId = $budget->getId(); $row->locationId = $location->getId(); return $row->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Request $request)\n { \n $success = true;\n \n if (!$this->isJsonCorrect($request, 'companies')) {\n $error['errors']['json'] = Lang::get('messages.InvalidJson');\n return response()->json($error)->setStatusCode($this->status_codes['conflict']);\n }\n else{\n $data = $request->all()['data'];\n }\n\n DB::beginTransaction();\n\n try {\n $company = $this->company->create($data['attributes']);\n } catch (\\Exception $e) {\n DB::rollBack();\n $error['errors']['companies'] = Lang::get('messages.NotOptionIncludeClass',\n ['class' => 'Company', 'option' => 'created', 'include' => '']);\n $error['errors']['Message'] = $e->getMessage();\n return response()->json($error)->setStatusCode($this->status_codes['conflict']);\n }\n\n /*\n * Check if Json has relationships to continue or if not and commit + return.\n */\n if (isset($data['relationships']) && $success) {\n $dataRelationships = $data['relationships'];\n\n if (isset($dataRelationships['addresses'])) {\n if (isset($dataRelationships['addresses']['data'])) {\n \n $addressInterface = app()->make('WA\\Repositories\\Address\\AddressInterface');\n $data = $dataRelationships['addresses']['data'];\n\n $addressIdArray = [];\n\n foreach ($data as $item) {\n try {\n Log::debug(\"item: \". print_r($item, true));\n if($item['id'] > 0) {\n array_push($addressIdArray, $item);\n } else {\n $newAddress = $addressInterface->create($item['attributes']);\n Log::debug(\"NEW ADDRESS: \". print_r($newAddress, true));\n $aux['id'] = $newAddress->id;\n $aux['type'] = 'addresses';\n array_push($addressIdArray, $aux);\n }\n\n $dataAddress = $this->parseJsonToArray($addressIdArray, 'addresses');\n $company->addresses()->sync($dataAddress); \n } catch (\\Exception $e) {\n DB::rollBack();\n $error['errors']['addresses'] = Lang::get('messages.NotOptionIncludeClass', ['class' => 'Company', 'option' => 'created', 'include' => 'Address']);\n $error['errors']['Message'] = $e->getMessage();\n return response()->json($error)->setStatusCode($this->status_codes['conflict']);\n }\n }\n }\n }\n\n if (isset($dataRelationships['udls'])) {\n if (isset($dataRelationships['udls']['data'])) {\n\n try {\n\n $helper = app()->make('WA\\Http\\Controllers\\UdlsHelperController');\n $success = $helper->create($dataRelationships['udls'], $company->id);\n\n if (!$success){\n $error['errors']['udls'] = Lang::get('messages.NotOptionIncludeClass',['class' => 'Udl', 'option' => 'created', 'include' => '']);\n }\n\n } catch (\\Exception $e) {\n $success = false;\n $error['errors']['udls'] = Lang::get('messages.NotOptionIncludeClass', ['class' => 'Udl', 'option' => 'created', 'include' => '']);\n //$error['errors']['Message'] = $e->getMessage();\n }\n }\n }\n }\n\n if($success){\n DB::commit();\n return $this->response()->item($company, new CompanyTransformer(),\n ['key' => 'companies'])->setStatusCode($this->status_codes['created']);\n } else {\n DB::rollBack();\n return response()->json($error)->setStatusCode($this->status_codes['conflict']);\n }\n }", "public function create(Company $company)\n {\n //\n }", "public function create(Company $company)\n {\n //\n }", "private function createRelation()\n {\n $this->createBuilder();\n }", "public function store(StoreCompanyRequest $request)\n {\n //dd($request->all());\n $agency = Company::create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'email' => $request->email,\n 'phone' => $request->phone,\n 'website' => $request->website,\n\n 'street' => $request->street,\n 'street_number' => $request->street_number,\n 'address_info' => $request->address_info,\n 'location' => $request->location,\n 'postal_code' => $request->postal_code,\n 'state' => $request->state,\n 'country' => $request->country,\n 'lat' => $request->lat,\n 'lng' => $request->lng,\n\n 'employees' => $request->employees,\n 'has_branches' => $request->has_branches === 'on' ? true : false,\n 'has_insurance' => $request->has_insurance === 'on' ? true : false,\n 'has_newsletter' => $request->has_newsletter === 'on' ? true : false,\n 'founded' => $request->founded,\n 'defunct' => $request->defunct,\n\n 'facebook' => $request->facebook,\n 'twitter' => $request->twitter,\n 'instagram' => $request->instagram,\n 'linkedin' => $request->linkedin,\n 'snapchat' => $request->snapchat,\n 'blog' => $request->blog,\n 'skype' => $request->skype,\n 'pinterest' => $request->pinterest,\n 'youtube' => $request->youtube,\n\n 'status' => $request->status,\n //'agency_type' => isset($request->agency_type) ? implode(' | ', $request->agency_type) : '',\n ]);\n\n if ($request->categories) {\n $agency->categories()->attach($request->categories);\n }\n if ($request->countries) {\n $agency->countries()->attach($request->countries);\n }\n\n session()->flash('success', 'Travel Agency added successfully');\n\n return redirect(route('companies.index'));\n }", "public function billingaddress()\n {\n return $this->belongsTo('App\\Models\\BookAddress','billing_address_id');\n }", "public function actionCreate()\n {\t\t\n $model = new Personcompany();\n\t\t\n\t\t$request = Yii::$app->request;\n\t\t$gmp_company_name = trim($request->post('gmp_company_name',''));\n\t\t$gmp_address1 = trim($request->post('gmp_address1',''));\n\t\t$gmp_address2 = trim($request->post('gmp_address2',''));\n\t\t$gmp_city_id_fk = intval($request->post('gmp_city_id_fk',0));\n\t\t$gmp_state_id_fk = intval($request->post('gmp_state_id_fk',0));\n\t\t$gmp_country_id_fk = intval($request->post('gmp_country_id_fk',0));\n\t\t$gmp_pobox = trim($request->post('gmp_pobox',''));\n\t\t$gmp_zip_pincode = trim($request->post('gmp_zip_pincode',''));\n\t\t\n\t\t$gmp_company_id_pk = intval($request->post('gmp_company_id_pk',0));\n\t\t\n\t\tif(isset($_POST) && strlen($gmp_company_name) > 0){\n\t\t\n\t\t\t$mis = Yii::$app->db->createCommand(\"LOCK TABLES bpr_person_company WRITE,bpr_role WRITE,bpr_unit WRITE,bpr_unit_conversion WRITE,bpr_country_dump WRITE, bpr_state_dump WRITE, bpr_city_dump WRITE, bpr_country WRITE, bpr_state WRITE, bpr_city WRITE\")->query();\n\t\t\t\n\t\t\t$fieldArray = array('name' => trim($gmp_company_name));\n\t\t\t$is_company_exists = checkCommonFunctions::check_If_Record_Exists($model,$fieldArray);\n\t\t\t\n\t\t\tif($is_company_exists==\"No\"){\n\t\t\t\t$command = Yii::$app->db->createCommand()\n\t\t\t\t\t->insert('bpr_person_company', [\n\t\t\t\t\t'name' => $gmp_company_name,\n\t\t\t\t\t'address1' => trim($gmp_address1),\n\t\t\t\t\t'address2' => trim($gmp_address2),\n\t\t\t\t\t'city_id_fk' => $gmp_city_id_fk,\n\t\t\t\t\t'state_id_fk' => $gmp_state_id_fk,\n\t\t\t\t\t'country_id_fk' => $gmp_country_id_fk,\n\t\t\t\t\t'pobox'=> trim($gmp_pobox),\n\t\t\t\t\t'zip_postalcode' => trim($gmp_zip_pincode),\n\t\t\t\t\t'isDeleted' => '0',\n\t\t\t\t\t'addedby_person_id_fk' => Yii::$app->user->id,\n\t\t\t\t\t'created_datetime' => date(\"Y-m-d H:i:s\"),\t\t\t\t\n\t\t\t\t])->execute();\n\t\t\t\t\n\t\t\t\t$supercompid = Yii::$app->db->getLastInsertID();\n\t\t\t\t$command = Yii::$app->db->createCommand()\n\t\t\t\t\t->insert('bpr_role', [\n\t\t\t\t\t'is_administrator' => '1',\n\t\t\t\t\t'name' => 'Administrator',\n\t\t\t\t\t'modules' => '__ALL__',\n\t\t\t\t\t'isDeleted' => '0',\n\t\t\t\t\t'addedby_person_id_fk' => Yii::$app->user->id,\n\t\t\t\t\t'created_datetime' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t'super_company_id_fk' => $supercompid,\t\t\t\t\n\t\t\t\t])->execute();\n\t\t\t\t\n\t\t\t\tif($supercompid>0)\n\t\t\t\t{\n\t\t\t\t\tCommonFunctions::dumpDefaultUnitsForCompany($supercompid);\n\t\t\t\t\tCommonFunctions::dumpDefaultGeographicsForCompany($supercompid);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$mis = Yii::$app->db->createCommand(\"UNLOCK TABLES\")->query();\n\t\t\tActivityLog::logUserActivity(Yii::$app->user->id,Yii::$app->params['audit_log_screen_name']['PersonCompany'],Yii::$app->params['audit_log_action']['ADD'],'Added new person company',\"\");\n\t\t\treturn $this->redirect(['index']);\n\t\t}else{ \t\t\t\n\t\t\t return $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t} \n \n }", "function roomify_conversations_add_booking_address() {\n field_info_cache_clear();\n\n // \"booking_address\" field.\n if (field_read_field('booking_address') === FALSE) {\n $field = array(\n 'field_name' => 'booking_address',\n 'type' => 'addressfield',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(),\n );\n field_create_field($field);\n }\n\n field_cache_clear();\n\n // \"booking_address\" field instance.\n if (field_read_instance('bat_booking', 'booking_address', 'conversation_booking') === FALSE) {\n $instance = array(\n 'field_name' => 'booking_address',\n 'entity_type' => 'bat_booking',\n 'label' => 'Address',\n 'bundle' => 'conversation_booking',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'addressfield_standard',\n 'settings' => array(\n 'default_country' => '',\n ),\n ),\n );\n field_create_instance($instance);\n }\n}", "public function billingAddress()\n {\n return $this->belongsTo('App\\Address');\n }", "public function createCompanyProfile($input);", "public function store(Request $request)\n {\n $company = $request->input('company');\n $credit_term = $request->input('credit_term');\n $credit_term_amount = $request->input('credit_term_amount');\n $validator = Validator::make($request->all(), [\n // 'company_name_th' => 'required',\n ]);\n\n if (!$validator->fails()) {\n \\DB::beginTransaction();\n try {\n if ($company) {\n $Company = new Company;\n foreach ($company as $key => $val) {\n $Company->{$key} = $val;\n }\n if (!isset($company['company_status'])) {\n $Company->company_status = 0;\n }\n if (!isset($company['company_branch_status'])) {\n $Company->company_branch_status = 'N';\n }\n $Company->admin_id = Null;\n $Company->save();\n }\n // $Company_id = $Company->getKey();\n if ($credit_term) {\n $CreditTerm = new CreditTerm;\n foreach ($credit_term as $key => $val) {\n $CreditTerm->{$key} = $val;\n }\n $CreditTerm->company_id = $Company->company_id;\n $CreditTerm->credit_term_status = 1;\n $CreditTerm->save();\n }\n if ($credit_term_amount) {\n $CreditTermAmount = new CreditTermAmount;\n \n foreach ($credit_term_amount as $key => $val) {\n $CreditTermAmount->{$key} = $val;\n }\n $CreditTermAmount->company_id = $Company->company_id;\n $CreditTermAmount->credit_term_amount_status = 1;\n if($CreditTermAmount->credit_term_amount_price){\n $CreditTermAmount->credit_term_amount_price = str_replace(',', '', $CreditTermAmount->credit_term_amount_price);\n }\n $CreditTermAmount->save();\n }\n \\DB::commit();\n $return['status'] = 1;\n $return['content'] = 'Success';\n } catch (Exception $e) {\n \\DB::rollBack();\n $return['status'] = 0;\n $return['content'] = 'Unsuccess';\n }\n } else {\n $failedRules = $validator->failed();\n $return['content'] = 'Unsuccess';\n if (isset($failedRules['company_name_th']['required'])) {\n $return['status'] = 2;\n $return['title'] = \"Company is required\";\n }\n }\n $return['title'] = 'Insert';\n return $return;\n }", "public function test_1_1()\n {\n global $Address;\n\n $out = SetupTestData::hasmany_save_1();\n\n $address = $Address->create([\n 'line1' => 'line1_4',\n 'zipcode' => '44444',\n 'state' => 'MN'\n ]);\n\n $out['person']->add_to_addresses($address);\n\n $out['person']->save();\n\n\n // tests\n $this->assert($address->id !== NULL, 'New object id is set');\n\n $this->assert($out['person']->size_addresses() === 4, 'Has many has 4 objects');\n\n foreach ($out['person']->get_addresses() as $i => $address)\n {\n $this->assert($address->zipcode === str_repeat(($i+1).'', 5), 'Address zipcode correct');\n }\n }", "public function storePurchaseInLedger($p)\n {\n \n $p_account = AccountTransition::create([\n 'sub_account_id' => $this->purchase_account,\n 'transition_date' => $p->invoice_date,\n 'purchase_id' => $p->id,\n 'supplier_id' => $p->supplier_id,\n 'vochur_no' => $p->invoice_no,\n 'description' => '',\n 'is_cashbook' => 0,\n 'status' => 'purchase',\n 'debit' => (int)$p->pay_amount+ (int)$p->balance_amount,\n 'created_by' => Auth::user()->id,\n 'updated_by' => Auth::user()->id,\n ]);\n if ($p->payment_type == 'cash' || ($p->payment_type == 'credit' && $p->pay_amount != 0)) {\n $p_type = $p_account->replicate()->fill([\n 'sub_account_id' => $p->payment_type == 'cash' ? $this->cash_purchase : $this->purchase_advance,\n // 'credit' => $p->payment_type == 'cash' ? $p->pay_amount:(int)$p->pay_amount+ (int)$p->balance_amount,\n 'credit' => $p->pay_amount,\n 'status' => 'purchase',\n 'debit' => null,\n ]);\n $p_type->save();\n }\n }", "public function company()\n {\n $this->belongsTo(Company::class);\n }", "public function test_3_1()\n {\n global $Address;\n\n // setup\n $out = SetupTestData::hasmany_save_3();\n\n $address = $Address->create([\n 'line1' => 'line1_4',\n 'zipcode' => '44444',\n 'state' => 'MN'\n ]);\n\n $out['person']->add_to_addresses($address);\n\n $out['person']->save();\n\n\n // tests\n $this->assert($address->id !== NULL, 'New object id is set');\n\n $this->assert($out['person']->size_addresses() === 4, 'Has many has 4 objects');\n\n foreach ($out['person']->get_addresses() as $i => $address)\n {\n $this->assert($address->zipcode === str_repeat(($i+1).'', 5), 'Address zipcode correct');\n }\n }", "function add_to_project_library(Request $request){\n $pid = $request->pid;\n $pro = Products::where('pid',$pid)->first();\n\n if($pro->sale_price_start_date <= date('Y-m-d') && $pro->sale_price_end_date >= date('Y-m-d')){\n $totalPrice = $pro->sale_price;\n $price = $pro->sale_price;\n }else{\n $totalPrice = $pro->price;\n $price = $pro->price;\n }\n\n $address = UserAddress::where('user_id',Auth::user()->id)->count();\n if($address > 0){\n $user_address = UserAddress::where('user_id',Auth::user()->id)->first();\n $address_id = $user_address->id;\n }else{\n $add = new UserAddress;\n $add->user_id = Auth::user()->id;\n $add->type = 'billing';\n $add->first_name = Auth::user()->first_name;\n $add->last_name = Auth::user()->last_name;\n $add->email = Auth::user()->email;\n $add->mobile = '9000000000';\n $add->address = 'Test Address';\n $add->city = 'Test City';\n $add->state = 'Test State';\n $add->zipcode = 'Test zipcode';\n $add->is_default = 0;\n $add->status = 1;\n $add->created_at = Carbon::now();\n $save = $add->save();\n\n $address_id = $add->id;\n }\n\n $invoice = time();\n\n $order = new Orders;\n $order->user_id = Auth::user()->id;\n $order->order_number = $invoice;\n $order->order_date = Carbon::now();\n\n $order->order_token = $invoice;\n $order->order_status = 'Success';\n $order->payer_email = Auth::user()->email;\n $order->payerid = Auth::user()->id;\n $order->payer_first_name = Auth::user()->first_name;\n $order->payer_last_name = Auth::user()->last_name;\n\n $order->order_description = 'Payment towards order '.$invoice;\n $order->ordered_amt = $totalPrice;\n $order->booking_datebooked = date('Y-m-d');\n $order->booking_timebooked = date('H:i:s');\n $order->booking_cart_total = 1;\n $order->total = $totalPrice;\n $order->address_id = $address_id;\n $order->cart_total = serialize($pro);\n $order->created_at = Carbon::now();\n $order->save();\n\n $bp = new Booking_process;\n $bp->user_id = Auth::user()->id;\n $bp->order_id = $order->id;\n $bp->category_id = 1;\n $bp->product_id = $pro->id;\n $bp->product_name = $pro->product_name;\n $bp->product_quantity = 1;\n $bp->bookingdate = date('Y-m-d');\n $bp->bookingtime = date('H:i:s');\n $bp->setpayment = $price;\n $bp->subtotal = $totalPrice;\n $bp->created_at = Carbon::now();\n $bp->save();\n\n $this->remove_all_items();\n\n return redirect('order/invoice/'.$invoice);\n }", "public function test_4_1()\n {\n global $Address;\n\n // setup\n $out = SetupTestData::hasmany_save_4();\n\n $address = $Address->create([\n 'line1' => 'line1_1',\n 'zipcode' => '11111',\n 'state' => 'MN'\n ]);\n\n $out['person']->add_to_addresses($address);\n\n $out['person']->save();\n\n\n // tests\n $this->assert($out['result'] !== NULL, 'Save successful');\n\n $this->assert($address->id !== NULL, 'New object id is set');\n\n $this->assert($out['person']->size_addresses() === 1, 'Has many has 1 objects');\n\n foreach ($out['person']->get_addresses() as $i => $address)\n {\n $this->assert($address->zipcode === str_repeat(($i+1).'', 5), 'Address zipcode correct');\n }\n }", "protected function createDonorAddressEntry()\n {\n $this->donor_address = new DonorAddress;\n \n $this->donor_address->set('donor_id', $this->donor->get('id'));\n $this->donor_address->set('address', $this->data['address']);\n $this->donor_address->set('city', $this->data['city']);\n $this->donor_address->set('region', $this->data['region']);\n $this->donor_address->set('country', $this->data['country']);\n $this->donor_address->set('postal_code', $this->data['postal_code']);\n $this->donor_address->set('telephone', $this->data['telephone']);\n \n $this->donor_address->create();\n }", "public function setNewBusinessPartner($businessPartnerCompany, $businessPartnerAddress) {\n\n header('Content-Type:application/json; charset=utf-8');\n $start = microtime(true);\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"SET NAMES utf8\";\n try {\n $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n }\n $sql = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n\t\t\tINSERT INTO `businesspartner`\n\t\t\t (\n `companyId`,\n `businessPartnerCategoryId`,\n `businessPartnerOfficeCountryId`,\n `businessPartnerOfficeStateId`,\n `businessPartnerOfficeCityId`,\n `businessPartnerShippingCountryId`,\n `businessPartnerShippingStateId`,\n `businessPartnerShippingCityId`,\n `businessPartnerCompany`,\n `businessPartnerOfficeAddress`,\n `businessPartnerShippingAddress`,\n `isDefault`,\n `isNew`,\n `isDraft`,\n `isUpdate`,\n `isDelete`,\n `isActive`,\n `isApproved`,\n `isReview`,\n `isPost`,\n `executeBy`,\n `executeTime`\n \t\t\t ) VALUES (\n \t\t\t '\" . $this->getCompanyId() . \"',\n \t\t\t '\" . $this->getFastBusinessPartnerCategory() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n\t\t\t\t'\" . $businessPartnerCompany . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\n\t\t\t\t 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n '\" . $this->getStaffId() . \"',\n \" . $this->getExecuteTime() . \"\n\t\t\t )\t\t\t\n\t\t\t\";\n } else\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n\t\t\tINSERT INTO [businessPartner]\n\t\t\t (\n [companyId],\n [businessPartnerCategoryId],\n [businessPartnerOfficeCountryId],\n [businessPartnerOfficeStateId],\n [businessPartnerOfficeCityId],\n [businessPartnerShippingCountryId],\n [businessPartnerShippingStateId],\n [businessPartnerShippingCityId],\n [businessPartnerCompany],\n [businessPartnerOfficeAddress],\n [businessPartnerShippingAddress],\n [isDefault],\n [isNew],\n [isDraft],\n [isUpdate],\n [isDelete],\n [isActive],\n [isApproved],\n [isReview],\n [isPost],\n [executeBy],\n [executeTime]\n \t\t\t ) VALUES (\n \t\t\t '\" . $this->getCompanyId() . \"',\n \t\t\t '\" . $this->getFastBusinessPartnerCategory() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n\t\t\t\t'\" . $businessPartnerCompany . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\n\t\t\t\t 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n '\" . $this->getStaffId() . \"',\n \" . $this->getExecuteTime() . \"\n\t\t\t )\n\t\t\t\";\n } else\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n\t\t\tINSERT INTO BUSINESSPARTNER\n\t\t\t (\n COMPANYID,\n BUSINESSPARTNERCATEGORYID,\n BUSINESSPARTNEROFFICECOUNTRYID,\n BUSINESSPARTNEROFFICESTATEID,\n BUSINESSPARTNEROFFICECITYID,\n BUSINESSPARTNERSHIPPINGCOUNTRYID,\n BUSINESSPARTNERSHIPPINGSTATEID,\n BUSINESSPARTNERSHIPPINGCITYID,\n BUSINESSPARTNERCOMPANY,\n BUSINESSPARTNEROFFICEADDRESS,\n BUSINESSPARTNERSHIPPINGADDRESS,\n ISDEFAULT,\n ISNEW,\n ISDRAFT,\n ISUPDATE,\n ISDELETE,\n ISACTIVE,\n ISAPPROVED,\n ISREVIEW,\n ISPOST,\n EXECUTEBY,\n EXECUTETIME\n \t\t\t ) VALUES (\n \t\t\t '\" . $this->getCompanyId() . \"',\n \t\t\t '\" . $this->getFastBusinessPartnerCategory() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n\t\t\t\t'\" . $businessPartnerCompany . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\n\t\t\t\t 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n '\" . $this->getStaffId() . \"',\n \" . $this->getExecuteTime() . \"\n\t\t\t )\n\t\t\t\";\n }\n\n\n try {\n $this->q->create($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n $businessPartnerId = $this->q->lastInsertId('businessPartner');\n $this->q->commit();\n $end = microtime(true);\n $time = $end - $start;\n echo json_encode(\n array(\n \"success\" => true,\n \"message\" => $this->t['newRecordTextLabel'],\n \"staffName\" => $_SESSION['staffName'],\n \"executeTime\" => date('d-m-Y H:i:s'),\n \"businessPartnerId\" => $businessPartnerId,\n \"time\" => $time\n )\n );\n exit();\n }", "public function addAddress()\r\n {\r\n if ($this->_helper()->checkSalesVersion('1.4.0.0')) {\r\n # Community after 1.4.1.0 and Enterprise\r\n $salesFlatOrderAddress = $this->_helper()->getSql()->getTable('sales_flat_order_address');\r\n $this->getSelect()\r\n ->joinLeft(array('flat_order_addr_ship' => $salesFlatOrderAddress), \"flat_order_addr_ship.parent_id = main_table.entity_id AND flat_order_addr_ship.address_type = 'shipping'\", array())\r\n ->joinLeft(array('flat_order_addr_bill' => $salesFlatOrderAddress), \"flat_order_addr_bill.parent_id = main_table.entity_id AND flat_order_addr_bill.address_type = 'billing'\", array())\r\n ->columns(array('country_id' => 'IFNULL(flat_order_addr_ship.country_id, flat_order_addr_bill.country_id)'))\r\n ->group('country_id');\r\n } else {\r\n # Old Community\r\n $entityValue = $this->_helper()->getSql()->getTable('sales_order_entity_varchar');\r\n $entityAtribute = $this->_helper()->getSql()->getTable('eav_attribute');\r\n $entityType = $this->_helper()->getSql()->getTable('eav_entity_type');\r\n $orderEntity = $this->_helper()->getSql()->getTable('sales_order_entity');\r\n\r\n $this->getSelect()\r\n ->joinLeft(array('_eavType' => $entityType), \"_eavType.entity_type_code = 'order_address'\", array())\r\n ->joinLeft(array('_addrTypeAttr' => $entityAtribute), \"_addrTypeAttr.entity_type_id = _eavType.entity_type_id AND _addrTypeAttr.attribute_code = 'address_type'\", array())\r\n ->joinLeft(array('_addrValueAttr' => $entityAtribute), \"_addrValueAttr.entity_type_id = _eavType.entity_type_id AND _addrValueAttr.attribute_code = 'country_id'\", array())\r\n\r\n # Shipping values\r\n ->joinRight(array('_orderEntity_ship' => $orderEntity), \"_orderEntity_ship.entity_type_id = _eavType.entity_type_id AND _orderEntity_ship.parent_id = e.entity_id\", array())\r\n ->joinRight(array('_addrTypeVal_ship' => $entityValue), \"_addrTypeVal_ship.attribute_id = _addrTypeAttr.attribute_id AND _addrTypeVal_ship.entity_id = _orderEntity_ship.entity_id AND _addrTypeVal_ship.value = 'shipping'\", array())\r\n ->joinRight(array('_addrCountryVal_ship' => $entityValue), \"_addrCountryVal_ship.attribute_id = _addrValueAttr.attribute_id AND _addrCountryVal_ship.entity_id = _orderEntity_ship.entity_id\", array())\r\n\r\n # Billing values\r\n ->joinRight(array('_orderEntity_bill' => $orderEntity), \"_orderEntity_bill.entity_type_id = _eavType.entity_type_id AND _orderEntity_bill.parent_id = e.entity_id\", array())\r\n ->joinRight(array('_addrTypeVal_bill' => $entityValue), \"_addrTypeVal_bill.attribute_id = _addrTypeAttr.attribute_id AND _addrTypeVal_bill.entity_id = _orderEntity_bill.entity_id AND _addrTypeVal_bill.value = 'billing'\", array())\r\n ->joinRight(array('_addrCountryVal_bill' => $entityValue), \"_addrCountryVal_bill.attribute_id = _addrValueAttr.attribute_id AND _addrCountryVal_bill.entity_id = _orderEntity_bill.entity_id\", array())\r\n\r\n ->columns(array('country_id' => 'IFNULL(_addrCountryVal_ship.value, _addrCountryVal_bill.value)'))\r\n ->group('country_id');\r\n }\r\n return $this;\r\n }", "protected function createCompany($user)\n\t{\n\t\t\n\t}", "private function add_company()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t$company = $serviceManager->get('PM/Model/Companies');\n \t\n \t$result = $company->getCompanyById($this->pk);\t\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['id']));\n \t\t$this->add_breadcrumb($company_url, $result['name'], TRUE);\n \t} \t\n }", "public function company()\n {\n return $this->hasMany('\\App\\Company', 'id_plan');\n }", "public function setNewBusinessPartner($businessPartnerCompany, $businessPartnerAddress) {\n\n header('Content-Type:application/json; charset=utf-8');\n $start = microtime(true);\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"SET NAMES utf8\";\n try {\n $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n }\n $sql = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n\t\t\tINSERT INTO `businesspartner`\n\t\t\t (\n `companyId`,\n `businessPartnerCategoryId`,\n `businessPartnerOfficeCountryId`,\n `businessPartnerOfficeStateId`,\n `businessPartnerOfficeCityId`,\n `businessPartnerShippingCountryId`,\n `businessPartnerShippingStateId`,\n `businessPartnerShippingCityId`,\n `businessPartnerCompany`,\n `businessPartnerOfficeAddress`,\n `businessPartnerShippingAddress`,\n `isDefault`,\n `isNew`,\n `isDraft`,\n `isUpdate`,\n `isDelete`,\n `isActive`,\n `isApproved`,\n `isReview`,\n `isPost`,\n `executeBy`,\n `executeTime`\n \t\t\t ) VALUES (\n \t\t\t '\" . $this->getCompanyId() . \"',\n \t\t\t '\" . $this->getFastBusinessPartnerCategory() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n\t\t\t\t'\" . $businessPartnerCompany . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\n\t\t\t\t 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n '\" . $this->getStaffId() . \"',\n \" . $this->getExecuteTime() . \"\n\t\t\t )\n\t\t\t\";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n\t\t\tINSERT INTO [businessPartner]\n\t\t\t (\n [companyId],\n [businessPartnerCategoryId],\n [businessPartnerOfficeCountryId],\n [businessPartnerOfficeStateId],\n [businessPartnerOfficeCityId],\n [businessPartnerShippingCountryId],\n [businessPartnerShippingStateId],\n [businessPartnerShippingCityId],\n [businessPartnerCompany],\n [businessPartnerOfficeAddress],\n [businessPartnerShippingAddress],\n [isDefault],\n [isNew],\n [isDraft],\n [isUpdate],\n [isDelete],\n [isActive],\n [isApproved],\n [isReview],\n [isPost],\n [executeBy],\n [executeTime]\n \t\t\t ) VALUES (\n \t\t\t '\" . $this->getCompanyId() . \"',\n \t\t\t '\" . $this->getFastBusinessPartnerCategory() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n\t\t\t\t'\" . $businessPartnerCompany . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\n\t\t\t\t 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n '\" . $this->getStaffId() . \"',\n \" . $this->getExecuteTime() . \"\n\t\t\t )\n\t\t\t\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n\t\t\tINSERT INTO BUSINESSPARTNER\n\t\t\t (\n COMPANYID,\n BUSINESSPARTNERCATEGORYID,\n BUSINESSPARTNEROFFICECOUNTRYID,\n BUSINESSPARTNEROFFICESTATEID,\n BUSINESSPARTNEROFFICECITYID,\n BUSINESSPARTNERSHIPPINGCOUNTRYID,\n BUSINESSPARTNERSHIPPINGSTATEID,\n BUSINESSPARTNERSHIPPINGCITYID,\n BUSINESSPARTNERCOMPANY,\n BUSINESSPARTNEROFFICEADDRESS,\n BUSINESSPARTNERSHIPPINGADDRESS,\n ISDEFAULT,\n ISNEW,\n ISDRAFT,\n ISUPDATE,\n ISDELETE,\n ISACTIVE,\n ISAPPROVED,\n ISREVIEW,\n ISPOST,\n EXECUTEBY,\n EXECUTETIME\n \t\t\t ) VALUES (\n \t\t\t '\" . $this->getCompanyId() . \"',\n \t\t\t '\" . $this->getFastBusinessPartnerCategory() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n \t\t\t '\" . $this->getBusinessPartnerShippingCountryDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingStateDefaultValue() . \"',\n \t\t\t '\" . $this->getBusinessPartnerShippingCityDefaultValue() . \"',\n\n\t\t\t\t'\" . $businessPartnerCompany . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\t\t\t\t'\" . $businessPartnerAddress . \"',\n\n\t\t\t\t 0,\n 1,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n '\" . $this->getStaffId() . \"',\n \" . $this->getExecuteTime() . \"\n\t\t\t )\n\t\t\t\";\n }\n\n try {\n $this->q->create($sql);\n } catch (\\Exception $e) {\n header('Content-Type:application/json; charset=utf-8');\n $this->q->rollback();\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n $businessPartnerId = $this->q->lastInsertId('businessPartner');\n $this->q->commit();\n $end = microtime(true);\n $time = $end - $start;\n echo json_encode(\n array(\n \"success\" => true,\n \"message\" => $this->t['newRecordTextLabel'],\n \"staffName\" => $_SESSION['staffName'],\n \"executeTime\" => date('d-m-Y H:i:s'),\n \"businessPartnerId\" => $businessPartnerId,\n \"time\" => $time\n )\n );\n exit();\n }", "public function create_contracts_for_one_legal_client()\n {\n $client_id = factory(Legal::class, 'active')->create()->client_id;\n factory(Contract::class, 'in_progress_legal', 2)->create(['client_id' => $client_id]);\n factory(Contract::class, 'finished_legal', 2)->create(['client_id' => $client_id]);\n }", "public function test_2_1()\n {\n global $Address;\n\n // setup\n $out = SetupTestData::hasmany_save_2();\n\n $address = $Address->create([\n 'line1' => 'line1_4',\n 'zipcode' => '44444',\n 'state' => 'MN'\n ]);\n\n $out['person']->add_to_addresses($address);\n\n $out['person']->save();\n\n\n // tests\n $this->assert($address->id !== NULL, 'New object id is set');\n\n $this->assert($out['person']->size_addresses() === 4, 'Has many has 4 objects');\n\n foreach ($out['person']->get_addresses() as $i => $address)\n {\n $this->assert($address->zipcode === str_repeat(($i+1).'', 5), 'Address zipcode correct');\n }\n }", "public function create(Business $business)\n {\n //\n }", "public function orderBonusBudget()\n {\n return $this->belongsTo('App\\Models\\Ad3d\\OrderBonusBudget\\QcOrderBonusBudget', 'bonus_id', 'bonus_id');\n }", "public function company(){\n return $this->hasOne(Company::class,\"id\",\"company_id\");\n }", "function createCompany() {\n\t\t\t\t\t$addForm = new h2o('views/addCompany.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "function addCompany() {\n\t\t\t\t\tPartner::create(array( 'name'\t\t =>\t$_POST['inputName'],\n\t\t\t\t\t\t\t\t\t\t\t'city'\t\t =>\t$_POST['inputCity'],\n\t\t\t\t\t\t\t\t\t\t\t'unix_linux' =>\t$_POST['inputUnixLinux'],\n\t\t\t\t\t\t\t\t\t\t\t'sql'\t\t =>\t$_POST['inputSql'],\n\t\t\t\t\t\t\t\t\t\t\t'git'\t\t =>\t$_POST['inputGit'],\n\t\t\t\t\t\t\t\t\t\t\t'wordpress'\t =>\t$_POST['inputWordpress'],\n\t\t\t\t\t\t\t\t\t\t\t'drupal'\t =>\t$_POST['inputDrupal'],\n\t\t\t\t\t\t\t\t\t\t\t'python'\t =>\t$_POST['inputPython'],\n\t\t\t\t\t\t\t\t\t\t\t'svn'\t\t =>\t$_POST['inputSVN'],\n\t\t\t\t\t\t\t\t\t\t\t'objective_c' =>\t$_POST['inputObjectiveC'],\n\t\t\t\t\t\t\t\t\t\t\t'ruby_rails' =>\t$_POST['inputRuby'],\n\t\t\t\t\t\t\t\t\t\t\t'c_plusplus' =>\t$_POST['inputCPlusPlus'],\n\t\t\t\t\t\t\t\t\t\t\t'dot_net'\t =>\t$_POST['inputNet'],\n\t\t\t\t\t\t\t\t\t\t\t'php'\t\t =>\t$_POST['inputPHP'],\n\t\t\t\t\t\t\t\t\t\t\t'html_css'\t =>\t$_POST['inputHtmlCss'],\n\t\t\t\t\t\t\t\t\t\t\t'java'\t\t =>\t$_POST['inputJava'],\n\t\t\t\t\t\t\t\t\t\t\t'javascript' =>\t$_POST['inputJavascript'],\n\t\t\t\t\t\t\t\t\t\t\t'comments'\t =>\t$_POST['inputComments'])\n\t\t\t\t\t);\n\n\t\t\t\t\t$success = new h2o('views/happySuccess.html');\n\t\t\t\t\techo $success->render();\n\t\t\t\t}", "public function relation(string $source, string $target): ISchemaBuilder;", "public function createCostEstimate($request)\n {\n\n $user_id = $request->get('user_id');\n\n $vehicle_id = $request->get('vehicle_id',null);\n\n $location = $request->get('location',null);\n\n $city = $request->get('city',null);\n\n /** get array of object services & supplies */\n $item = $request->input('joborder_service_supplies');\n\n /** get array of user id techinician */\n $technician_id = $request->input('technician_id');\n\n\n DB::beginTransaction();\n\n /**\n * Get users\n */\n $user = $this->user\n ->addWith(['information.enterprise.vehicles','vehicles'])\n ->firstOrfail($user_id);\n\n try{\n /**\n * Create Bookings\n */\n $data = [\n 'vehicle_id' => $vehicle_id,\n 'address' => $request->get('address',''),\n 'concern' => $request->get('concern',''),\n 'concern_type' => $request->get('concern_type',null),\n 'date' => $request->get('date',null),\n 'time' => $request->get('time',null),\n 'status' => $request->get('status','pending'),\n 'booked_by' => $this->authUser->user_type\n ];\n\n /**\n * Consumer type Request\n */\n if($user->user_type === 'consumer')\n {\n $data['user_id'] = $user->id;\n $data['location'] = $location;\n $data['city'] = $city;\n }\n\n /**\n * Enterprise Type Request\n */\n if($user->user_type === 'enterprise')\n {\n $data['user_id'] = $user->id;\n $data['enterprise_id'] = $user->information->enterprise_id;\n }\n\n /** booking created */\n $booking = $this->booking->create($data);\n\n /**\n * Create Joborders\n */\n $data = [\n 'requested_at' => $request->get('requested_at',null),\n 'concern' => $request->get('concern',null),\n 'assessment' => $request->get('assessment',null),\n 'solution' => $request->get('solution',null),\n 'vehicle_id' => $vehicle_id,\n 'status' => $request->get('status','pending'),\n 'user_id' => $user->id,\n 'concern_type' => $request->get('concern_type',null),\n 'schedule' => $request->get('schedule',null),\n 'location' => $request->get('location',null),\n 'city' => $city,\n 'booking_id' => $booking->id,\n 'total' => $request->get('total',null)\n ];\n\n /**\n * Enterprise Type Request\n */\n if($user->user_type === 'enterprise')\n {\n $data['enterprise_id'] = $user->information->enterprise_id;\n }\n\n $joborder = $this->joborder->create($data);\n\n $joborder->load(['user.information.enterprise']);\n\n /**\n * Create Joborder Code\n */\n $this->joborder->update(['id' => $joborder->id],[\n 'code' => sprintf('%04d',$joborder->id),\n ]);\n\n\n /**\n * Send Message\n */\n $threadId = md5($joborder->user_id);\n if($joborder->user->information->enterprise_id !== null){\n $threadId = md5('enterprise-'.$joborder->user->information->enterprise->id);\n }\n\n $data = [\n 'thread_id' => $threadId,\n 'user_id' => $this->authUser->id,\n 'chat' => 'Joborder Created #' . $joborder->joborder_id . $joborder->code,\n 'is_read' => 'sent',\n 'joborder_id' => $joborder->id,\n ];\n\n $chatCreated = $this->message->create($data);\n\n $chatCreated->load(['joborder']);\n\n /**\n * Broadcast Messages\n */\n broadcast(new ChatMessages($chatCreated))->toOthers();\n\n /**\n * Update Booking status\n */\n if($request->has('booking_id') === TRUE)\n {\n $this->booking->update(['id' => $booking->id],[\n 'status' => $request->get('status','pending')\n ]);\n }\n\n /**\n * Save Service And Supplies\n */\n foreach ($item as $key => $value)\n {\n $value['joborder_id'] = $joborder->id;\n $this->joborderItem->create((array)$value);\n }\n\n /**\n * Save Data in Pivot\n */\n $joborder->users()->attach($technician_id);\n\n }catch(Exception $e){\n DB::rollback();\n\n return $this->response('error',[ $e->getMessage() ],Code::HTTP_BAD_REQUEST);\n }\n DB::commit();\n\n /**\n * Send SNS Notification\n */\n if($user->user_type === 'admin'){\n\n /**\n * Get All Users of Thread Id\n */\n $participant = $this->message->addWhere(['thread_id' => $chatCreated->thread_id])->addGroupBy('user_id')->fetch(FALSE,TRUE,FALSE);\n\n\n foreach ($participant as $key => $value){\n\n /**\n * Get All Devices of Users\n */\n $device = clone $this->device;\n $usersDevice = $device->addWhere(['user_id' => $value['user_id']])->fetch(FALSE,TRUE,FALSE);\n\n /**\n * Send Notif To ALl Mobile\n */\n if(count($usersDevice) !== 0){\n\n foreach ($usersDevice as $key => $value){\n\n Notification::sendToArn($chatCreated->chat,$value,['data' => $chatCreated],'mycasa_message');\n }\n }\n }\n }\n\n $joborder = $this->joborder->firstOrFail($joborder->id);\n\n return $this->response('success',$joborder,Code::HTTP_CREATED);\n\n }", "public function addNewPersonToCity()\n {\n }", "public function addAddress($address);", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "protected function create(array $data)\n {\n \n Company::create([\n 'business_name' => $data['business_name'],\n 'website' => $data['website'],\n 'type' => $data['type'],\n 'status' => $data['status'],\n 'brands_of_interest' => is_array($data['brands_of_interest'])? implode(', ', $data['brands_of_interest']) : $data['brands_of_interest'],\n 'contact_me_via' => $data['contact_me_via'],\n 'how_heard_about' => $data['how_heard_about'],\n ]);\n \n Address::create([\n 'address_line_1' => $data['address_line_1'],\n 'address_line_2' => $data['address_line_2'],\n 'city' => $data['city'],\n 'state' => $data['state'],\n 'zip_code' => $data['zip_code'],\n 'type' => 'office'\n ]);\n\n BusinessContact::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'title' => $data['title'],\n ]);\n\n // PhoneNumber::create([\n // 'primary_phone' => $data['primary_phone'],\n // 'secondary_phone' => $data['secondary_phone'],\n // ]);\n\n PhoneNumber::create([\n 'primary_phone' => $data['contact_primary_phone'],\n 'secondary_phone' => $data['contact_secondary_phone'],\n ]);\n\n return User::create([\n 'role' => 'pending',\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n\n \n }", "public function store($budget)\n\t{\n\t\t$b = new Budget();\n\t\tif($b->validate($budget))\n\t\t{\n\t\t\tBudget::create([\n\t\t\t\t'tag_id'\t=> $budget->tag_id,\n\t\t\t\t'amount'\t=> $budget->amount\n\t\t\t]);\n\t\t}\n\t}", "function register_aliment_brand_relationship() {\n\t\\IA\\One_To_Many_Post_Relationship::register_relationship( 'ia_aliment_brand', 'company', 'post' );\n}", "public function create()\n {\n //create new Cmp_No\n $Cmp_No = 0;\n if(count(MainCompany::all()) == 0){\n $Cmp_No = 1;\n }\n else{\n $last_cmp = MainCompany::orderBy('Cmp_No', 'desc')->first();\n if($last_cmp == null){\n $Cmp_No = 1;\n }\n else{\n $Cmp_No = $last_cmp->Cmp_No + 1;\n }\n }\n\n $company = MainCompany::findOrFail(MainCompany::create([\n 'Cmp_NmAr' => '',\n ])->ID_No);\n\n if (!empty($company)){\n $company->Cmp_No = $Cmp_No;\n $company->save();\n }\n return redirect(aurl('companies/' . $company->ID_No . '/edit'));\n }", "public function actionCreate()\n {\n $model = new BranchOfCompany();\n $company = ParentCompany::getList();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// print_r($model);die;\n $this->redirect(Yii::$app->request->referrer);\n // return $this->redirect(['index']);\n// return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'company' => $company,\n ]);\n }\n }", "public function company()\n {\n return $this->hasOne('App\\Company', 'ID', 'CompanyID')->with('Country');\n }", "function createNewBilltoAccount($companyname\n , $contactname\n , $contactemail\n , $contactnumber\n , $address\n , $cfg_country_sdesc\n , $cfg_region_sdesc\n , $city)\n {\n $this->gdlog()->LogInfoStartFUNCTION(\"createNewBilltoAccount\");\n $fr = \"UNKNOWN_ERROR\";\n $this->cleanAllOutputData();\n \n $gdfab = new gdFindAccountingBillto();\n $fr = $gdfab->findAcountingBillto_bySdesc($companyname);\n if($fr == \"RECORD_IS_NOT_FOUND\")\n {\n $gdfab->countAcountingBilltos();\n $count = $gdfab->getRecordCount();\n \n $invoicenumberprefix = 9000 + (100 * (1 + $count));\n $timesheetnumberprefix = 9000 + (100 * (2 + $count));\n \n \n $gdcab = new gdCreateAccountingBillto();\n $fr = $gdcab->createRecordBilltoAccount($companyname\n , $contactname\n , $contactemail\n , $contactnumber\n , $address\n , $cfg_country_sdesc\n , $cfg_region_sdesc\n , $city\n , $invoicenumberprefix\n , $timesheetnumberprefix);\n if($fr == \"RECORD_IS_CREATED\")\n {\n $fr = $this->gdlog()->LogInfoRETURN(\"DATA_IS_CREATED\");\n }\n else\n {\n $fr = $this->gdlog()->LogInfoRETURN(\"DATA_IS_NOT_CREATED\");\n }\n }\n else\n {\n $fr = $this->gdlog()->LogInfoRETURN(\"ACCOUNT_ALREADY_EXISTS\");\n }\n $this->gdlog()->LogInfoEndFUNCTION(\"createNewBilltoAccount\");\n return $fr;\n }", "public function __construct(Company $company)\n {\n $this->companies= $company;\n\n }", "public function company()\n {\n \treturn $this->belongsTo(Company::class, 'company_id');\n }", "public function addAddress($refId, $name, $link, $type, $confidentiality, $description)\n {\n\n $orm = $this->getOrm();\n\n $storageNode = $orm->newEntity(\"WbfsysFileAddress\");\n $storageNode->name = $name;\n $storageNode->link = $link;\n $storageNode->id_type = $type;\n $storageNode->id_confidentiality = $confidentiality;\n $storageNode->description = $description;\n $storageNode = $orm->insert($storageNode);\n\n\n $refNode = $orm->newEntity(\"WbfsysEntityFileAddress\");\n $refNode->vid = $refId;\n $refNode->id_storage = $storageNode;\n\n $refNode = $orm->insert($refNode);\n\n return $storageNode;\n\n }", "public function create()\n {\n $definition = $this->definition->toArray();\n\n if (! isset($definition[$this->type]) || empty($definition[$this->type])) {\n return;\n }\n\n foreach (range(1, $definition[$this->type]['scale'] ?? 1) as $index) {\n $this->relation()->create(\n $this->baseAttributes($index, $definition[$this->type]) +\n $this->attributes($definition)\n );\n }\n }", "public function createTable()\n {\n $table = self::$table_name;\n $table_contact = FRAMEWORK_TABLE_PREFIX.'contact_contact';\n $table_country = FRAMEWORK_TABLE_PREFIX.'contact_country';\n $table_address_type = FRAMEWORK_TABLE_PREFIX.'contact_address_type';\n\n $foreign_key_1 = self::$table_name.'_ibfk_1';\n $foreign_key_2 = self::$table_name.'_ibfk_2';\n $foreign_key_3 = self::$table_name.'_ibfk_3';\n $foreign_key_4 = self::$table_name.'_ibfk_4';\n\n $SQL = <<<EOD\n CREATE TABLE IF NOT EXISTS `$table` (\n `address_id` INT(11) NOT NULL AUTO_INCREMENT,\n `contact_id` INT(11) NOT NULL DEFAULT '-1',\n `address_type` VARCHAR(32) NOT NULL DEFAULT 'PRIMARY',\n `address_identifier` VARCHAR(64) NOT NULL DEFAULT '',\n `address_description` TEXT NOT NULL,\n `address_street` VARCHAR(128) NOT NULL DEFAULT '',\n `address_appendix_1` VARCHAR(128) NOT NULL DEFAULT '',\n `address_appendix_2` VARCHAR(128) NOT NULL DEFAULT '',\n `address_zip` VARCHAR(32) NOT NULL DEFAULT '',\n `address_city` VARCHAR(128) NOT NULL DEFAULT '',\n `address_area` VARCHAR(128) NOT NULL DEFAULT '',\n `address_state` VARCHAR(128) NOT NULL DEFAULT '',\n `address_country_code` VARCHAR(8) NOT NULL DEFAULT '',\n `address_status` ENUM('ACTIVE', 'LOCKED', 'DELETED') NOT NULL DEFAULT 'ACTIVE',\n `address_timestamp` TIMESTAMP,\n PRIMARY KEY (`address_id`),\n INDEX `contact_id` (`contact_id` ASC) ,\n INDEX `country_code_idx` (`address_country_code` ASC) ,\n INDEX `address_type_idx` (`address_type` ASC) ,\n CONSTRAINT\n FOREIGN KEY (`contact_id` )\n REFERENCES `$table_contact` (`contact_id` )\n ON DELETE CASCADE,\n CONSTRAINT\n FOREIGN KEY (`address_country_code` )\n REFERENCES `$table_country` (`country_code` )\n ON UPDATE CASCADE,\n CONSTRAINT\n FOREIGN KEY (`address_type` )\n REFERENCES `$table_address_type` (`address_type_name` )\n ON UPDATE CASCADE\n )\n COMMENT='The contact address table'\n ENGINE=InnoDB\n AUTO_INCREMENT=1\n DEFAULT CHARSET=utf8\n COLLATE='utf8_general_ci'\nEOD;\n try {\n $this->app['db']->query($SQL);\n $this->app['monolog']->addInfo(\"Created table 'contact_address'\", array(__METHOD__, __LINE__));\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "function create_address($patient_id, $tag, $bldg, $street, $brgy, $city, $prov, $zip, $ctry) {\n\n $data = array(\n 'patient_id' => $patient_id,\n 'tag' => $tag,\n 'building' => $bldg,\n 'street' => $street,\n 'barangay' => $brgy,\n 'city' => $city,\n 'province' => $prov,\n 'zip' => $zip,\n 'country' => $ctry\n );\n\n return $this->db->insert('patients_address', $data);\n\n }", "public function wp_varejoecom_shipping_company_table() : void\n {\n global $wpdb;\n require_once(ABSPATH. 'wp-admin/includes/upgrade.php');\n\n $tableName = $wpdb->prefix . $this->table_name;\n $charset_collate = $wpdb->get_charset_collate();\n\n $sql = \"CREATE TABLE $tableName(\n id INT AUTO_INCREMENT PRIMARY KEY,\n identifier INT NOT NULL,\n name VARCHAR(255) NOT NULL,\n cnpj VARCHAR(20) NOT NULL,\n status VARCHAR(100) NOT NULL\n )$charset_collate;\n \";\n maybe_create_table($tableName, $sql);\n }", "public function company(){\n return $this->belongsTo('\\App\\Company');\n }", "public function company(){\n return $this->belongsTo(Company::class);\n }", "public function initialize()\n {\n $this->belongsTo('company_id', 'Baka\\Auth\\Models\\Companies', 'id', ['alias' => 'company']);\n }", "public function store(Request $request)\n {\n // dd($request);\n $this->validate($request, [\n 'item.*' => 'required|string',\n 'item_description.*' => 'nullable|string',\n \n \n ]);\n \n \n $item = $request->item;\n $desc = $request->description;\n $priority = $request->priorities;\n $budgetid = $request->budget;\n $username = auth()->user()->name;\n $Amount = $request->Amount;\n $i=0;\n $tot = 0;\n\n foreach ($priority as $pr){\n $tot = $tot + $pr ;\n } \n // dd($item);\n try{\n foreach ($item as $it) {\n $itemAmount = ($priority[$i]/$tot)*$Amount;\n $BudgetDetails = [\n 'budget_id' => $budgetid,\n 'item' => $it,\n 'itemAmount'=>$itemAmount,\n 'item_description' => $desc[$i],\n 'priority' => $priority[$i],\n ];\n BudgetDet::create($BudgetDetails);\n $i++;\n }\n \n $BudgetInfo = [\n 'budget_id' => $budgetid,\n 'username' => $username,\n 'Amount'=>$Amount,\n ];\n\n Budget::insert($BudgetInfo);\n\n return back()->with('success', \"Budget Generated!\");\n }\n catch(\\Exception $e){\n // dd($e);\n $error_mssg = $e->getMessage(); \n dd($error_mssg); \n return back()->with('error', \"Something went wrong... unable to setup budget plan\");\n }\n }", "public function create(array $data)\n {\n $this->company->fill($data);\n $this->company->save();\n return $this->company;\n }", "public function agencyBranch()\n {\n return $this->hasOne('App\\AgencyBranch');\n }", "public function setCompany($company_nid);", "public function company(){\n\n return $this->belongsTo('App\\Company');\n \n }", "public function create(Request $request)\n { \n $v = Validator::make($request->all(), [\n 'email' => 'required|email|unique:companies',\n 'responsavel' => 'required',\n 'empresa' => 'required',\n ]);\n if ($v->fails())\n {\n return response()->json([\n 'status' => 'error',\n 'errors' => $v->errors()\n ], 422);\n }\n\n $company = Company::create([\n 'empresa' => $request['empresa'],\n 'email' => $request['email'],\n 'setor' => $request['setor'],\n 'responsavel' => $request['responsavel'],\n 'whats' => $request['whats'],\n 'horas' => $request['horas'],\n 'url_hospedagem' => $request['url_hospedagem'],\n 'user_hospedagem' => $request['user_hospedagem'],\n 'pw_hospedagem' => $request['pw_hospedagem'],\n 'url_googleads' => $request['url_googleads'],\n 'user_googleads' => $request['user_googleads'],\n 'pw_googleads' => $request['pw_googleads'],\n 'url_linkedin' => $request['url_linkedin'],\n 'user_linkedin' => $request['user_linkedin'],\n 'pw_linkedin' => $request['pw_linkedin'],\n 'url_twitter' => $request['url_twitter'],\n 'user_twitter' => $request['user_twitter'],\n 'pw_twitter' => $request['pw_twitter'],\n 'url_youtube' => $request['url_youtube'],\n 'user_youtube' => $request['user_youtube'],\n 'pw_youtube' => $request['pw_youtube'],\n 'url_facebook' => $request['url_facebook'],\n 'user_facebook' => $request['user_facebook'],\n 'pw_facebook' => $request['pw_facebook'],\n 'url_instagram' => $request['url_instagram'],\n 'user_instagram' => $request['user_instagram'],\n 'pw_instagram' => $request['pw_instagram'],\n 'margem' => $request['margem'],\n 'faturamento' => $request['faturamento'],\n 'clientes' => $request['clientes'],\n 'fans_face' => $request['fans_face'],\n 'seguidores_insta' => $request['seguidores_insta'],\n 'inscritos' => $request['inscritos'],\n 'contatos' => $request['contatos'], \n 'seguidores_twitter' => $request['seguidores_twitter'],\n 'obs' => $request['obs']\n ]);\n\n $company->save();\n\n return response()->json($company, 201);\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "public function createBusiness($companyInfo) {\n \n $data = json_decode(json_encode($companyInfo), FALSE);\n\n $connection = Configuration::openConnection();\n $statement = $connection->prepare(\"INSERT INTO businesses (`name`, `station`, `streetAddress`, `city`, `state`, `zipcode`, `phone`, `url`, `services`, `type`) VALUES (:name, :station, :streetAddress, :city, :state, :zipcode, :phone, :url, :services, :type)\");\n\n $statement->bindParam(\":name\", $data->businessName);\n $statement->bindParam(\":station\", $data->station);\n $statement->bindParam(\":streetAddress\", $data->streetAddress);\n $statement->bindParam(\":city\", $data->city);\n $statement->bindParam(\":state\", $data->states);\n $statement->bindParam(\":zipcode\", $data->zipcode);\n $statement->bindParam(\":phone\", $data->phone);\n $statement->bindParam(\":url\", $data->url);\n $statement->bindParam(\":services\", $data->services);\n $statement->bindParam(\":type\", $data->departmentType);\n\n return json_encode($statement->execute(), JSON_PRETTY_PRINT);\n }", "public function budgets() : HasMany\n {\n return $this->hasMany('App\\Budget');\n }", "public function company()\n {\n return $this->belongsTo(Company::class, 'project_company_id');\n }", "public function createNew($bankID,$amount,$description, $cardTypeID)\n {\n //create new fee object and save in DB\n //Reload Object >> $this->loadFeeByID(_fee.ID);\n }", "public function AddCompany(ICompany $ICompany, ICompanyContact $IContact);", "function createNewScheme($name,$balance_sheet_id, $scheme_type, $scheme_group, $acc_type, $other_values=array(),$form=null,$on_date=null){\n\t\t\n\t\t$this['name'] = $name;\n\t\t$this['balance_sheet_id'] = $balance_sheet_id;\n\t\t$this['SchemeType'] = $scheme_type;\n\t\t$this['SchemeGroup'] = $scheme_group;\n\t\t$this['type'] = $acc_type;\n\n\t\tunset($other_values['name']);\n\t\tunset($other_values['balance_sheet_id']);\n\t\tunset($other_values['SchemeType']);\n\t\tunset($other_values['SchemeGroup']);\n\t\tunset($other_values['type']);\n\n\t\tforeach ($other_values as $field => $value) {\n\t\t\t$this[$field] = $value;\n\t\t}\n\n\t\t$this->save();\n\n\t\t// TODO - Create Default Accounts for this Scheme for all Branches\n\t\t// Foreach Branch Foreach $this->getDefaultAccounts ...\n\t\t$all_branches = $this->add('Model_Branch');\n\t\tforeach ($all_branches as $branch_array) {\n\t\t\t$this->createDefaultAccounts($all_branches);\n\t\t}\n\t}", "public function company()\n {\n return $this->belongsTo(\\Fleetbase\\Models\\Company::class);\n }", "public function create_unsigned_contract()\n {\n $contract_id = factory(Contract::class, 'testing_unsigned_legal')->create([\n 'value' => $value = self::$faker->numberBetween(5000, 100000),\n 'start_date' => '',\n 'end_date' => '',\n 'participants' => $participants = rand(12, 20),\n 'payments' => $payments = rand(0, 12),\n 'client_id' => $client_id = factory(Legal::class, 'accept_meeting')->create()->client_id\n ])->id;\n for ($i = 1; $i <= $participants; $i++) {\n $participant_id = factory(Participant::class)->create()->id;\n factory(ContractParticipant::class)->create([\n 'contract_id' => $contract_id,\n 'participant_id' => $participant_id\n ]);\n }\n for ($i = 1; $i <= $payments; $i++) {\n $payment_id = factory(Payment::class)->create([\n 'value_euro' => $value_euro = round($value/$payments),\n 'pay_date' => date('Y-m-d', strtotime(\"+\".$i.\" month\")),\n 'contract_id' => $contract_id\n ])->id;\n factory(Invoice::class)->create([\n 'value_euro' => $value_euro,\n 'paid_date' => date('Y-m-d', strtotime(\"+\".$i.\" month\")),\n 'payment_id' => $payment_id,\n 'contract_id' => $contract_id,\n 'client_id' => $client_id\n ]);\n }\n }", "public function company()\n {\n return $this->belongsTo('\\App\\Company', 'id_company');\n }", "public function newPaymentAddress() {\n $result = $this->newAPIRequest('POST', '/addresses', []);\n return $result;\n }", "public function company()\n {\n return $this->belongsTo('App\\Models\\Company');\n }", "public function company()\n {\n return $this->belongsTo('App\\Models\\Company');\n }", "public function __construct($company) {\n $this->company = $company;\n }", "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "public function link($from,$to)\n {\n //\n $relation = new Relation;\n\t$relation->from = $from;\n $relation->to = $to;\n\t$relation->save();\n\t\n }", "function tripal_stock_chado_contact_relationship_schema() {\n $description = array();\n\n $description['foreign keys']['cvterm'] = array(\n 'table' => 'cvterm',\n 'columns' => array(\n 'type_id' => 'cvterm_id',\n ),\n );\n\n $description['foreign keys']['contact'] = array(\n 'table' => 'contact',\n 'columns' => array(\n 'subject_id' => 'contact_id',\n 'object_id' => 'contact_id',\n ),\n );\n \n return $description;\n}", "public function createBudget($user_id, $name) {\n\t\t$budget = new Budget();\n\t\t$dbh = Database::getPdo();\n\t\t\ttry {\n\t\t\t\t$created = date(\"Y-m-d H:i:s\");\n\t\t\t\t$sql = \"INSERT INTO \" . self::DB_TABLE . \" (user_id, name, created) VALUES (:user_id, :name, :created)\";\n\t\t\t\t$stmt = $dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(':user_id', $user_id, PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(':name', $name, PDO::PARAM_STR,45);\n\t\t\t\t$stmt->bindParam(':created', $created);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$return = $stmt->rowCount();\n\t\t\t\tif ($return == 1) {\n\t\t\t\t\theader('Location:/dashboard');\n\t\t\t\t} elseif ($return != 1) {\n\t\t\t\t\techo 'Could not create budget.';\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (PDOException $e) {\n\t\t\t\techo 'Unable to create budget: ' . $e->getMessage();\n\t\t\t}\n\t\t}", "public function store(BudgetCreateRequest $request)\n {\n\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE);\n $data = $request->all();\n if ($data['observation'] == null) {\n $data['observation'] = \"Sem Observaçõds\";\n }\n\n $budget = $this->getRepository()->create($data);\n\n $response = [\n 'message' => 'Orçamento de carro! Cadastrada com sucesso!',\n 'data' => $budget->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->route('budgets.index')->with('message', $response['message']);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->route('budget.index')->withErrors($e->getMessageBag())->withInput();\n }\n }", "public function breakdown(): CostBreakdownContract;", "public function add(Request $request)\n {\n $error = \"\";\n $company;\n $potential = new Potential;\n //first create company\n $companyData = $request->input('company');\n try{\n $company = $this->companyBuilder->build($companyData);\n }\n catch(\\Exception $e){\n $error = $e->getMessage();\n return $this->setStatusCode(500)->respondWithError($error);\n }\n\n //store other into table\n $potential->company_id = $company['id'];\n $potential->user_id = $user = $request->input('user.id');\n $potential->status = $request->input('status');\n $potential->source = $request->input('source');\n if($potential->save())\n {\n return $this->respondCreated('Potential successfully created!');\n }\n\n\n }", "public function company()\n {\n return $this->belongsTo('App\\CompanyDetail', 'company_detail_id');\n }", "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "public function create()\n\t{\n\t\tif (auth()->user()->can(\"company.create\")){\n\t\t\t$data = new Companies;\n\t\t\t$data->COMPANY_TYPE = \"B\";\n\t\t\treturn response()->view('companies.form', [\"data\" => $data,\n\t\t\t\t\t\t\t\t\t\t \"action\" => 'add']);\n\t\t}\n\t\telse {\t\t\t\n\t\t\treturn response(\"\", 403);\n\t\t}\n\t}", "public function create( Request $request)\n {\n $documentTypes = \\App\\Models\\Person::getDocumentTypes();\n $ivaConditions = \\App\\Models\\IvaCondition::all();\n $personTypes = \\App\\Models\\PersonType::all();\n\n $iibbObligations = [1=>'NO', 'SICOL', 'ARBA', 'CONVENIO MULTILATERAL'];\n $priorityOrder = [1=>'Alta', 'Media', 'Baja'];\n $otherTaxes = [ 1=>'SICORE', 'SEGURIDAD E HIGIENE', 'SECRETARIA DE ENERGIA'];\n\n $months = [\n 1=>'Enero', 2=>'Febrero', 3=>'Marzo', 4=>'Abril', 5=>'Mayo', 6=>'Junio',\n 7=>'Julio', 8=>'Agosto', 9=>'Septiembre', 10=>'Octubre', 11=>'Noviembre',\n 12=>'Diciembre',\n ];\n\n //para definirlo bien en la vista, ya que tengo 1 en el que suma todo\n $iibbCalculates = [ 2=>'ASIGNACION DIRECTA', 1=>'CONVENIO MULTILATERAL'];\n\n $business = $businessConfiguration = $businessActivities = [];\n $businessLiquidators = $businessZones = $businessPayMethods = [];\n $inA = $inZ = $inL = $inPM = [];\n if($request->route('id')){\n $business = Person::find($request->route('id'));\n //dd($business);\n $businessConfiguration = $business->configuration[0];\n\n $businessActivities = $business->activities();\n $businessLiquidators = $business->liquidators();\n $businessZones = $business->zones2();\n $businessPayMethods = $business->payMethods();\n $inA = $businessActivities->pluck('activity_id');\n $inZ = $businessZones->pluck('zone_id');\n $inL = $businessLiquidators->pluck('liquidator_id');\n $inPM = $businessPayMethods->pluck('pay_method_id');\n }\n\n $activities = \\App\\Models\\Activity::whereNotIn('id', $inA)\n ->orderBy('name', 'asc')->get();\n $zones = \\App\\Models\\Zone::whereNotIn('id', $inZ)\n ->orderBy('name', 'asc')->get();\n $payMethods = \\App\\Models\\PayMethod::whereNotIn('id', $inPM)\n ->orderBy('description', 'asc')->get();\n $liquidators = \\App\\Models\\Liquidator::whereNotIn('id', $inL)\n ->orderBy('name', 'asc')->get();\n\n\n return view('business.form', compact(['documentTypes', 'ivaConditions',\n 'iibbObligations', 'otherTaxes', 'activities', 'businessActivities',\n 'personTypes', 'zones', 'businessZones', 'months', 'iibbCalculates',\n 'businessLiquidators', 'payMethods', 'businessPayMethods',\n 'liquidators', 'business', 'businessConfiguration', 'priorityOrder']));\n }", "public function __construct($company)\n {\n $this->company = $company;\n }", "public function address()\n {\n return $this->belongsTo('App\\Address');\n }", "public function company()\n {\n return $this->belongsTo('Company');\n }", "public function create()\n {\n //\n $startDate = Input::get('start_date');\n $endDate = Input::get('end_date');\n $holidays = Holiday::where('holiday_type', 'holiday')->lists('holiday');\n $bridges = Holiday::where('holiday_type', 'bridge')->lists('holiday');\n\n /* \n * Mantendo as linhas abaixo como referência\n */\n\n // echo 'Data de início: ' . date('d-m-Y', strtotime($startDate)) . \"<br>\";\n // echo 'Um dia pra frente: ' . date('d-m-Y', strtotime('+1 day', strtotime($startDate))) . \"<br>\";\n // echo 'Uma semana pra frente: ' . date('d-m-Y', strtotime('+1 week', strtotime($startDate))) . \"<br>\";\n // echo 'Um mês pra frente: ' . date('d-m-Y', strtotime('+1 month', strtotime($startDate))) . \"<br>\";\n\n /*echo 'sábados: ' . Input::get('saturdays') . '<br>';\n echo 'domingos: ' . Input::get('sundays') . '<br>';\n echo 'feriados: ' . Input::get('holidays') . '<br>';\n echo 'dias ponte: ' . Input::get('bridges') . '<br>';*/\n\n while (strtotime($startDate) <= strtotime($endDate)) {\n\n $allocation = new Allocation();\n $allocation->service_order_id = Input::get('service_order_id');\n $allocation->workforce_id = Input::get('workforce_id');\n $allocation->service_id = Input::get('service_id');\n $allocation->function = Input::get('function');\n // Carbon::createFromFormat('d/m/Y', Input::get('holiday'));\n $allocation->date = Carbon::createFromFormat('Y-m-d', $startDate);\n $allocation->start_time = Input::get('start_time');\n $allocation->end_time = Input::get('end_time');\n\n switch (true) {\n \n // Dia de semana E não feriado E não ponte\n case ((date('N', strtotime($startDate)) < 6) \n && (array_search(date('Y-m-d', strtotime($startDate)), $holidays->toArray()) === FALSE) \n && (array_search(date('Y-m-d', strtotime($startDate)), $bridges->toArray()) === FALSE)):\n // echo 'dia de semana, não feriado e não ponte <br>';\n \n $allocation->save();\n break;\n\n // Sábado com opção selecionada\n case ((date('D', strtotime($startDate)) === 'Sat') && (Input::get('saturdays'))):\n // echo 'sabado válido' . '<br>';\n $allocation->save();\n break;\n\n // Domingo com opção selecionada\n case ((date('D', strtotime($startDate)) == \"Sun\") && (Input::get('sundays'))):\n // echo 'domingo válido' . '<br>';\n $allocation->save();\n break;\n\n // feriado DURANTE A SEMANA com a opção selecionada\n case ((array_search(date('Y-m-d', strtotime($startDate)), $holidays->toArray()) !== FALSE)\n && (date('N', strtotime($startDate)) < 6)\n && (Input::get('holidays'))):\n // echo 'feriado válido' . '<br>';\n $allocation->save();\n break;\n\n // // dia-ponte DURANTE A SEMANA com a opção selecionada\n case ((array_search(date('Y-m-d', strtotime($startDate)), $bridges->toArray()) !== FALSE)\n && (date('N', strtotime($startDate)) < 6)\n && (Input::get('bridges'))):\n // echo 'ponte válido' . '<br>';\n $allocation->save();\n break;\n\n }\n\n $startDate = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($startDate)));\n }\n\n // echo $daysAllocated . ' dias alocados';\n echo 'Finalizado';\n }", "public function save_address(CreateAddressRequest $request)\n {\n $address = Auth::guard('customer')->user()->addresses()->create($request->all());\n\n return redirect()->to(url()->previous().'?address='.$address->id.'#address-tab')->with('success', trans('theme.notify.address_created'));\n }", "public function store(CompanyRequest $request)\n {\n $this->checkPermission('create-company');\n \n // dd($request->all(), $request->image);\n $section = $this->section;\n if( $request->hasFile('image') ){\n $getimageName = time().rand(1000,9999).'.'.$request->image->getClientOriginalExtension();\n $request->image->move(storage_path('uploads'), $getimageName);\n $request->request->add(['picture' => $getimageName]);\n }\n if( !$request->picture )\n $request->request->add(['status' => null]);\n \n $request->request->add(['contract_start' => $request->contract_start_submit, 'contract_end' => $request->contract_end_submit]);\n // $request->contract_end = $request->contract_end_submit;\n // dd($request->all());\n \n $company = $this->model::create($request->all());\n\n \n \n if($request->companyContacts){\n $company->companyContacts()->createMany($request->companyContacts);\n }\n\n $company->addresses()->createMany($request->addresses);\n\n $company->shifts()->createMany($this->parsedShifts($request->shifts));\n\n $request->session()->flash('alert-success', 'Record has been added successfully.');\n return response(['status' => true, 'redirect' => route($section->slug.'.index')]);\n // return redirect()->route($section->slug.'.index');\n }", "public function createEntity()\n {\n $createdCompany = new Company();\n $createdCompany->setTitle('Test Company')\n ->setIco('11025848744')\n ->setDic('1258745968444')\n ->setStreet('Cesta 125')\n ->setZip('021478')\n ->setCity('Bratislava')\n ->setCountry('Slovenska Republika');\n\n $this->em->persist($createdCompany);\n $this->em->flush();\n\n return $createdCompany;\n }" ]
[ "0.61961305", "0.60261124", "0.60261124", "0.5287633", "0.52579874", "0.52542186", "0.52376825", "0.5194721", "0.5189669", "0.516622", "0.5157176", "0.5145248", "0.5108045", "0.5095742", "0.50937575", "0.5079618", "0.50751615", "0.50725883", "0.50587296", "0.5056986", "0.5056983", "0.5048484", "0.5047747", "0.50413024", "0.50172937", "0.5016237", "0.5009635", "0.5005395", "0.49812022", "0.49760148", "0.49723834", "0.49521846", "0.49420536", "0.49386638", "0.49198395", "0.49192575", "0.49191797", "0.49116972", "0.4907887", "0.49063352", "0.49010894", "0.49007368", "0.48976862", "0.48924452", "0.48923695", "0.48871425", "0.48866934", "0.48822033", "0.4866462", "0.48541832", "0.48538038", "0.48382464", "0.48321047", "0.48317355", "0.48305163", "0.48283923", "0.48192343", "0.48191005", "0.4802493", "0.4795257", "0.4795257", "0.4795257", "0.4795257", "0.4795257", "0.4795257", "0.479522", "0.47948825", "0.47854012", "0.47823837", "0.47795975", "0.47788346", "0.4778351", "0.4777761", "0.47651267", "0.4763479", "0.47618377", "0.47618377", "0.47567075", "0.47543487", "0.47531095", "0.47531095", "0.47531095", "0.47531095", "0.47531095", "0.47501507", "0.47396407", "0.4738998", "0.4738111", "0.47379178", "0.47337586", "0.47317928", "0.47266486", "0.47230154", "0.47206295", "0.47162265", "0.47130093", "0.47126076", "0.47071818", "0.4704743", "0.47042277", "0.4701625" ]
0.0
-1
return all admins of this company
public function getAdmins() { $a = new SplObjectStorage(); $admins = $this->getTable()->getAdmins(); foreach ($admins as $admin) { try { $customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId()); $a->attach($customer); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } } return $a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_admins();", "public static function admins()\n {\n return User::all()->where('idpapel', 1)->where('stusuario', 'ati')->toArray();\n }", "public function getAdmins()\n {\n $query = $this->newQuery();\n $query->where('admin', true);\n\n return $this->doQuery($query, false, false);\n }", "public static function getAllAdmins()\n\t{\n\t\t$admins = self::where('users_role',UserRole::ADMIN_ROLE_ID)->get();\n\t\treturn $admins;\n\t}", "function findAllAdministrators() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM admins;'));\r\n\r\n\t}", "public function admins()\n {\n return $this->newQuery('getUsers', ['type' => 'AdminUsers']);\n }", "public function findAllAdmin() {\n\t\t\t$result = $this->createQuery()->execute();\n\t\t\treturn $result;\n\t\t}", "public function admins()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_ADMIN)->get();\n }", "static function getAllAdmin()\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('SELECT * FROM admin a, partners p WHERE a.idPart=p._idPart');\n $req->execute(array());\n return $req->fetchAll();\n }", "public function getAdmins()\n {\n $admins = Admin::all();\n return view('view_admins', compact('admins'));\n }", "public function getAdmins()\n {\n $role = Role::where('name', 'admin')->first();\n return $role->users;\n }", "public function getAdmins()\n\t{\n\t\t$query = <<<QUERY\nSELECT\n\t*\nFROM\n\tplayer\nWHERE\n\trole LIKE '%admin%'\nQUERY;\n\n\t\treturn $this->database->query( $query, 'Get admins from player table' );\n\t}", "function find_all_admins() {\r\n\t\tglobal $db;\r\n\t\t\r\n\t\t$query = \"SELECT * \";\r\n\t\t$query .= \"FROM admins \";\r\n\t\t$query .= \"ORDER BY username ASC\";\r\n\t\t$admins_set = mysqli_query($db, $query);\r\n\t\tconfirm_query($db);\r\n\t\treturn $admins_set;\r\n\t}", "public function admins()\n {\n return $this->belongsToMany(Config::get('guardian.admin_user'), Config::get('guardian.role_admin_user_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.admin_user_foreign_key'));\n }", "function find_all_admins() {\n\t\tglobal $connection;\n\n\t\t$query = \"SELECT * FROM admins ORDER BY username ASC\";\n\t\t$admin_list = mysqli_query($connection, $query);\n\t\tconfirm_query($admin_list);\n\t\treturn $admin_list;\n\t}", "public function index()\n {\n return Admins::all();\n }", "public static function getAdminsList()\n {\n $data_to_load = [];\n if(DatabaseManager::fetchInto(\"main\", $data_to_load, \"SELECT * FROM `admin_users`\") === false)\n Status::message(Status::ERROR, \"Couldn't retrieve `admin_users` from DB\");\n \n Status::message(Status::SUCCESS, $data_to_load);\n }", "function getAdminList() {\n $dbConnect = getDbConnection();\n\n $query = 'SELECT * FROM admins';\n $statement = $dbConnect->prepare($query);\n\n $statement->execute();\n $resultSet = $statement->get_result();\n\n $statement->close();\n $dbConnect->close();\n\n return $resultSet;\n }", "public function indexAdmin ()\n {\n $listOfUsers = $this->userRequest->usersIndexForAdmin();\n return $listOfUsers;\n }", "public function &getListaAdmins() {\n $admins = array();\n $query = \"select * from admins\";\n \n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[getListaAdmins] impossibile inizializzare il database\");\n $mysqli->close();\n return $admins;\n }\n $result = $mysqli->query($query);\n if ($mysqli->errno > 0) {\n error_log(\"[getListaAdmins] impossibile eseguire la query\");\n $mysqli->close();\n return $admins;\n }\n\n while ($row = $result->fetch_array()) {\n $admins[] = self::creaAdminDaArray($row);\n }\n\n $mysqli->close();\n return $admins;\n }", "public function admins() {\n $data = array();\n // verify user has priviledges\n if($this->User->isLoggedIn() && $this->User->isAdmin()) {\n $flash = null;\n \n if (isset($_POST['delete_admin'])) {\n if ($this->User->removeAdminRights($_POST['user_id'])) {\n $flash = \"Admin user removed\";\n }\n }\n \n if (isset($_POST['email'])) {\n $user_id = $this->User->getByEmail($_POST['email']);\n if(isset($user_id['id'])) {\n if($this->User->bestowAdminRights($user_id['id'])) {\n $flash = \"{$_POST['email']} added as an admin.\";\n }\n }\n }\n \n // fetch admin users\n $users = $this->User->getAdmins();\n \n //set the title\n $data = array(\n 'users' => $users,\n 'flash' => $flash,\n 'title' => 'Manage Admin Users'\n );\n \n } else {\n header(\"Location: \".app::site_url(array('users','login')));\n exit(0);\n }\n return $data;\n }", "public function getWebsitesAdmin()\n {\n $res = $this->searchAdmin();\n if ($res) {\n array_push($this->site_ids, array('access' => 'admin', 'ids' => array()));\n if ($res['count'] > 0) {\n foreach ($res as $r) {\n if (is_array($r)) {\n array_push($site_ids[1]['ids'], $this->getSiteId($r[strtolower($this->to_get_admin)][0]));\n }\n }\n }\n }\n }", "private function get_siteadmins() {\n global $DB;\n $sql = \"SELECT rgt.userid, rgt.gmail\n FROM mdl_repository_gdrive_tokens rgt\n JOIN mdl_config cfg\n ON cfg.name = 'siteadmins'\n WHERE find_in_set(rgt.userid, cfg.value) > 0;\";\n $siteadmins = $DB->get_records_sql($sql);\n return $siteadmins;\n }", "private function get_admins_info() {\n $stm=$this->uSup->get_com_admins_to_notify_about_requests(\"user_id\",$this->company_id);\n\n $q_user_id=\"(1=0 \";\n /** @noinspection PhpUndefinedMethodInspection */\n while($admin=$stm->fetch(PDO::FETCH_OBJ)) {\n $q_user_id.=\" OR u235_users.user_id='\".$admin->user_id.\"' \";\n }\n $q_user_id.=\")\";\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uAuth\")->prepare(\"SELECT DISTINCT\n firstname,\n secondname,\n email\n FROM\n u235_users\n JOIN \n u235_usersinfo\n ON\n u235_users.user_id=u235_usersinfo.user_id AND\n u235_usersinfo.status=u235_users.status\n WHERE\n \" .$q_user_id. \" AND \n u235_users.status='active' AND\n u235_usersinfo.site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n return $stm;\n }", "function adminUserList()\n {\n $arrClms = array(\n 'pkAdminID',\n 'AdminUserName',\n 'AdminCountry',\n 'AdminRegion'\n );\n $varWhr = \"AdminType = 'user-admin'\";\n $varOrderBy = 'AdminUserName ASC ';\n $arrRes = $this->select(TABLE_ADMIN, $arrClms, $varWhr);\n //pre($arrRes);\n return $arrRes;\n }", "function get_super_admins()\n {\n }", "public function getProjectAdminList() {\n\t\treturn $this->getProjectDao()->getProjectAdminList();\n\t}", "public function admins()\n {\n return $this->hasMany(\\App\\User::class, 'partner_user', 'partner_id', 'user_id');\n }", "public function getPlatformAdmins()\n {\n return $this->repository->createQueryBuilder('u')\n ->where('u.roles LIKE :role_super_admin')\n ->orWhere('u.roles LIKE :role_admin')\n ->setParameters(['role_super_admin' => '%ROLE_SUPER_ADMIN%', 'role_admin' => '%ROLE_ADMIN%'])\n ->getQuery()\n ->getResult();\n }", "public static function get_admin_users(){\n \n global $db;\n \n $query = \"SELECT * FROM users \";\n $query .= \"WHERE user_role = 'admin'\";\n \n $result = User::makeQuery($query);\n \n return $result;\n }", "public function all()\n {\n if (!$this->isLogged())\n {\n header('Location: ' . ROOT_URL);\n exit; \n }\n else{\n\n $this->oUtil->oAdd_Admins = $this->oModel->getAll();\n\n $this->oUtil->getView('admin');\n }\n }", "public function getAdmins() {\n $sql = 'SELECT id, mail, firstname, role FROM user WHERE isAdmin=1 ORDER BY role DESC';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }", "public function getProgramAdmins()\n {\n return $this->repository->createQueryBuilder('u')\n ->select('u.id')\n ->addSelect('u.uuid')\n ->addSelect('CONCAT(u.firstName, \\' \\', u.lastName) AS fullName')\n ->addSelect('u.jobTitle')\n ->addSelect('u.modified')\n ->where('u.roles LIKE :roles')\n ->setParameter('roles', '%ROLE_PROGRAMME_ADMIN%')\n ->andWhere('u.enabled = true')\n ->getQuery()\n ->getResult();\n }", "public function getAdministrator() {\n\n return database::getInstance()->select('staff',\"*\");\n\n\n }", "function getAdministrators() {\n\t\tif (is_null($this->admin_users)) {\n\t\t\t$this->admin_users = array();\n\t\t\t$sql = 'SELECT * FROM '.prefix('administrators').' ORDER BY `rights` DESC, `id`';\n\t\t\t$admins = query_full_array($sql, true);\n\t\t\tif ($admins !== false) {\n\t\t\t\tforeach($admins as $user) {\n\t\t\t\t\tif (array_key_exists('password', $user)) { // transition code!\n\t\t\t\t\t\t$user['pass'] = $user['password'];\n\t\t\t\t\t\tunset($user['password']);\n\t\t\t\t\t}\n\t\t\t\t\tif (!array_key_exists('valid', $user)) { // transition code!\n\t\t\t\t\t\t$user['valid'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->admin_users[$user['id']] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->admin_users;\n\t}", "public function getAdminListForCustomers()\r\n {\r\n return $this->getAdminList(\"customer-lookup\");\r\n }", "public function showAdmins() { \n\t\n return View('admin.admins');\n\t\t\t\n }", "public function all()\n {\n $admins = User::all();\n return view('admin.index')->with('admins', $admins);\n }", "function getAllAdmins(){\n $sql = self::$connection->prepare(\"SELECT * FROM `user` WHERE role_id = 1\");\n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n return $items; //return an array\n }", "public function existingAdminList()\n {\n $groceries = $this->getList();\n return $this->renderExistingAdminList($groceries);\n }", "public function getUsers()\n\t{\n\t\t$sql = 'SELECT * FROM admins WHERE deleted = 0';\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute();\n\t\treturn $query->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function index()\n {\n return view('admins', ['admins' => User::all()]);\n }", "public function allAdminList(){\n $result = $this->adminModel->getAllAdmin();\n foreach ($result as $row){\n $data[] = array('AdminID'=>$row->adminID,'Email'=>$row->email,'role'=>$row->type,\n );\n }\n $this->view('admins/allAdminList',$data);\n\n }", "public function admin_list()\n {\n //Display Admin Login Form\n $all_admin_lists = DB::table('admins')\n ->get();\n return view('admin.customer.admin_list',compact('all_admin_lists'));\n }", "public function adminAll(){\n $orders = order::with('user')->withTrashed()->get();\n return view('Admin.Orders.all',compact('orders'));\n }", "function getAllAdmins(){\n $sql = \"SELECT * FROM admin\";\n return getALl($sql);\n}", "public function admins()\n {\n return $this->belongsToMany(User::class, 'port_user', 'port_id', 'user_id');\n }", "public function getAdmins($options = [])\n {\n return $this->client->get(\"admins\", $options);\n }", "public static function getAdminList()\n {\n \t$type = \"text/html\";\n \t$terms = array(\n \t\t\t'isapproved' => 1\n \t);\n \t$data = self::getListByFilter($terms);\n \n \treturn response()->view('adminlist', [ 'data' => $data, 'isadmin' => self::isAdmin()])->header('Content-Type', $type);\n }", "public function selectAllAdmin(){\n return $this->connect->getData(\"SELECT * FROM `tbl_admin`\");\n }", "public function get_list_admin()\n {\n $this->db->where('type', 1);\n $query = $this->db->get('user');\n return $query->result();\n }", "public function index() {\n\n\t\t$admins = Merchant::with(['type', 'governorate'])->where('market_id', Session::get('market_id'))->latest()->paginate(10);\n\t\treturn view('merchants.admins.index', compact('admins'));\n\n\t}", "public function get_mail_administrators(){\n $query = $this->db->select('n_mail_user')\n ->from('user')\n ->where('n_role_user', 'administrador')\n ->where('n_mail_user !=', null) \n ->get();\n\n return $query->result();\n }", "public function getAdminLinks()\n {\n return $this->adminLinks;\n }", "function get_admin_list()\r\n {\r\n $result = array();\r\n $this->db->select('login');\r\n $this->db->distinct();\r\n $this->db->order_by('login');\r\n $query = $this->db->get(db_prefix.'Admins');\r\n $result[] = 'UNDEFINED';\r\n foreach ($query->result_array() as $row)\r\n {\r\n $result[] = $row['login'];\r\n }\r\n return $result;\r\n }", "public static function getAdmin() {\n\t\t$conn = Connection::get ();\n\t\t\n\t\t$select = $conn->query ( \"SELECT id_admin, identifiant_admin, mdp_admin, nom_admin, prenom_admin FROM admin\" );\n\t\t$result = array ();\n\t\t\n\t\twhile ( $row = $select->fetch () ) {\n\t\t\t$result [] = $row;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function managementAdminAll(){\n $Admins = new \\Project\\Models\\ManagementAdminManager();\n $allAdmin = $Admins->allManagementAdmin();\n\n require 'app/views/back/managementAdmin.php';\n }", "public static function getAdmins($where = null, $order = null, $limit = null){\n return (new Database('admin'))->select($where, $order, $limit)\n ->fetchAll(PDO::FETCH_CLASS,\\App\\Models\\AdminModel::class);\n }", "public function getCompanyWithUsers();", "public function listarAdmin()\n {\n $sql = \"SELECT US.nombre,CO.problema,CO.tipo_problema,CO.solucion, CO.modo_contacto, CO.tipo_estado \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado = 'Ejecutado'\";\n return ejecutarConsulta($sql);\n\n }", "public function getAdministrator() {}", "public function index()\n {\n $admins = Admin::get();\n return view('admin.admins.list',compact('admins'));\n }", "public function readAdmins(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from admin');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "function afficherAdmins(){\n\t\t$sql=\"SElECT * From administrateur\";\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 }\n\t}", "public function ObtenerRolesSupeAdmin()\r\n {\r\n return Rol::all();\r\n }", "public function index()\n {\n $this->allowedAdminAction();\n\n return $this->showAll(Organizador::all());\n }", "public function getAllRobotsAdmin(){\n\t\t$url = WEBSERVICE. \"robots/getAllRobotsAdmin\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $arrayResponse;\n\t}", "public static function getAdministrators()\n\t{\n\t\t$users = [];\n\t\tif (Main\\Loader::includeModule('bitrix24'))\n\t\t{\n\t\t\t$users = \\CBitrix24::getAllAdminId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res = \\CAllGroup::GetGroupUserEx(1);\n\t\t\twhile ($row = $res->fetch())\n\t\t\t{\n\t\t\t\t$users[] = (int)$row[\"USER_ID\"];\n\t\t\t}\n\t\t}\n\n\t\treturn $users;\n\t}", "public function getAdmin() {\n $sql = \"SELECT *\n FROM {$this->tablename} p\n WHERE p.status='admin'\";\n return $this->db->query($sql)->single($this->entity);\n }", "function getAdminList() {\n $sql = \"SELECT a.*,\n IFNULL(c.building_name,'-') AS building_name,\n IFNULL(b.building_id,'0') AS building_id\n FROM admin a\n LEFT JOIN admin_building b ON a.id = b.admin_id \n LEFT JOIN building c ON c.id = b.building_id\n WHERE a.id != 1\";\n return getAll($sql);\n}", "public static function getOfficesWithAdmin(){\n $offices = self::all();\n if(count($offices) > 0 ){\n foreach($offices as $office){\n $where = ['unit_id'=>$office->id,'role'=>3];\n $office->head = TermRelation::findMyAdmin($where);\n $office->office_name = $office->unit_name;\n }\n }\n return $offices;\n }", "public function adminUsers()\n {\n $adminSettings = DB::table('settings')->get();\n $adminUsers = DB::table('users');\n $adminAdmins = DB::table('admins');\n\n return view('admin.users')->with([\n 'settings' => $adminSettings,\n 'adminUsers' => $adminUsers,\n 'adminAdmins' => $adminAdmins,\n ]);\n }", "public function getAll()\n {\n return Admin::paginate($this->pagination);\n }", "public function fetchAllAdmin()\n {\n $stmt = $this->connection->pdo\n ->prepare(Finder::getSql(\"SELECT * FROM app_rooms\"));\n $stmt->execute();\n\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n yield Rooms::arrayToEntity($row, new Rooms());\n }\n }", "function get_administrators(EntityManager $em)\n{\n // to perform DB queries\n return $em->createQueryBuilder()\n ->select('u')\n ->from('User', 'u')\n ->where('u.admin = 1')\n ->getQuery()->getArrayResult();\n}", "public function allAdmin()\n {\n $user = auth()->user();\n\n $productos = Venta::where('estado', 1)->get();\n\n $arrProductos = array();\n foreach ($productos as $producto) {\n $arrProductos[] = array(\n $producto->nombre,\n ($producto->estado) ? 'Activo' : 'Inactivo',\n $producto->id,\n );\n }\n\n $response = array('draw' => 1, 'recordsTotal' => count($arrProductos), 'recordsFiltered' => count($arrProductos), 'data' => $arrProductos);\n\n return response()->json($response, 200);\n }", "public function activeConfirmedAdmins()\n {\n return $this->newQuery('getUsers', ['type' => 'ActiveConfirmedAdmins']);\n }", "public function index()\n {\n if (is_null($this->user) || !$this->user->can('admin.view')) {\n abort(403, 'You are Unauthorized !');\n }\n $admins = Admin::all();\n return view('backend.pages.admins.index', compact('admins'));\n }", "public function getRelationshipAdmins()\n {\n return $this->repository->createQueryBuilder('u')\n ->select('u.id')\n ->addSelect('u.uuid')\n ->addSelect('CONCAT(u.firstName, \\' \\', u.lastName) AS fullName')\n ->addSelect('u.jobTitle')\n ->addSelect('u.modified')\n ->where('u.roles LIKE :roles')\n ->setParameter('roles', '%ROLE_RELATIONSHIP_MANAGER%')\n ->andWhere('u.enabled = true')\n ->getQuery()\n ->getResult();\n }", "public function mainAction() {\n return array(\n 'admins' => $this->get('snowcap_admin')->getAdmins(),\n );\n }", "public function admin() {\n return $this->teachers()->where('role', '=', User::SCHOOL_ADMIN)->first();\n }", "public static function list_of_admins($showUnselectedOption = false)\n {\n //start array\n $array = [];\n if ($showUnselectedOption) {\n $array[0] = _t('Member.SELECT_ECOMMERCE_ADMIN', ' --- SELECT ADMIN ---');\n }\n //get customer group\n $group = self::get_admin_group();\n //fill array\n if ($group) {\n $members = $group->Members();\n $membersCount = $members->count();\n if ($membersCount > 0) {\n foreach ($members as $member) {\n if ($member->Email) {\n $array[$member->ID] = $member->Email . ' (' . $member->getTitle() . ')';\n }\n }\n }\n }\n $group = DataObject::get_one(\n Group::class,\n ['Code' => 'administrators']\n );\n //fill array\n if ($group) {\n $members = $group->Members();\n $membersCount = $members->count();\n if ($membersCount > 0) {\n foreach ($members as $member) {\n if ($member->Email) {\n $array[$member->ID] = $member->Email . ' (' . $member->getTitle() . ')';\n }\n }\n }\n }\n //sort in a natural order\n natcasesort($array);\n\n return $array;\n }", "public function cargarAdministradores()\n\t{\n\t\t$usuarios = $this->usuarioRepo->buscarAdministradores();\n\t\t\n\t\treturn \\View::make('modulos.administracion.listaadmins', \n\t\t\t\t\t\t\tcompact('usuarios')\n\t\t\t\t);\n\t}", "public function getAllCurationModerators()\n {\n // get all users that are admin\n $userModel = MidasLoader::loadModel('User');\n $adminDaos = $userModel->findBy('admin', '1');\n\n $moderators = array();\n foreach ($adminDaos as $admin) {\n $moderators[$admin->getUserId()] = $admin;\n }\n\n // combine with all admins with those that are moderators\n $curationModeratorDaos = $this->getAll();\n foreach ($curationModeratorDaos as $curationModerator) {\n $moderatorUser = $curationModerator->getUser();\n $moderators[$moderatorUser->getUserId()] = $moderatorUser;\n }\n\n return $moderators;\n }", "public function action_index()\n\t{\n\t\tif ( ! Auth::instance()->logged_in('admin'))\n\t\t\tthrow new HTTP_Exception_403();\n\t\t\n\t\t// show admin page\n\t\t$companies = ORM::factory('company')->find_all();\n\t\t$this->template->content = View::factory('admin/admin')->bind('companies', $companies);\n\t\t\n\t}", "public static function getAdministateurs()\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_UTIL_TYPE);\r\n \r\n // Ajout des variables\r\n $requete->bindParam(':type', self::$TYPE_ADMIN, \\PDO::PARAM_STR);\r\n \r\n // Exécute la requête\r\n $requete->execute();\r\n \r\n // Sauvegarde les lignes retournées.\r\n $adminBD = $requete->fetchAll();\r\n \r\n // Créé la liste des départements.\r\n for ($i = 0; $i < count($adminBD); $i ++) {\r\n $admins[$i] = new Utilisateur($adminBD[$i]->login, $adminBD[$i]->mdp, $adminBD[$i]->email, $adminBD[$i]->type, $adminBD[$i]->idAvatar, $adminBD[$i]->idLangue);\r\n }\r\n \r\n // Retourne la listes des départements.\r\n return isset($admins) ? $admins : null;\r\n }", "public function getAdminLevels(): AdminLevelCollection;", "public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}", "public function admin()\n {\n $users = User::all();\n return view('admin.users.list')->with('users', $users);\n }", "public function index() {\n $data['admins'] = Admin::get();\n return view('admin.admins.index')->with($data);\n }", "public function index()\n {\n $admins = Admin::paginate(5);\n return AdminResourceCollection::collection($admins);\n }", "public function ApproverMembers() {\n\t\tif ($this->owner->CanApproveType == 'OnlyTheseUsers') {\n\t\t\t$groups = $this->owner->ApproverGroups();\n\t\t\t$members = new DataObjectSet();\n\t\t\tif($groups) foreach($groups as $group) {\n\t\t\t\t$members->merge($group->Members());\n\t\t\t}\n\t\t\t\n\t\t\t// Default to ADMINs, if something goes wrong\n\t\t\tif(!$members->Count()) {\n\t\t\t\t$group = Permission::get_groups_by_permission('ADMIN')->first();\n\t\t\t\t$members = $group->Members();\n\t\t\t}\n\t\t\t\n\t\t\treturn $members;\n\t\t} elseif($this->owner->CanApproveType == 'LoggedInUsers') {\n\t\t\treturn Permission::get_members_by_permission('CMS_ACCESS_CMSMain');\n\t\t} else {\n\t\t\t$group = Permission::get_groups_by_permission('ADMIN')->first();\n\t\t\treturn $group->Members();\n\t\t}\n\t}", "function get_all_faculty_admins()\n {\n return $this->db->get('faculty_admins')->result_array();\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function list()\n {\n $admins = Admin::all();\n $html = view('partials.table-tbody.table-admin', compact('admins'))->render();\n\n return response()->json(['html' => $html], 200);\n }", "public function index()\n {\n //\n $admins = Admin::all();\n return view ('theme.admin.admin_manager')->with(['admins'=>$admins]);\n }", "public function getAllTeamsAdmin() {\n\t\t$url = WEBSERVICE. \"teams/getAllTeamsAdmin\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $arrayResponse;\n\t}", "public function getMenuItems()\n {\n return $this->adminMenu->all();\n }", "public function admin() {\n\t\tif (!isset($this->sets['admin'])) {\n\t\t\t$this->sets['admin'] = new CMS_Navigation3_LinkSet();\n\t\t}\n\t\tCMS_Admin::build_embedded_admin_menu($this->sets['admin']);\n\t\treturn $this->sets['admin'];\n\t}", "public static function getAll() {\n global $lC_Database, $lC_Language, $_module;\n\n $lC_Language->loadIniFile('administrators.php');\n \n $media = $_GET['media'];\n \n /* Filtering */\n $aWhere = \"\";\n if ($_GET['aSearch'] != \"\") {\n $aWhere = \"where id = '\" . (int)$_GET['aSearch'] . \"'\";\n } \n\n $Qadmins = $lC_Database->query('select * from :table_administrators ' . $aWhere . ' order by user_name');\n $Qadmins->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $Qadmins->execute();\n\n $result = array('entries' => array());\n $result = array('aaData' => array());\n $cnt = 0;\n while ( $Qadmins->next() ) {\n $group = self::getGroupName($Qadmins->valueInt('access_group_id')) ;\n $color = ($odd == $cnt%2) ? 'purple-bg' : 'green-bg';\n if ($Qadmins->valueInt('access_group_id') == 1) $color = 'red-bg';\n\n $last = '<td>' . $Qadmins->valueProtected('last_name') . '</td>';\n $first = '<td>' . $Qadmins->valueProtected('first_name') . '</td>';\n $user = '<td>' . $Qadmins->valueProtected('user_name') . '</td>';\n $group = '<td><small class=\"tag ' . $color . '\">' . self::getGroupName($Qadmins->valueInt('access_group_id')) . '</small></td>';\n $action = '<td class=\"align-right vertical-center\"><span class=\"button-group compact\">\n <a href=\"' . ((int)($_SESSION['admin']['access'][$_module] < 3) ? '#' : 'javascript://\" onclick=\"editAdmin(\\'' . $Qadmins->valueInt('id') . '\\')') . '\" class=\"button icon-pencil ' . ((int)($_SESSION['admin']['access'][$_module] < 3) ? 'disabled' : NULL) . '\">' . (($media === 'mobile-portrait' || $media === 'mobile-landscape') ? NULL : $lC_Language->get('icon_edit')) . '</a>\n <a href=\"' . ((int)($_SESSION['admin']['access'][$_module] < 4) ? '#' : 'javascript://\" onclick=\"deleteAdmin(\\'' . $Qadmins->valueInt('id') . '\\', \\'' . urlencode($Qadmins->valueProtected('user_name')) . '\\')') . '\" class=\"button icon-trash with-tooltip ' . ((int)($_SESSION['admin']['access'][$_module] < 4) ? 'disabled' : NULL) . '\" title=\"' . $lC_Language->get('icon_delete') . '\"></a></span></td>';\n\n $result['aaData'][] = array(\"$last\", \"$first\", \"$user\", \"$group\", \"$action\");\n $result['entries'][] = $Qadmins->toArray();\n $cnt++;\n }\n $Qadmins->freeResult();\n\n return $result;\n }" ]
[ "0.77995116", "0.771568", "0.76979196", "0.76258594", "0.7536488", "0.74002284", "0.7244273", "0.72357184", "0.7123914", "0.70668447", "0.70222193", "0.70147294", "0.7008521", "0.6975748", "0.69615585", "0.69482386", "0.69318366", "0.69177365", "0.6878754", "0.68160784", "0.6813556", "0.67553765", "0.668204", "0.66749626", "0.6667275", "0.666597", "0.66650504", "0.6645494", "0.6643664", "0.66328865", "0.6603078", "0.65783834", "0.65700406", "0.65520275", "0.6549507", "0.6534125", "0.6527757", "0.6512838", "0.6457562", "0.6445285", "0.64427924", "0.6415335", "0.6412065", "0.63803476", "0.6369018", "0.6353841", "0.63113457", "0.6309884", "0.6305356", "0.6282473", "0.6236338", "0.6229139", "0.6225111", "0.6214534", "0.61887956", "0.6180128", "0.61799026", "0.6160615", "0.61602145", "0.6157936", "0.61523473", "0.61444235", "0.6143699", "0.6138663", "0.6124778", "0.61072963", "0.6073367", "0.6066808", "0.6061137", "0.60533124", "0.60513324", "0.6043167", "0.6038451", "0.601823", "0.6012904", "0.60128474", "0.60070556", "0.59962696", "0.5987728", "0.598702", "0.5984612", "0.59739417", "0.5964502", "0.5960835", "0.5954559", "0.5937134", "0.5930434", "0.5917017", "0.5916729", "0.591294", "0.59125483", "0.5908119", "0.5889417", "0.58887357", "0.5878164", "0.58722", "0.58704823", "0.586608", "0.58545256", "0.58432686" ]
0.7827995
0
returns all addresses of this company as RowSet
public function getAddresses() { $table = new Yourdelivery_Model_DbTable_Locations(); return $table->fetchAll('companyId = ' . $this->getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findAll()\n {\n return $this->em->getRepository(Address::class)->findAll();\n }", "public function getCompanyAddresses(Company $company)\n {\n $builder = $company->addresses()->getQuery();\n\n $resource = $this->datatable->setQueryBuilder($builder);\n\n return $resource->getResponse();\n }", "public function addresses()\n {\n return $this->morphMany(config('contactable.models.address', Address::class), 'addressable')\n ->orderBy('position', 'asc');\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function get_addresses() {\n\t\treturn $this->addresses;\n\t}", "private function getAddresses()\n\t{\n\t\t\n\t\t$userID = $this->session->userID;\n\t\t$addresses = $this->dbConnection->prepareRecordSet(\"SELECT * FROM b_user_address WHERE user_id = ? AND record_status = 'A'\", $userID);\n\n\t\treturn $addresses;\n\t\t\n\t}", "private function getAddresses()\n {\n $doctrine = $this->getDoctrine();\n\n /** @var \\Doctrine\\ORM\\QueryBuilder $qb */\n $qb = $doctrine\n ->getRepository('BadcowAddressBundle:BaseAddress')\n ->createQueryBuilder('a');\n\n $qb->add('where', $qb->expr()->orX(\n $qb->expr()->isNull('a.latitude'),\n $qb->expr()->isNull('a.longitude')\n ));\n\n return $qb->getQuery()->getResult();\n }", "public function addresses()\n {\n return $this->hasMany('App\\Address')->where('is_editable', '=', true);\n }", "public function addresses() {\n return $this->hasMany(Models\\Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(\"FJR\\models\\AddressModel\", \"customer_id\");\n }", "private function _getAddresses()\n\t {\n\t\t$hashes = [];\n\t\t$rows = $this->_db->exec(\"SELECT `city`, `address` FROM `addresses` WHERE `phone` = '\" . $this->phone . \"'\");\n\t\twhile($row = $rows->getRow())\n\t\t {\n\t\t\t$address = $row[\"city\"] . \", \" . $row[\"address\"];\n\t\t\t$sliced = new AddressSlicer($address);\n\n\t\t\tif ($sliced->valid() === true && isset($hashes[$sliced->hash]) === false)\n\t\t\t {\n\t\t\t\t$hashes[$sliced->hash] = $address;\n\t\t\t } //end if\n\n\t\t } //end while\n\n\t\treturn count($hashes);\n\t }", "public function addresses()\n {\n return $this->hasMany('App\\Models\\Address', 'organization_id');\n }", "public function getContactAddresses()\n {\n return clone $this->contactAddresses;\n }", "public function getAddress() {\n\t\t//return $this->findParentRow(new Model_DbTable_Address());\n\t\tif ($this->_address) { } else {\n\t\t\tforeach ($this->_rowset->getLoadRows(new Model_DbTable_Address(), 'address') as $row) {\n\t\t\t\tif ($row->id == $this->idAddress) {\n\t\t\t\t\t$this->_address = $row;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t }\n\t return $this->_address;\n\t}", "public function getAddresses() {\n\n\t\t$query = \"SELECT id, cap, street, name, city FROM agrishop__addresses WHERE profile_id = ? ;\";\n\n\t\t$options = [ 'types' => ['i'], 'params' => [Session::get('id')] ];\n\n\t\treturn $this->db->directQuery($query, $options) ?: [];\n\n\t}", "function &getAll( )\n {\n $db =& eZDB::globalDatabase();\n $address_array = 0;\n \n $db->array_query( $address_array, \"SELECT * FROM eZAddress_Address\" );\n \n return $address_array;\n }", "public function ShipmentFrom_AddressList() {\n\t\treturn $this->db->get_results(\n\t\t\t\"SELECT * FROM wp_azlabs_address\", \n\t\t\tARRAY_A\n\t\t);\n\t}", "public function getAddresses(){\n\t\t/* DIRECCIONES */\n\t\tglobal $dbh;\n\t\t$data = $dbh->query(\"SELECT * FROM direccion WHERE idCliente=?;\",array($this->id));\n\t\tif( $data!==false ){\n\t\t\tforeach( $data as $k=>$v ){\n\t\t\t\t$zona = $v['idZona'];\n\t\t\t\t$tmp = $dbh->query(\"SELECT c.nombre as comuna, p.nombre as ciudad, r.nombre as region FROM zona c LEFT JOIN zona p ON c.padre=p.id LEFT JOIN zona r ON p.padre=r.id WHERE c.id=?;\",array($zona));\n\t\t\t\t$data[$k] = array_merge($data[$k],$tmp[0]);\n\t\t\t}\n\t\t\t$this->data['direcciones'] = $data;\n\t\t\treturn $data;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getAllRecipientAddresses()\n {\n }", "public function index()\n {\n $result = parent::index();\n $customer = $this->simiObjectManager->get('Magento\\Customer\\Model\\Session')->getCustomer();\n $addresses = $result['addresses'];\n foreach ($addresses as $index => $address) {\n $addressModel = $this->loadAddressWithId($address['entity_id']);\n $addresses[$index] = array_merge($address, $this->simiObjectManager\n ->get('Simi\\Simiconnector\\Helper\\Address')->getAddressDetail($addressModel, $customer));\n }\n $result['addresses'] = $addresses;\n return $result;\n }", "function getAddresses()\r\n\t{\r\n\t\t// connect to the database\r\n\t\t//$this->dbsetup();\r\n\t\t\r\n\t\t$query = \"SELECT address FROM \" . $this->table . \" WHERE latitude = '0' AND longitude = '0'\";\r\n\t\t\r\n\t\t$result = mysql_query($query);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public function getAddressBooks();", "public function addresses()\n {\n return $this->hasMany('App\\Address');\n }", "public function addresses()\n {\n return $this->hasMany(UserAddress::class);\n }", "public function getBillingAddresses()\n {\n return $this->morphMany(Address::class, 'addressable', ['type' => Address::TYPE_BILLING]);\n }", "public function fetchAll(){\n $addresses = $this->addressMapper->fetchAll();\n\n $response = array('data' =>array());\n foreach($addresses as $address){\n $response['data'][] = array(\n $line[] = $address->getNom(),\n $line[] = $address->getDescription(),\n $line[] = $address->getAdresse(),\n $line[] = $address->getUrl(),\n $line[] = '<a href=\"#\" data-id=\"' . $address->getId() . '\" data-action=\"edit\"><i class=\"glyphicon glyphicon-pencil\"></i></a>' .\n ' <a href=\"#\" data-id=\"' . $address->getId() . '\" data-action=\"delete\"><i class=\"glyphicon glyphicon-remove-circle\"></i></a>'\n );\n }\n return json_encode($response); \n }", "public function getFiltersAddresses()\n {\n return $this->hasMany(FilterAddress::className(), ['address_id' => 'id']);\n }", "public function address()\n {\n return $this->hasMany(Address::class, 'u_id', 'u_id')->orderBy('id');\n }", "public function addresses(){\n return $this->entity->shippingAddresses;\n }", "public function findAddresses() : Support\n {\n return $this->model->addresses;\n }", "public function findAddresses() : Support\n {\n return $this->model->addresses;\n }", "public function getAddressesByAccount($account);", "public function index()\n {\n return Address::all();\n }", "public function getToAddresses()\n {\n }", "public function index()\n {\n $query=Address::select()->get();\n return $query;\n }", "public function getAddressCollection(){\n $collection = array();\n $cache_id = 'jeproshop_cart_get_address_collection'.(int)$this->cart_id;\n if (!JeproshopCache::isStored($cache_id)){\n $db = JFactory::getDBO();\n $query = \"SELECT DISTINCT \" . $db->quoteName('address_delivery_id') . \" FROM \" . $db->quoteName('#__jeproshop_cart_product');\n $query .= \" WHERE cart_id = \" . (int)$this->cart_id;\n\n $db->setQuery($query);\n $result = $db->loadObjectList();\n JeproshopCache::store($cache_id, $result);\n }\n $result = JeproshopCache::retrieve($cache_id);\n\n //$result[] = array('address_delivery_id' => (int)$this->address_delivery_id);\n\n foreach ($result as $row)\n if ((int)$row->address_delivery_id != 0)\n $collection[(int)$row->address_delivery_id] = new JeproshopAddressModelAddress((int)$row->address_delivery_id);\n return $collection;\n }", "public function getContacts() {\n $sforce = $this->getDataSource();\n $SOQL = $sforce->getConfigSOQL();\n $resultSet = $this->queryBatch($SOQL);\n \n return $resultSet;\n }", "public function actionAddressListAll() \r\n {\r\n return $this->listing(0, true, Yii::$app->request->get('area_id'));\r\n }", "public function getAll()\r\n {\r\n // Query the database and return an array of contacts\r\n return $this->getEntityManager()\r\n ->createQuery(\r\n 'SELECT c FROM AppBundle:Contact c ORDER BY c.firstName, c.lastName ASC'\r\n )\r\n ->getResult();\r\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function getAllRecipientAddresses()\n {\n return $this->all_recipients;\n }", "public function getAll($person_id){\n $SQL = 'SELECT * FROM address_information JOIN country ON address_information.country_code = country.country_code WHERE person_id=:person_id';\n $STMT = self::$_connection->prepare($SQL);\n $STMT->execute(['person_id'=>$person_id]);\n $STMT->setFetchMode(\\PDO::FETCH_CLASS,'app\\\\models\\\\Address');\n return $STMT->fetchAll();//returns an array of all the records\n }", "public function readAddressBook()\n {\n $addresses = [];\n // read each line of CSV and add rows to addresses array\n // todo\n $handle = fopen($this->filename, \"r\");\n while (!feof($handle)) \n {\n \t$row = fgetcsv($handle);\n \tif (is_array($row)) \n {\n \t\t$addresses[] = $row; // array_push($addresses, $row);\n \t}\n }\n fclose($handle);\n return $addresses;\n }", "public function all_contact_address_info(){\r\n $query = \"SELECT * FROM tbl_contact_us_address\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function getAllStores()\n {\n $sql = \"SELECT s.id, s.name, s.phone_number, s.address_id, a.province, a.city, a.district, a.address1, a.address2, \";\n $sql.= \"a.lat, a.lng FROM store as s, address as a \";\n $sql.= \"WHERE s.address_id=a.id\";\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }", "public function getAll()\r\n {\r\n return $this->contactManager->fetchAll(true, null, null);\r\n }", "public function collectAddressData()\n {\n try {\n $components = collect($this->response->address_components);\n\n $this->address_data = $components->filter(function ($element) {\n $types = collect($element->types);\n\n return $types->search('street_number') !== false ||\n $types->search('route') !== false ||\n $types->search('locality') !== false ||\n $types->search('administrative_area_level_1') !== false || // province, normalement, short et long form\n $types->search('country') !== false ||\n $types->search('postal_code') !== false;\n })->mapWithKeys(function ($item) {\n return [$item->types[0] => $item->long_name];\n });\n } catch (\\Exception $e) {\n $this->address_data = null;\n }\n\n return $this;\n }", "public function getDepositAddresses() {\n return $this->trading([\n 'command' => 'returnDepositAddresses',\n ]);\n }", "public static function data_addresses() {\n\n\t\t$data = array(\n\t\t\tarray(\n\t\t\t\t'address' => '1175 Stony Park Witch Hazel, Nebraska 69258-4226',\n\t\t\t\t'phone' => '(308) 588-6126',\n\t\t\t\t'lat' => '41.4925374',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2854 Burning Pine Route Dog Corner, New Mexico 87313-2329',\n\t\t\t\t'phone' => '(505) 665-5353',\n\t\t\t\t'lat' => '35.76488',\n\t\t\t\t'lng' => '-108.1903059',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4644 Broad Pond Edge Brown Shanty, Colorado 81686-3084',\n\t\t\t\t'phone' => '(303) 410-6031',\n\t\t\t\t'lat' => '39.5500507',\n\t\t\t\t'lng' => '-105.7820674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8711 Fallen By-pass Free, Arkansas 72968-5919',\n\t\t\t\t'phone' => '(479) 272-1089',\n\t\t\t\t'lat' => '35.20105',\n\t\t\t\t'lng' => '-91.8318334',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4987 Merry Fox Falls Speedsville, New Mexico 87609-9834',\n\t\t\t\t'phone' => '(505) 523-5318',\n\t\t\t\t'lat' => '34.5199402',\n\t\t\t\t'lng' => '-105.8700901',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4338 Easy Lagoon Mews Finland, North Dakota 58905-5049',\n\t\t\t\t'phone' => '(701) 474-6073',\n\t\t\t\t'lat' => '47.5514926',\n\t\t\t\t'lng' => '-101.0020119',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9041 Cinder View Trace Deloraine, Michigan 48363-3520',\n\t\t\t\t'phone' => '(313) 089-6913',\n\t\t\t\t'lat' => '42.7664746',\n\t\t\t\t'lng' => '-83.1541796',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6613 Golden Corner Polecat Bay, South Carolina 29248-0849',\n\t\t\t\t'phone' => '(843) 922-1045',\n\t\t\t\t'lat' => '33.836081',\n\t\t\t\t'lng' => '-81.1637245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '305 Jagged Grounds Estiffanulga, Minnesota 55180-3195',\n\t\t\t\t'phone' => '(320) 498-0046',\n\t\t\t\t'lat' => '46.729553',\n\t\t\t\t'lng' => '-94.6858998',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6860 Crystal Ridge Possum Trot, Tennessee 37454-4951',\n\t\t\t\t'phone' => '(931) 573-5387',\n\t\t\t\t'lat' => '35.5174913',\n\t\t\t\t'lng' => '-86.5804473',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3551 Pleasant Point Glen Raven, District of Columbia 20054-8428',\n\t\t\t\t'phone' => '(202) 389-4349',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7199 Sunny Nook Paydown, Maine 04353-6633',\n\t\t\t\t'phone' => '(207) 674-4096',\n\t\t\t\t'lat' => '44.2238966',\n\t\t\t\t'lng' => '-69.6199357',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2743 Thunder Port Chestermere, Missouri 63937-5966',\n\t\t\t\t'phone' => '(417) 123-9433',\n\t\t\t\t'lat' => '36.9301095',\n\t\t\t\t'lng' => '-90.7722974',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3760 Silver Prairie Townline Tiger Tail, Utah 84609-2369',\n\t\t\t\t'phone' => '(435) 290-2684',\n\t\t\t\t'lat' => '39.3209801',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2546 Clear Bear Range Tunnel Hill, Wyoming 83067-1217',\n\t\t\t\t'phone' => '(307) 236-9552',\n\t\t\t\t'lat' => '43.0759678',\n\t\t\t\t'lng' => '-107.2902839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2758 Cotton Campus Swindleville, Oklahoma 73758-8899',\n\t\t\t\t'phone' => '(580) 622-1215',\n\t\t\t\t'lat' => '36.9587896',\n\t\t\t\t'lng' => '-98.068343',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9000 Indian Embers Trail Little Water, North Dakota 58269-0906',\n\t\t\t\t'phone' => '(701) 719-4564',\n\t\t\t\t'lat' => '48.6914843',\n\t\t\t\t'lng' => '-98.165204',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '544 Noble Mountain Dell Ste. Rose du Lac, Nevada 88962-4758',\n\t\t\t\t'phone' => '(775) 731-8736',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6074 Emerald Gate Passage Waggy, Louisiana 70677-4881',\n\t\t\t\t'phone' => '(225) 476-0583',\n\t\t\t\t'lat' => '31.2448234',\n\t\t\t\t'lng' => '-92.1450245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9159 Hazy Zephyr Moor Gravesend, Vermont 05333-5210',\n\t\t\t\t'phone' => '(802) 410-3565',\n\t\t\t\t'lat' => '44.5588028',\n\t\t\t\t'lng' => '-72.5778415',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9919 Green Wagon Impasse Manifest, Hawaii 96717-8463',\n\t\t\t\t'phone' => '(808) 083-9986',\n\t\t\t\t'lat' => '21.5707975',\n\t\t\t\t'lng' => '-157.8927472',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1355 Blue Cove Scooba, Maine 04243-6502',\n\t\t\t\t'phone' => '(207) 298-7328',\n\t\t\t\t'lat' => '44.1',\n\t\t\t\t'lng' => '-70.22',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6356 Sleepy Chase Zipperlandville, Illinois 61835-9234',\n\t\t\t\t'phone' => '(815) 108-7735',\n\t\t\t\t'lat' => '40.6331249',\n\t\t\t\t'lng' => '-89.3985283',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2531 Rustic Anchor Acres Hungry Hill, Maryland 20768-4906',\n\t\t\t\t'phone' => '(240) 370-9692',\n\t\t\t\t'lat' => '39',\n\t\t\t\t'lng' => '-76.88',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9957 Gentle Arbor Irricana, Delaware 19897-5853',\n\t\t\t\t'phone' => '(302) 440-8338',\n\t\t\t\t'lat' => '39.7856696',\n\t\t\t\t'lng' => '-75.5461494',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3187 High Promenade Fairdealing, Nebraska 69508-1675',\n\t\t\t\t'phone' => '(531) 725-6138',\n\t\t\t\t'lat' => '41.4925374',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6337 Amber Bend Funny River, Illinois 62817-4327',\n\t\t\t\t'phone' => '(217) 557-9408',\n\t\t\t\t'lat' => '37.9788798',\n\t\t\t\t'lng' => '-88.4500789',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9266 Shady Willow Cape Antlers, Alaska 99623-7664',\n\t\t\t\t'phone' => '(907) 409-4067',\n\t\t\t\t'lat' => '64.2008413',\n\t\t\t\t'lng' => '-149.4936733',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1352 Bright Goose Pike Big Black, Arkansas 71766-8350',\n\t\t\t\t'phone' => '(870) 377-6554',\n\t\t\t\t'lat' => '33.7046265',\n\t\t\t\t'lng' => '-92.4801989',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4111 Dewy Oak Manor Tennis, Massachusetts 02575-2415',\n\t\t\t\t'phone' => '(774) 709-4623',\n\t\t\t\t'lat' => '41.3854488',\n\t\t\t\t'lng' => '-70.6828437',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '847 Rocky Cider Mountain Smoke Tree, North Carolina 28828-1331',\n\t\t\t\t'phone' => '(910) 433-1420',\n\t\t\t\t'lat' => '35.7595731',\n\t\t\t\t'lng' => '-79.0192997',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7617 Wishing Brook Close Red Scaffold, Indiana 46881-1212',\n\t\t\t\t'phone' => '(574) 444-1553',\n\t\t\t\t'lat' => '40.5512165',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2480 Foggy Common Ragged Top, Washington 98961-5250',\n\t\t\t\t'phone' => '(360) 421-1646',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3492 Grand Forest Khwunrghunme, Michigan 49756-9037',\n\t\t\t\t'phone' => '(734) 937-3419',\n\t\t\t\t'lat' => '44.8212897',\n\t\t\t\t'lng' => '-84.3121264',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7416 Little Sky Freeway Rockglen, District of Columbia 20019-1929',\n\t\t\t\t'phone' => '(202) 237-8148',\n\t\t\t\t'lat' => '38.8910932',\n\t\t\t\t'lng' => '-76.947022',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9615 Iron Gate Four Locks, Nevada 89913-4822',\n\t\t\t\t'phone' => '(775) 426-4311',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6148 Old Diversion Tuggleville, Massachusetts 02337-2879',\n\t\t\t\t'phone' => '(857) 963-7280',\n\t\t\t\t'lat' => '42.0135823',\n\t\t\t\t'lng' => '-70.9618707',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6296 Quiet Limits Fort Nonsense, Alabama 35677-0818',\n\t\t\t\t'phone' => '(334) 098-7277',\n\t\t\t\t'lat' => '34.9568241',\n\t\t\t\t'lng' => '-88.0314174',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8939 Hidden Shadow Farms Granum, Connecticut 06587-8468',\n\t\t\t\t'phone' => '(475) 803-0416',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9165 Umber Horse Lane Pukwana, Utah 84914-5320',\n\t\t\t\t'phone' => '(801) 644-3244',\n\t\t\t\t'lat' => '39.3209801',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8216 Dusty Meadow India, Idaho 83960-6689',\n\t\t\t\t'phone' => '(208) 435-1588',\n\t\t\t\t'lat' => '44.0682019',\n\t\t\t\t'lng' => '-114.7420408',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2405 Velvet Place Rob Roy, Oklahoma 74463-5905',\n\t\t\t\t'phone' => '(580) 100-1857',\n\t\t\t\t'lat' => '35.7558792',\n\t\t\t\t'lng' => '-95.5551652',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2739 Tawny Hills Harbour Kansas City, Minnesota 55068-2994',\n\t\t\t\t'phone' => '(763) 680-7609',\n\t\t\t\t'lat' => '44.7530325',\n\t\t\t\t'lng' => '-93.0776568',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3633 Round Elk Street Lick Fork, Colorado 80247-7628',\n\t\t\t\t'phone' => '(303) 519-5784',\n\t\t\t\t'lat' => '39.6974551',\n\t\t\t\t'lng' => '-104.8746508',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5392 Harvest Log Villas Beantown, Virginia 24261-9429',\n\t\t\t\t'phone' => '(757) 666-1162',\n\t\t\t\t'lat' => '37.4315734',\n\t\t\t\t'lng' => '-78.6568942',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3766 Red Quail Expressway Sopchoppy, Missouri 65567-6848',\n\t\t\t\t'phone' => '(660) 947-1822',\n\t\t\t\t'lat' => '37.8343507',\n\t\t\t\t'lng' => '-92.5495112',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5648 Honey Hill Fair Play, Nevada 89530-3031',\n\t\t\t\t'phone' => '(775) 838-1520',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6422 Fallen Fox Dell Uchi, Rhode Island 02952-2526',\n\t\t\t\t'phone' => '(401) 087-8528',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2316 Cinder Sky Moor Morning View, New Mexico 87980-3617',\n\t\t\t\t'phone' => '(505) 298-8521',\n\t\t\t\t'lat' => '34.5199402',\n\t\t\t\t'lng' => '-105.8700901',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2219 Quiet Embers Thicket Seven Oaks, Louisiana 70773-8954',\n\t\t\t\t'phone' => '(318) 793-9794',\n\t\t\t\t'lat' => '30.6070469',\n\t\t\t\t'lng' => '-91.3710402',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9442 Rustic Concession Kidtown, Illinois 61570-6195',\n\t\t\t\t'phone' => '(217) 402-8450',\n\t\t\t\t'lat' => '40.6331249',\n\t\t\t\t'lng' => '-89.3985283',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1909 Cozy Via Hooker Corner, Utah 84719-1105',\n\t\t\t\t'phone' => '(385) 721-9721',\n\t\t\t\t'lat' => '37.6775836',\n\t\t\t\t'lng' => '-112.8343844',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2904 Heather Quail View Ernfold, Florida 34857-4872',\n\t\t\t\t'phone' => '(305) 192-2293',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9839 Harvest Terrace Ohiopyle, Wyoming 82363-8477',\n\t\t\t\t'phone' => '(307) 786-6676',\n\t\t\t\t'lat' => '43.0759678',\n\t\t\t\t'lng' => '-107.2902839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5298 Gentle Harbour Swamp Fox, Arizona 85258-7476',\n\t\t\t\t'phone' => '(480) 945-9607',\n\t\t\t\t'lat' => '33.5669912',\n\t\t\t\t'lng' => '-111.8985922',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9469 Thunder Port Forget, West Virginia 25796-2759',\n\t\t\t\t'phone' => '(304) 930-4028',\n\t\t\t\t'lat' => '38.5976262',\n\t\t\t\t'lng' => '-80.4549026',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7187 Hazy Private Birtle, Alabama 35219-5488',\n\t\t\t\t'phone' => '(256) 624-0268',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1033 Bright Forest Shin Hollow, New York 12454-5275',\n\t\t\t\t'phone' => '(718) 871-5723',\n\t\t\t\t'lat' => '42.2910991',\n\t\t\t\t'lng' => '-74.1592278',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4634 Old Branch Heath Crumrod, Washington 99353-4257',\n\t\t\t\t'phone' => '(360) 093-9697',\n\t\t\t\t'lat' => '46.4132585',\n\t\t\t\t'lng' => '-119.4197414',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '428 Wishing Park Frostproof, Oregon 97948-9195',\n\t\t\t\t'phone' => '(458) 093-6584',\n\t\t\t\t'lat' => '43.8041334',\n\t\t\t\t'lng' => '-120.5542012',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8095 Silent Autumn Mews Summertime, Oklahoma 73173-9098',\n\t\t\t\t'phone' => '(580) 064-3854',\n\t\t\t\t'lat' => '35.3364517',\n\t\t\t\t'lng' => '-97.6222665',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3838 Cotton Bend Rapture, District of Columbia 20092-1246',\n\t\t\t\t'phone' => '(202) 408-8807',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '136 Green Prairie By-pass Chappaquiddick, Alabama 35143-8644',\n\t\t\t\t'phone' => '(334) 878-7089',\n\t\t\t\t'lat' => '33.0991185',\n\t\t\t\t'lng' => '-86.5602614',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6744 Foggy Panda Hollow Four Bears Village, Massachusetts 01836-1710',\n\t\t\t\t'phone' => '(339) 877-5101',\n\t\t\t\t'lat' => '42.4072107',\n\t\t\t\t'lng' => '-71.3824374',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6657 Pleasant Cloud Corners Bucklesberry, Texas 79634-2471',\n\t\t\t\t'phone' => '(430) 045-9307',\n\t\t\t\t'lat' => '31.9685988',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7739 Golden Leaf Highway Sixes, California 94802-8145',\n\t\t\t\t'phone' => '(408) 759-3038',\n\t\t\t\t'lat' => '37.94',\n\t\t\t\t'lng' => '-122.36',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7761 Quaking Cove Waldheim, Alabama 36811-9935',\n\t\t\t\t'phone' => '(256) 439-3656',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2016 Honey Downs Lunenburg, Alabama 36444-4744',\n\t\t\t\t'phone' => '(334) 539-9475',\n\t\t\t\t'lat' => '31.6711853',\n\t\t\t\t'lng' => '-87.4405786',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4862 Jagged Goose Woods Hog Eye, Idaho 83723-2986',\n\t\t\t\t'phone' => '(208) 870-7519',\n\t\t\t\t'lat' => '44.0682019',\n\t\t\t\t'lng' => '-114.7420408',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3085 Blue Hickory Quay Bell Buckle, Massachusetts 01800-4101',\n\t\t\t\t'phone' => '(508) 992-6644',\n\t\t\t\t'lat' => '42.4072107',\n\t\t\t\t'lng' => '-71.3824374',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1970 Round Freeway Frog Town, Washington 98616-3325',\n\t\t\t\t'phone' => '(253) 244-8709',\n\t\t\t\t'lat' => '46.1794789',\n\t\t\t\t'lng' => '-122.1561155',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3350 Emerald Expressway Hardup, Rhode Island 02983-8455',\n\t\t\t\t'phone' => '(401) 829-1654',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4668 Dusty Spring Link Lampadocia, Florida 33678-2548',\n\t\t\t\t'phone' => '(850) 277-3318',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5044 Rocky Falls Scratch Ankle, Massachusetts 02233-6502',\n\t\t\t\t'phone' => '(339) 608-9455',\n\t\t\t\t'lat' => '42.4072107',\n\t\t\t\t'lng' => '-71.3824374',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4990 Indian Run Jumbo Landing, Kansas 66264-6247',\n\t\t\t\t'phone' => '(913) 450-8901',\n\t\t\t\t'lat' => '39.011902',\n\t\t\t\t'lng' => '-98.4842465',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5366 Iron Round Hardmoney, Mississippi 38651-2412',\n\t\t\t\t'phone' => '(228) 415-6114',\n\t\t\t\t'lat' => '34.8955106',\n\t\t\t\t'lng' => '-90.0466559',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9587 Noble Fawn Wood Silton, Utah 84515-3673',\n\t\t\t\t'phone' => '(435) 680-2014',\n\t\t\t\t'lat' => '38.911433',\n\t\t\t\t'lng' => '-109.140438',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7947 Tawny Bank Glen Campbell, New Jersey 08965-3916',\n\t\t\t\t'phone' => '(908) 243-5474',\n\t\t\t\t'lat' => '40.0583238',\n\t\t\t\t'lng' => '-74.4056612',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4086 Shady Swale Symbol, Connecticut 06452-9480',\n\t\t\t\t'phone' => '(860) 816-1261',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5450 Red Point Thankful, District of Columbia 20085-4124',\n\t\t\t\t'phone' => '(202) 097-4695',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8648 Sunny Abbey Poysippi, Arkansas 71807-9239',\n\t\t\t\t'phone' => '(479) 685-9599',\n\t\t\t\t'lat' => '35.20105',\n\t\t\t\t'lng' => '-91.8318334',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9671 Amber Meadow Bullhead City, Connecticut 06195-6843',\n\t\t\t\t'phone' => '(475) 181-4842',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1003 Velvet Passage Swamproot, Florida 32977-8675',\n\t\t\t\t'phone' => '(305) 352-4895',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1822 Clear Rabbit Heights Hardscrabble Corner, Maryland 21902-5168',\n\t\t\t\t'phone' => '(240) 459-3194',\n\t\t\t\t'lat' => '39.5519225',\n\t\t\t\t'lng' => '-76.0667488',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6657 Red Cape Jumbotown, South Dakota 57009-7025',\n\t\t\t\t'phone' => '(605) 051-3665',\n\t\t\t\t'lat' => '43.9695148',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1736 Lost Lake Private Apponagansett, Colorado 81664-5410',\n\t\t\t\t'phone' => '(719) 056-7029',\n\t\t\t\t'lat' => '39.5500507',\n\t\t\t\t'lng' => '-105.7820674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3840 Easy Bend Village Thirteen, North Carolina 28961-7505',\n\t\t\t\t'phone' => '(828) 335-6063',\n\t\t\t\t'lat' => '33.9790349',\n\t\t\t\t'lng' => '-81.0094511',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4449 Emerald Goose Corner White Swan, Delaware 19914-5031',\n\t\t\t\t'phone' => '(302) 768-7121',\n\t\t\t\t'lat' => '38.9108325',\n\t\t\t\t'lng' => '-75.5276699',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1726 Iron Pond Key Farewell, Utah 84430-5042',\n\t\t\t\t'phone' => '(801) 997-1471',\n\t\t\t\t'lat' => '39.3209801',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7984 Hidden Hills Route Radical, Maryland 21826-2709',\n\t\t\t\t'phone' => '(301) 118-3207',\n\t\t\t\t'lat' => '38.319091',\n\t\t\t\t'lng' => '-75.6237184',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '254 Jagged Grove Towers Skokomish, Michigan 49764-5965',\n\t\t\t\t'phone' => '(810) 808-1222',\n\t\t\t\t'lat' => '45.4227613',\n\t\t\t\t'lng' => '-84.8275195',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7013 Amber Butterfly Carrefour White Iron, Alabama 36391-7622',\n\t\t\t\t'phone' => '(251) 184-2094',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2152 Foggy Brook Turnabout Hangman Crossing, Connecticut 06556-8181',\n\t\t\t\t'phone' => '(203) 471-8901',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3522 Stony Timber Swale Little Black, Nebraska 68531-8030',\n\t\t\t\t'phone' => '(531) 896-6498',\n\t\t\t\t'lat' => '40.8991047',\n\t\t\t\t'lng' => '-96.722641',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5903 Velvet Log Square Tingle, Nevada 89258-0703',\n\t\t\t\t'phone' => '(775) 480-4956',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1666 Tawny Hickory Bay Quoddy, South Carolina 29810-1362',\n\t\t\t\t'phone' => '(864) 760-6510',\n\t\t\t\t'lat' => '32.98209',\n\t\t\t\t'lng' => '-81.3619402',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '549 Golden Cider Moor Changewater, Idaho 83736-4490',\n\t\t\t\t'phone' => '(208) 757-6906',\n\t\t\t\t'lat' => '44.0682019',\n\t\t\t\t'lng' => '-114.7420408',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6342 Sunny Embers Trail Nickajack, Louisiana 71225-2282',\n\t\t\t\t'phone' => '(337) 704-5874',\n\t\t\t\t'lat' => '32.5040767',\n\t\t\t\t'lng' => '-92.3517526',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '870 Round Circuit Crumrod, North Dakota 58569-6155',\n\t\t\t\t'phone' => '(701) 752-7907',\n\t\t\t\t'lat' => '46.2326345',\n\t\t\t\t'lng' => '-101.2387062',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3571 Gentle Run Mudtavern, South Dakota 57420-4755',\n\t\t\t\t'phone' => '(605) 329-6911',\n\t\t\t\t'lat' => '45.2565588',\n\t\t\t\t'lng' => '-100.162177',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7000 Honey Fox Ridge Asphaltum, Oklahoma 74163-8162',\n\t\t\t\t'phone' => '(918) 254-3808',\n\t\t\t\t'lat' => '35.0077519',\n\t\t\t\t'lng' => '-97.092877',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5404 Thunder Vale Paydown, Utah 84529-9748',\n\t\t\t\t'phone' => '(801) 496-4369',\n\t\t\t\t'lat' => '39.7235022',\n\t\t\t\t'lng' => '-110.7956878',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5715 Harvest Gate Vista Perennial, Massachusetts 01775-4618',\n\t\t\t\t'phone' => '(351) 819-4468',\n\t\t\t\t'lat' => '42.4195323',\n\t\t\t\t'lng' => '-71.5130445',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3792 Misty Forest Loop Nanatlugunyi, Florida 34626-6008',\n\t\t\t\t'phone' => '(561) 250-4253',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8967 Wishing Robin Abbey Delightful, California 91223-0883',\n\t\t\t\t'phone' => '(858) 369-2837',\n\t\t\t\t'lat' => '36.778261',\n\t\t\t\t'lng' => '-119.4179324',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7881 Clear Deer Orchard Earth City, North Carolina 28790-1923',\n\t\t\t\t'phone' => '(334) 742-0656',\n\t\t\t\t'lat' => '35.2122099',\n\t\t\t\t'lng' => '-82.4861053',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1424 Blue Freeway Calypso, Oregon 97366-8616',\n\t\t\t\t'phone' => '(541) 518-7818',\n\t\t\t\t'lat' => '44.5772172',\n\t\t\t\t'lng' => '-124.053674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6984 Green Crest Comet, Colorado 80879-7122',\n\t\t\t\t'phone' => '(303) 805-7076',\n\t\t\t\t'lat' => '39.5500507',\n\t\t\t\t'lng' => '-105.7820674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3444 Merry Zephyr Bank St. Anthony, Maryland 21537-8641',\n\t\t\t\t'phone' => '(240) 544-8665',\n\t\t\t\t'lat' => '39.0457549',\n\t\t\t\t'lng' => '-76.6412712',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2369 Noble Link Pilchuck, Mississippi 38792-0814',\n\t\t\t\t'phone' => '(769) 452-9691',\n\t\t\t\t'lat' => '32.3546679',\n\t\t\t\t'lng' => '-89.3985283',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1272 Colonial Woods California, District of Columbia 20026-2848',\n\t\t\t\t'phone' => '(202) 663-3795',\n\t\t\t\t'lat' => '38.88546',\n\t\t\t\t'lng' => '-77.02612',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2483 Cinder Blossom Townline Smittle, Michigan 48648-1860',\n\t\t\t\t'phone' => '(586) 711-0904',\n\t\t\t\t'lat' => '44.3148443',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4352 Sleepy Acres Turkey Foot Corner, Arizona 85149-8474',\n\t\t\t\t'phone' => '(480) 488-6822',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2334 Broad Centre Quebec, Arkansas 72840-9638',\n\t\t\t\t'phone' => '(870) 138-9435',\n\t\t\t\t'lat' => '35.4784895',\n\t\t\t\t'lng' => '-93.6319131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '926 Silver Rabbit Heath Biggar, Wyoming 82485-7427',\n\t\t\t\t'phone' => '(307) 598-8660',\n\t\t\t\t'lat' => '43.0759678',\n\t\t\t\t'lng' => '-107.2902839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2095 Dewy Valley Poland, North Carolina 28675-0245',\n\t\t\t\t'phone' => '(828) 268-1449',\n\t\t\t\t'lat' => '36.517185',\n\t\t\t\t'lng' => '-81.1416691',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9664 Heather Apple Lane Rock Run, Ohio 44631-4798',\n\t\t\t\t'phone' => '(567) 477-8961',\n\t\t\t\t'lat' => '40.4172871',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4413 Cotton Passage Money Creek, South Dakota 57464-6212',\n\t\t\t\t'phone' => '(605) 769-3389',\n\t\t\t\t'lat' => '43.9695148',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '498 Grand Autumn Manor Sinks, Maryland 21080-2555',\n\t\t\t\t'phone' => '(240) 883-6381',\n\t\t\t\t'lat' => '39.0457549',\n\t\t\t\t'lng' => '-76.6412712',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4880 Cozy Bluff Wynd Dime, Wyoming 82623-0557',\n\t\t\t\t'phone' => '(307) 789-9254',\n\t\t\t\t'lat' => '43.0759678',\n\t\t\t\t'lng' => '-107.2902839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1631 Bright Pointe Atlantic, Montana 59633-0116',\n\t\t\t\t'phone' => '(406) 254-9193',\n\t\t\t\t'lat' => '46.8567824',\n\t\t\t\t'lng' => '-112.3514774',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1882 Amber Quay Stamping Ground, Nevada 89168-3744',\n\t\t\t\t'phone' => '(702) 523-2993',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1184 Honey Rabbit Byway Security, Rhode Island 02976-3161',\n\t\t\t\t'phone' => '(401) 196-3344',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7312 Rustic Shadow Crescent Quispamsis, Missouri 64437-0634',\n\t\t\t\t'phone' => '(573) 055-5313',\n\t\t\t\t'lat' => '40.1640348',\n\t\t\t\t'lng' => '-95.3730176',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4235 Easy Hollow Terramuggus, Massachusetts 01190-1126',\n\t\t\t\t'phone' => '(339) 768-8087',\n\t\t\t\t'lat' => '42.4072107',\n\t\t\t\t'lng' => '-71.3824374',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3275 Bright Rise Tobin Lake, Missouri 63434-6747',\n\t\t\t\t'phone' => '(636) 770-5547',\n\t\t\t\t'lat' => '39.9029582',\n\t\t\t\t'lng' => '-91.9685826',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6974 Lazy Hickory Lookout Bingo Creek Landing, Ohio 43915-4308',\n\t\t\t\t'phone' => '(330) 540-7539',\n\t\t\t\t'lat' => '39.7283144',\n\t\t\t\t'lng' => '-80.9207737',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9571 Iron Impasse Speedway, Kentucky 41048-7538',\n\t\t\t\t'phone' => '(270) 173-4041',\n\t\t\t\t'lat' => '39.0871388',\n\t\t\t\t'lng' => '-84.7211074',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3955 Silent Autumn Port Fairbanks, North Carolina 28288-9288',\n\t\t\t\t'phone' => '(704) 022-2545',\n\t\t\t\t'lat' => '35.2299999',\n\t\t\t\t'lng' => '-80.84',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6612 Rocky Square Wink, New Mexico 88011-7952',\n\t\t\t\t'phone' => '(575) 508-3628',\n\t\t\t\t'lat' => '32.3035838',\n\t\t\t\t'lng' => '-106.6055534',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7468 Merry Glade Wynyard, Oklahoma 74155-6173',\n\t\t\t\t'phone' => '(918) 189-7319',\n\t\t\t\t'lat' => '36.1',\n\t\t\t\t'lng' => '-95.88',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8814 Blue Bank Chickahominy, Rhode Island 02870-2801',\n\t\t\t\t'phone' => '(401) 398-9638',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7805 Misty Estates Orderville, Arizona 85006-4165',\n\t\t\t\t'phone' => '(480) 709-9395',\n\t\t\t\t'lat' => '33.4636012',\n\t\t\t\t'lng' => '-112.0535987',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8128 Colonial View Jetty Ruff, Alaska 99974-7657',\n\t\t\t\t'phone' => '(907) 844-0966',\n\t\t\t\t'lat' => '64.2008413',\n\t\t\t\t'lng' => '-149.4936733',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2915 Quiet Log Run Conquest Beach, Pennsylvania 19688-3627',\n\t\t\t\t'phone' => '(570) 679-4418',\n\t\t\t\t'lat' => '41.2033216',\n\t\t\t\t'lng' => '-77.1945247',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8984 Crystal Village Box Ankle, Arizona 86462-7020',\n\t\t\t\t'phone' => '(602) 319-0178',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6651 Jagged Quail Parade Kaihon Kug, Minnesota 56043-3914',\n\t\t\t\t'phone' => '(320) 120-3165',\n\t\t\t\t'lat' => '43.6400477',\n\t\t\t\t'lng' => '-93.2281983',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2721 Umber Goose Inlet Whipup, California 90450-4108',\n\t\t\t\t'phone' => '(310) 337-3085',\n\t\t\t\t'lat' => '36.778261',\n\t\t\t\t'lng' => '-119.4179324',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2346 Grand Embers Autoroute Pee Dee, Delaware 19827-5252',\n\t\t\t\t'phone' => '(302) 130-8743',\n\t\t\t\t'lat' => '38.9108325',\n\t\t\t\t'lng' => '-75.5276699',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1014 Tawny Barn Campus Moab, Wisconsin 54395-8609',\n\t\t\t\t'phone' => '(715) 451-7568',\n\t\t\t\t'lat' => '43.7844397',\n\t\t\t\t'lng' => '-88.7878678',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4766 Middle Apple Walk Mctaggart, Georgia 39974-6914',\n\t\t\t\t'phone' => '(770) 180-8724',\n\t\t\t\t'lat' => '32.1574351',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1357 Stony Spring Falls Pyro, Minnesota 56430-2366',\n\t\t\t\t'phone' => '(651) 112-8227',\n\t\t\t\t'lat' => '46.24',\n\t\t\t\t'lng' => '-93.27',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '741 Little Road Hotchkissville, South Carolina 29980-2982',\n\t\t\t\t'phone' => '(803) 271-1505',\n\t\t\t\t'lat' => '33.836081',\n\t\t\t\t'lng' => '-81.1637245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4800 Indian Abbey Blowing Rocks, Indiana 46110-0404',\n\t\t\t\t'phone' => '(317) 118-3274',\n\t\t\t\t'lat' => '39.5487322',\n\t\t\t\t'lng' => '-85.899783',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7564 Hazy End Quonochontaug, Iowa 50994-1984',\n\t\t\t\t'phone' => '(641) 188-5763',\n\t\t\t\t'lat' => '41.8780025',\n\t\t\t\t'lng' => '-93.097702',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8297 Green Fox Boulevard Oskaloosa, Delaware 19768-0727',\n\t\t\t\t'phone' => '(302) 991-2140',\n\t\t\t\t'lat' => '38.9108325',\n\t\t\t\t'lng' => '-75.5276699',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3485 High Elk Highlands Alabama, Illinois 60056-5509',\n\t\t\t\t'phone' => '(630) 741-5152',\n\t\t\t\t'lat' => '42.0646736',\n\t\t\t\t'lng' => '-87.9383822',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1086 Sleepy River Highway Deep Tunnel, Nebraska 69944-7258',\n\t\t\t\t'phone' => '(402) 487-2266',\n\t\t\t\t'lat' => '41.4925374',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4287 Hidden Pathway Dogs Corners, Texas 77703-3455',\n\t\t\t\t'phone' => '(214) 064-5285',\n\t\t\t\t'lat' => '30.1123243',\n\t\t\t\t'lng' => '-94.1053307',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9353 Broad Lake Green Magic City, Connecticut 06944-8343',\n\t\t\t\t'phone' => '(860) 742-6128',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '837 Pleasant Leaf Mountain Badwater, Michigan 49485-3681',\n\t\t\t\t'phone' => '(989) 918-6526',\n\t\t\t\t'lat' => '44.3148443',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '39 Heather Deer Terrace Thumpertown Beach, South Carolina 29522-8274',\n\t\t\t\t'phone' => '(864) 481-1621',\n\t\t\t\t'lat' => '33.836081',\n\t\t\t\t'lng' => '-81.1637245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3339 Old Bear Pike Pierceland, South Dakota 57415-3788',\n\t\t\t\t'phone' => '(605) 629-5218',\n\t\t\t\t'lat' => '43.9695148',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8761 Red Pines Rice City, Washington 99321-1500',\n\t\t\t\t'phone' => '(206) 943-5709',\n\t\t\t\t'lat' => '46.8302172',\n\t\t\t\t'lng' => '-119.9753806',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7767 Silver Alley Noordeloos, Iowa 51745-0727',\n\t\t\t\t'phone' => '(641) 192-2090',\n\t\t\t\t'lat' => '41.8780025',\n\t\t\t\t'lng' => '-93.097702',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1435 Fallen Mountain Vale Fond du Lac, Virginia 22856-9291',\n\t\t\t\t'phone' => '(757) 141-8626',\n\t\t\t\t'lat' => '37.4315734',\n\t\t\t\t'lng' => '-78.6568942',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2933 Sunny Lagoon Carrefour Tok, Alabama 36623-1322',\n\t\t\t\t'phone' => '(251) 692-9694',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2269 Green Estates Lancer, Virginia 23433-5801',\n\t\t\t\t'phone' => '(276) 386-1910',\n\t\t\t\t'lat' => '36.9096727',\n\t\t\t\t'lng' => '-76.4736602',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5102 Crystal Campus Africa, Arkansas 72941-1369',\n\t\t\t\t'phone' => '(501) 425-6290',\n\t\t\t\t'lat' => '35.3406757',\n\t\t\t\t'lng' => '-94.1718542',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6263 Dusty Via Westlock, North Carolina 27880-2868',\n\t\t\t\t'phone' => '(252) 729-9770',\n\t\t\t\t'lat' => '35.7274657',\n\t\t\t\t'lng' => '-78.1222336',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '901 Emerald Dale Trail Tropic, Alabama 36195-8065',\n\t\t\t\t'phone' => '(256) 750-0498',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9909 Stony Treasure Run Bowlegs, New York 14280-7238',\n\t\t\t\t'phone' => '(718) 645-5353',\n\t\t\t\t'lat' => '42.88',\n\t\t\t\t'lng' => '-78.83',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '375 Grand Circuit Big Lick, North Dakota 58673-0849',\n\t\t\t\t'phone' => '(701) 249-6415',\n\t\t\t\t'lat' => '47.5514926',\n\t\t\t\t'lng' => '-101.0020119',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6622 Shady Willow Extension Singing Brook, Florida 34850-0832',\n\t\t\t\t'phone' => '(904) 520-9731',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3788 Golden Path Ouzinkie, Nevada 89414-0520',\n\t\t\t\t'phone' => '(702) 834-3786',\n\t\t\t\t'lat' => '41.0357702',\n\t\t\t\t'lng' => '-117.1264753',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2770 Hidden Leaf Autoroute Skin Corner, Wisconsin 53103-7447',\n\t\t\t\t'phone' => '(414) 483-1760',\n\t\t\t\t'lat' => '42.8791805',\n\t\t\t\t'lng' => '-88.2169027',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4453 Cinder Island Stead Oblong, Washington 98115-4132',\n\t\t\t\t'phone' => '(509) 550-3940',\n\t\t\t\t'lat' => '47.6849444',\n\t\t\t\t'lng' => '-122.2982224',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3154 Easy Beacon Grounds Queonemysing, Rhode Island 02899-2050',\n\t\t\t\t'phone' => '(401) 107-0559',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5753 Umber Blossom Close Broomtown, Nebraska 68105-7145',\n\t\t\t\t'phone' => '(531) 625-0429',\n\t\t\t\t'lat' => '41.2418116',\n\t\t\t\t'lng' => '-95.9673967',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5314 Colonial Shadow Green Okahta Talaia, West Virginia 26565-0046',\n\t\t\t\t'phone' => '(304) 871-6111',\n\t\t\t\t'lat' => '38.5976262',\n\t\t\t\t'lng' => '-80.4549026',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7366 Gentle Gate Pines Anaconda, Pennsylvania 17700-1378',\n\t\t\t\t'phone' => '(878) 984-2742',\n\t\t\t\t'lat' => '41.2033216',\n\t\t\t\t'lng' => '-77.1945247',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6390 Amber Hills Range Chiawuli Tak, Alaska 99585-0460',\n\t\t\t\t'phone' => '(907) 482-1567',\n\t\t\t\t'lat' => '61.9319969',\n\t\t\t\t'lng' => '-162.2708169',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9656 Blue Goose Passage Bootjack, District of Columbia 20050-2319',\n\t\t\t\t'phone' => '(202) 047-2431',\n\t\t\t\t'lat' => '38.9',\n\t\t\t\t'lng' => '-77.04',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3292 Dewy Fox Square Gassaway, Mississippi 38750-3303',\n\t\t\t\t'phone' => '(662) 414-3997',\n\t\t\t\t'lat' => '32.3546679',\n\t\t\t\t'lng' => '-89.3985283',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3621 Lost Barn Key Turkey Scratch, Nebraska 68376-3092',\n\t\t\t\t'phone' => '(308) 123-0375',\n\t\t\t\t'lat' => '40.1975037',\n\t\t\t\t'lng' => '-95.940971',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '779 Quaking Bend Pink Arrow, Maine 04229-9316',\n\t\t\t\t'phone' => '(207) 751-1259',\n\t\t\t\t'lat' => '45.253783',\n\t\t\t\t'lng' => '-69.4454689',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '859 Little Place Prairie Queen, South Carolina 29009-4151',\n\t\t\t\t'phone' => '(864) 042-0986',\n\t\t\t\t'lat' => '34.4614628',\n\t\t\t\t'lng' => '-80.3881333',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5454 Burning Apple Plaza Montmartre, Indiana 47837-8211',\n\t\t\t\t'phone' => '(317) 656-5951',\n\t\t\t\t'lat' => '40.5512165',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3019 Tawny Nectar Canyon Twentysix, Rhode Island 02953-3262',\n\t\t\t\t'phone' => '(401) 205-0347',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1693 Heather Park Choccolocco, Nevada 89121-6915',\n\t\t\t\t'phone' => '(702) 497-5280',\n\t\t\t\t'lat' => '36.1165487',\n\t\t\t\t'lng' => '-115.0881146',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4694 Harvest Grove Cape Farmlife, Delaware 19851-7155',\n\t\t\t\t'phone' => '(302) 677-0905',\n\t\t\t\t'lat' => '38.9108325',\n\t\t\t\t'lng' => '-75.5276699',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6793 Noble Prairie Farm Cheesequake, South Carolina 29321-0502',\n\t\t\t\t'phone' => '(843) 039-9935',\n\t\t\t\t'lat' => '34.7346757',\n\t\t\t\t'lng' => '-81.7130522',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7422 Lazy Ridge Possum Bluff, North Dakota 58730-0556',\n\t\t\t\t'phone' => '(701) 951-9221',\n\t\t\t\t'lat' => '48.8755921',\n\t\t\t\t'lng' => '-103.3383503',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9342 Round Rabbit Gate Latexo, Ohio 44353-0469',\n\t\t\t\t'phone' => '(740) 126-5652',\n\t\t\t\t'lat' => '40.4172871',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9030 Red Abbey Pointblank, Oregon 97693-1636',\n\t\t\t\t'phone' => '(458) 273-1218',\n\t\t\t\t'lat' => '43.8041334',\n\t\t\t\t'lng' => '-120.5542012',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7 High Mountain Glade Pontiac, Arizona 86330-0582',\n\t\t\t\t'phone' => '(928) 447-4570',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5726 Fallen Embers Thicket Port Protection, Ohio 44035-5738',\n\t\t\t\t'phone' => '(740) 066-8548',\n\t\t\t\t'lat' => '41.3534148',\n\t\t\t\t'lng' => '-82.1496049',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5589 Thunder Point Wawota, Louisiana 71490-1808',\n\t\t\t\t'phone' => '(985) 711-3587',\n\t\t\t\t'lat' => '31.2448234',\n\t\t\t\t'lng' => '-92.1450245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8346 Silver Limits Battle Mountain, New York 12016-4484',\n\t\t\t\t'phone' => '(347) 919-0371',\n\t\t\t\t'lat' => '42.93',\n\t\t\t\t'lng' => '-74.3199999',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5933 Quiet Valley Ko Ko, Colorado 81549-9872',\n\t\t\t\t'phone' => '(719) 129-0748',\n\t\t\t\t'lat' => '39.5500507',\n\t\t\t\t'lng' => '-105.7820674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5148 Clear Vale Poor Town, Massachusetts 02575-2791',\n\t\t\t\t'phone' => '(339) 153-3036',\n\t\t\t\t'lat' => '41.3854488',\n\t\t\t\t'lng' => '-70.6828437',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6704 Hazy Lookout Weed, Iowa 50719-6158',\n\t\t\t\t'phone' => '(712) 771-7469',\n\t\t\t\t'lat' => '41.8780025',\n\t\t\t\t'lng' => '-93.097702',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3575 Middle Drive Koggiung, Maryland 21558-6166',\n\t\t\t\t'phone' => '(443) 915-6824',\n\t\t\t\t'lat' => '39.0457549',\n\t\t\t\t'lng' => '-76.6412712',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9365 Grand Pointe Nanton, New Jersey 07685-8905',\n\t\t\t\t'phone' => '(973) 220-5840',\n\t\t\t\t'lat' => '40.0583238',\n\t\t\t\t'lng' => '-74.4056612',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9796 Cozy Cider Boulevard Weirdale, Rhode Island 02968-5568',\n\t\t\t\t'phone' => '(401) 569-3091',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5297 Merry Woods Mexican Hat, Arizona 86615-1139',\n\t\t\t\t'phone' => '(623) 535-6319',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7427 Jagged Brook Bank Ah Fong Village, South Dakota 57890-7849',\n\t\t\t\t'phone' => '(605) 276-0864',\n\t\t\t\t'lat' => '43.9695148',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '754 Tawny Pony Alley Ak-Chin Village, Pennsylvania 17528-2354',\n\t\t\t\t'phone' => '(878) 610-1011',\n\t\t\t\t'lat' => '40.1281362',\n\t\t\t\t'lng' => '-75.998932',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4504 Lost Pine Jetty Ashepoo, Indiana 46332-6909',\n\t\t\t\t'phone' => '(765) 658-9671',\n\t\t\t\t'lat' => '40.5512165',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7349 Wishing Pioneer Carrefour Fearnowville, Nebraska 69992-2859',\n\t\t\t\t'phone' => '(531) 755-7518',\n\t\t\t\t'lat' => '41.4925374',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8125 Sleepy Wagon Walk Quails Nest, Washington 98914-0393',\n\t\t\t\t'phone' => '(360) 759-8355',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4848 Rustic Creek Field Extra, Florida 32134-3480',\n\t\t\t\t'phone' => '(772) 410-4020',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9972 Red Island Parade Quinhagak, Arkansas 72321-2240',\n\t\t\t\t'phone' => '(870) 781-2491',\n\t\t\t\t'lat' => '35.8197959',\n\t\t\t\t'lng' => '-89.9323304',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6636 Crystal Chase Skidaway Island, Connecticut 06780-4384',\n\t\t\t\t'phone' => '(475) 727-7385',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6444 Pleasant Bluff Gate Axehandle, Arkansas 72928-3456',\n\t\t\t\t'phone' => '(479) 819-5947',\n\t\t\t\t'lat' => '35.2937406',\n\t\t\t\t'lng' => '-93.9368439',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9235 Blue Villas Half Hell, Washington 98641-6518',\n\t\t\t\t'phone' => '(206) 611-7946',\n\t\t\t\t'lat' => '46.5782535',\n\t\t\t\t'lng' => '-124.0028498',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6226 Cinder Quail Townline Ohoopee, Florida 32498-0673',\n\t\t\t\t'phone' => '(386) 072-5373',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4445 Harvest Timber Autoroute Sugar House, Tennessee 38360-7057',\n\t\t\t\t'phone' => '(931) 262-1016',\n\t\t\t\t'lat' => '35.5174913',\n\t\t\t\t'lng' => '-86.5804473',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1977 Stony Fawn Stead Mervin, Virginia 22113-0967',\n\t\t\t\t'phone' => '(757) 167-5136',\n\t\t\t\t'lat' => '37.4315734',\n\t\t\t\t'lng' => '-78.6568942',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1394 Noble Downs Flickersville, Idaho 83613-3584',\n\t\t\t\t'phone' => '(208) 823-5774',\n\t\t\t\t'lat' => '44.0682019',\n\t\t\t\t'lng' => '-114.7420408',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5874 Hidden Common Ugashik, Delaware 19881-6924',\n\t\t\t\t'phone' => '(302) 305-4954',\n\t\t\t\t'lat' => '38.9108325',\n\t\t\t\t'lng' => '-75.5276699',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9383 Gentle Grove Meadow Normalville, West Virginia 25919-8033',\n\t\t\t\t'phone' => '(681) 917-8401',\n\t\t\t\t'lat' => '37.8131224',\n\t\t\t\t'lng' => '-81.1835839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7371 Honey Sky Link Fort Spunky, Alabama 35100-5594',\n\t\t\t\t'phone' => '(334) 624-5222',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6632 High Lane Twisp, Louisiana 71003-4067',\n\t\t\t\t'phone' => '(985) 211-3060',\n\t\t\t\t'lat' => '31.2448234',\n\t\t\t\t'lng' => '-92.1450245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2365 Foggy Rise Swale Tribune, District of Columbia 20032-3585',\n\t\t\t\t'phone' => '(202) 865-0334',\n\t\t\t\t'lat' => '38.8372336',\n\t\t\t\t'lng' => '-77.0161436',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '293 Quiet Canyon Pondlick, Oklahoma 74029-6738',\n\t\t\t\t'phone' => '(405) 584-2135',\n\t\t\t\t'lat' => '36.832666',\n\t\t\t\t'lng' => '-95.8353837',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1074 Emerald Mall Archerwill, Maine 04935-6012',\n\t\t\t\t'phone' => '(207) 343-0489',\n\t\t\t\t'lat' => '44.4486337',\n\t\t\t\t'lng' => '-69.6062394',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6450 Little Robin Glade Pothook, Tennessee 38145-7689',\n\t\t\t\t'phone' => '(931) 676-3145',\n\t\t\t\t'lat' => '35.15',\n\t\t\t\t'lng' => '-90.05',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3990 Velvet Shadow Landing Crumpecker, Georgia 39823-3094',\n\t\t\t\t'phone' => '(762) 086-4610',\n\t\t\t\t'lat' => '31.3021309',\n\t\t\t\t'lng' => '-84.981754',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5560 Amber Highway Osoyoos, Colorado 81022-7656',\n\t\t\t\t'phone' => '(719) 296-9040',\n\t\t\t\t'lat' => '38.1345872',\n\t\t\t\t'lng' => '-104.4257533',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4068 Golden Moor High Lonesome Wells, Nevada 89929-1910',\n\t\t\t\t'phone' => '(775) 336-5382',\n\t\t\t\t'lat' => '41.1115888',\n\t\t\t\t'lng' => '-114.96449',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5720 Dewy Valley Tropic, Ohio 45591-1583',\n\t\t\t\t'phone' => '(216) 223-1805',\n\t\t\t\t'lat' => '40.4172871',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4649 Indian Oak Trace Cincinnati, Arkansas 72188-8555',\n\t\t\t\t'phone' => '(501) 108-3473',\n\t\t\t\t'lat' => '35.20105',\n\t\t\t\t'lng' => '-91.8318334',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4571 Dusty Crest Torquay, South Carolina 29071-4011',\n\t\t\t\t'phone' => '(843) 590-3879',\n\t\t\t\t'lat' => '33.9799999',\n\t\t\t\t'lng' => '-81.24',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '338 Rocky Nectar By-pass Slapneck, Idaho 83647-7054',\n\t\t\t\t'phone' => '(208) 458-6847',\n\t\t\t\t'lat' => '43.4969131',\n\t\t\t\t'lng' => '-115.5314511',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9878 Thunder Arbor Kalifornsky, Arizona 86631-5352',\n\t\t\t\t'phone' => '(623) 658-2751',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5226 Shady Goose Impasse Alberton, Colorado 81299-4296',\n\t\t\t\t'phone' => '(970) 381-4534',\n\t\t\t\t'lat' => '39.5500507',\n\t\t\t\t'lng' => '-105.7820674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9048 Sleepy Dale Maze Lucky, Tennessee 37271-0904',\n\t\t\t\t'phone' => '(865) 587-0661',\n\t\t\t\t'lat' => '35.5174913',\n\t\t\t\t'lng' => '-86.5804473',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8484 Foggy Canyon Delaware, Washington 98893-5880',\n\t\t\t\t'phone' => '(425) 905-3571',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7644 Dusty Lake Lookout Legal, Nevada 89531-1567',\n\t\t\t\t'phone' => '(702) 991-0236',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2965 Colonial Pond Byway Kabetogama, Oklahoma 73592-8085',\n\t\t\t\t'phone' => '(580) 099-9725',\n\t\t\t\t'lat' => '35.0077519',\n\t\t\t\t'lng' => '-97.092877',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7035 Amber Bank Big Timber, Montana 59099-3359',\n\t\t\t\t'phone' => '(406) 046-1326',\n\t\t\t\t'lat' => '45.8343543',\n\t\t\t\t'lng' => '-109.9540644',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4491 Quiet Port Indialantic, Maryland 21062-4405',\n\t\t\t\t'phone' => '(240) 553-5943',\n\t\t\t\t'lat' => '39.1599999',\n\t\t\t\t'lng' => '-76.63',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2907 Middle Anchor Row Scarce Grease, Delaware 19991-0100',\n\t\t\t\t'phone' => '(302) 649-3078',\n\t\t\t\t'lat' => '38.9108325',\n\t\t\t\t'lng' => '-75.5276699',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3924 Gentle Inlet Suquamish, Arizona 86166-6269',\n\t\t\t\t'phone' => '(623) 883-2017',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9823 Umber Prairie Crossing Teaticket, Montana 59309-4514',\n\t\t\t\t'phone' => '(406) 118-8472',\n\t\t\t\t'lat' => '46.8796822',\n\t\t\t\t'lng' => '-110.3625658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '265 Noble Apple Forest Vermont, Georgia 39813-3675',\n\t\t\t\t'phone' => '(229) 050-5836',\n\t\t\t\t'lat' => '31.4035879',\n\t\t\t\t'lng' => '-84.6688348',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8866 Rocky Trace Four Bears Village, Illinois 60491-6196',\n\t\t\t\t'phone' => '(815) 414-5669',\n\t\t\t\t'lat' => '41.6131315',\n\t\t\t\t'lng' => '-87.962884',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1412 Cotton Bay Star, Oklahoma 74194-3598',\n\t\t\t\t'phone' => '(918) 954-0869',\n\t\t\t\t'lat' => '35.0077519',\n\t\t\t\t'lng' => '-97.092877',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9766 Clear Pony Hill Handsome Eddy, Arizona 86422-7832',\n\t\t\t\t'phone' => '(623) 376-5382',\n\t\t\t\t'lat' => '34.0489281',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2824 Quaking Cloud Ridge Sun Valley, Virginia 24342-7446',\n\t\t\t\t'phone' => '(804) 394-6011',\n\t\t\t\t'lat' => '33.6496426',\n\t\t\t\t'lng' => '-92.7743809',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6841 Indian Cider Path Welfare, New York 14291-2909',\n\t\t\t\t'phone' => '(646) 281-2945',\n\t\t\t\t'lat' => '40.7143528',\n\t\t\t\t'lng' => '-74.0059731',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5451 Broad Shadow Range Zewapeta, Alabama 36223-8635',\n\t\t\t\t'phone' => '(256) 964-1223',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6326 Little Pines Lake of the Woods, Wyoming 82150-2725',\n\t\t\t\t'phone' => '(307) 203-4687',\n\t\t\t\t'lat' => '43.0759678',\n\t\t\t\t'lng' => '-107.2902839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5711 Blue Deer Private Bullet Hole, Missouri 65105-1282',\n\t\t\t\t'phone' => '(660) 895-5372',\n\t\t\t\t'lat' => '38.5',\n\t\t\t\t'lng' => '-92.15',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '283 Hidden Spring Wood Boot Jack, District of Columbia 20021-8192',\n\t\t\t\t'phone' => '(202) 730-6835',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2005 Old Towers Ahwatukee, North Dakota 58517-9863',\n\t\t\t\t'phone' => '(701) 623-1368',\n\t\t\t\t'lat' => '47.5514926',\n\t\t\t\t'lng' => '-101.0020119',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '97 Easy Chase Thunder Hawk, Nevada 89426-3672',\n\t\t\t\t'phone' => '(775) 120-7206',\n\t\t\t\t'lat' => '41.5598843',\n\t\t\t\t'lng' => '-117.4086488',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '751 Round Heath Bingo, Wyoming 82547-6473',\n\t\t\t\t'phone' => '(307) 934-0757',\n\t\t\t\t'lat' => '43.0759678',\n\t\t\t\t'lng' => '-107.2902839',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1352 Pleasant Avenue Tinkertown, California 92022-5662',\n\t\t\t\t'phone' => '(562) 143-2770',\n\t\t\t\t'lat' => '36.778261',\n\t\t\t\t'lng' => '-119.4179324',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1681 Silent Corners Ben Arnold, Massachusetts 01528-4491',\n\t\t\t\t'phone' => '(508) 951-3124',\n\t\t\t\t'lat' => '42.4072107',\n\t\t\t\t'lng' => '-71.3824374',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4399 Cinder Key Minnehaha, Oregon 97070-3784',\n\t\t\t\t'phone' => '(971) 108-8608',\n\t\t\t\t'lat' => '45.3018169',\n\t\t\t\t'lng' => '-122.7751561',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4644 Cozy Creek By-pass Telbasta, Iowa 50183-6396',\n\t\t\t\t'phone' => '(563) 119-5041',\n\t\t\t\t'lat' => '41.8780025',\n\t\t\t\t'lng' => '-93.097702',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8328 Jagged Abbey Turkeyfoot, South Dakota 57773-5048',\n\t\t\t\t'phone' => '(605) 557-3188',\n\t\t\t\t'lat' => '43.6076792',\n\t\t\t\t'lng' => '-103.5935897',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2335 Heather Grove Michigan Bar, Minnesota 56333-9494',\n\t\t\t\t'phone' => '(952) 500-4492',\n\t\t\t\t'lat' => '42.2663981',\n\t\t\t\t'lng' => '-83.7081315',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3991 Fallen Brook Cove Chi Chil Tah, Utah 84075-6499',\n\t\t\t\t'phone' => '(801) 958-0611',\n\t\t\t\t'lat' => '41.0541918',\n\t\t\t\t'lng' => '-112.1191757',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1105 Merry Barn Road Yaphank, Mississippi 39434-7368',\n\t\t\t\t'phone' => '(228) 295-0195',\n\t\t\t\t'lat' => '32.3546679',\n\t\t\t\t'lng' => '-89.3985283',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8420 Stony Wagon Crest Runnymeade, Washington 98237-6997',\n\t\t\t\t'phone' => '(206) 831-6478',\n\t\t\t\t'lat' => '48.57163',\n\t\t\t\t'lng' => '-121.6648381',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9921 Grand Court Piddleville, Louisiana 70297-1882',\n\t\t\t\t'phone' => '(985) 897-9654',\n\t\t\t\t'lat' => '31.2448234',\n\t\t\t\t'lng' => '-92.1450245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2870 Iron Extension Bermuda, Colorado 80910-6158',\n\t\t\t\t'phone' => '(720) 166-0253',\n\t\t\t\t'lat' => '38.8064287',\n\t\t\t\t'lng' => '-104.7695962',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6803 Wishing View Arbor Cat Square, West Virginia 25027-6576',\n\t\t\t\t'phone' => '(304) 952-4973',\n\t\t\t\t'lat' => '38.5976262',\n\t\t\t\t'lng' => '-80.4549026',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '950 Red Thicket Wickatunk, Washington 99133-1072',\n\t\t\t\t'phone' => '(509) 283-9110',\n\t\t\t\t'lat' => '48.0361158',\n\t\t\t\t'lng' => '-119.0618141',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5401 Misty Robin Crescent Kill Buck, Rhode Island 02808-3785',\n\t\t\t\t'phone' => '(401) 473-6664',\n\t\t\t\t'lat' => '41.4026135',\n\t\t\t\t'lng' => '-71.7503855',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6237 Sleepy Lane Frisbie, Idaho 83214-5294',\n\t\t\t\t'phone' => '(208) 804-9330',\n\t\t\t\t'lat' => '42.5407152',\n\t\t\t\t'lng' => '-112.262246',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4801 Misty Passage Castor, Georgia 39917-9448',\n\t\t\t\t'phone' => '(223) 387-9176',\n\t\t\t\t'lat' => '32.1574351',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4539 Shady Robin Autoroute Albertville, Maryland 21561-3867',\n\t\t\t\t'phone' => '(240) 077-3317',\n\t\t\t\t'lat' => '39.4962475',\n\t\t\t\t'lng' => '-79.1774268',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5696 Clear Anchor Heath Sedgewick, Maine 04746-1418',\n\t\t\t\t'phone' => '(207) 790-0462',\n\t\t\t\t'lat' => '47.2192967',\n\t\t\t\t'lng' => '-68.1272872',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5953 Fallen Gardens Diagonal, Kentucky 40141-1739',\n\t\t\t\t'phone' => '(606) 649-9284',\n\t\t\t\t'lat' => '37.8393332',\n\t\t\t\t'lng' => '-84.2700179',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5039 Sunny Vale Hells Half Acre, Illinois 61429-4296',\n\t\t\t\t'phone' => '(630) 322-6634',\n\t\t\t\t'lat' => '40.6331249',\n\t\t\t\t'lng' => '-89.3985283',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6708 Dewy Boulevard Aylsham, West Virginia 26949-2429',\n\t\t\t\t'phone' => '(681) 442-9535',\n\t\t\t\t'lat' => '38.5976262',\n\t\t\t\t'lng' => '-80.4549026',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1696 Rocky Lagoon Glade Saltcoats, Kansas 66020-4409',\n\t\t\t\t'phone' => '(620) 939-6715',\n\t\t\t\t'lat' => '39.3532738',\n\t\t\t\t'lng' => '-95.1223608',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '351 Quaking Lake Bank Lone Star, Arkansas 72198-3208',\n\t\t\t\t'phone' => '(870) 320-2825',\n\t\t\t\t'lat' => '35.20105',\n\t\t\t\t'lng' => '-91.8318334',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1194 Emerald Mall Sparkle, South Carolina 29968-2223',\n\t\t\t\t'phone' => '(864) 030-8670',\n\t\t\t\t'lat' => '33.836081',\n\t\t\t\t'lng' => '-81.1637245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4540 Lazy Canyon Texico, Nevada 89065-4845',\n\t\t\t\t'phone' => '(775) 281-6892',\n\t\t\t\t'lat' => '38.8026097',\n\t\t\t\t'lng' => '-116.419389',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '928 Broad Pointe St. Paul, South Dakota 57151-9943',\n\t\t\t\t'phone' => '(605) 506-3672',\n\t\t\t\t'lat' => '43.9695148',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9319 High Hickory Way Whitchurch-Stouffville, Idaho 83396-2356',\n\t\t\t\t'phone' => '(208) 092-9832',\n\t\t\t\t'lat' => '44.0682019',\n\t\t\t\t'lng' => '-114.7420408',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3571 Cotton Pond View Cloudcroft, Washington 99318-3295',\n\t\t\t\t'phone' => '(206) 319-5326',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4832 Velvet Ledge Lick Creek, North Dakota 58132-3790',\n\t\t\t\t'phone' => '(701) 089-2211',\n\t\t\t\t'lat' => '47.5514926',\n\t\t\t\t'lng' => '-101.0020119',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6205 Gentle Pioneer Orchard Nebraska, Utah 84873-7158',\n\t\t\t\t'phone' => '(801) 379-8953',\n\t\t\t\t'lat' => '39.3209801',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1507 Dusty Horse Key Stenen, Connecticut 06463-8750',\n\t\t\t\t'phone' => '(475) 436-2630',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7582 Blue Pathway Peoples, District of Columbia 20097-5618',\n\t\t\t\t'phone' => '(202) 414-2722',\n\t\t\t\t'lat' => '38.8951118',\n\t\t\t\t'lng' => '-77.0363658',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9041 Old Parade Swift Current, Wyoming 82321-7674',\n\t\t\t\t'phone' => '(307) 310-9791',\n\t\t\t\t'lat' => '41.2694332',\n\t\t\t\t'lng' => '-107.811',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7006 Cozy Mountain Range Treherne, Ohio 44000-7746',\n\t\t\t\t'phone' => '(937) 218-0393',\n\t\t\t\t'lat' => '40.4172871',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2108 Hidden Inlet Blackduck, Michigan 49830-1870',\n\t\t\t\t'phone' => '(517) 014-1990',\n\t\t\t\t'lat' => '44.3148443',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4810 Round Berry Ramp Fannie, Michigan 49584-3163',\n\t\t\t\t'phone' => '(616) 917-3110',\n\t\t\t\t'lat' => '44.3148443',\n\t\t\t\t'lng' => '-85.6023643',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1648 Easy Pine Impasse Humboldt, Alaska 99632-0756',\n\t\t\t\t'phone' => '(907) 398-7468',\n\t\t\t\t'lat' => '62.1075171',\n\t\t\t\t'lng' => '-163.6530901',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4535 Foggy Rabbit End Houston, Maryland 21707-7837',\n\t\t\t\t'phone' => '(301) 637-4559',\n\t\t\t\t'lat' => '39.0457549',\n\t\t\t\t'lng' => '-76.6412712',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7673 Pleasant Field Truly, Texas 77079-1885',\n\t\t\t\t'phone' => '(936) 494-0756',\n\t\t\t\t'lat' => '29.7801889',\n\t\t\t\t'lng' => '-95.6090009',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3474 Thunder Dell Owl Hoot, South Carolina 29164-3631',\n\t\t\t\t'phone' => '(843) 611-3991',\n\t\t\t\t'lat' => '33.6536164',\n\t\t\t\t'lng' => '-81.4059186',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9142 Amber Bend Egorkovskoi, New Jersey 08747-9332',\n\t\t\t\t'phone' => '(908) 187-4092',\n\t\t\t\t'lat' => '40.0583238',\n\t\t\t\t'lng' => '-74.4056612',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6565 Cinder View Villas Cathlapotle, Maine 04459-1231',\n\t\t\t\t'phone' => '(207) 831-9138',\n\t\t\t\t'lat' => '45.5738851',\n\t\t\t\t'lng' => '-68.3533229',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '518 Red Mews Zero, New York 10921-2823',\n\t\t\t\t'phone' => '(914) 172-6342',\n\t\t\t\t'lat' => '41.1333442',\n\t\t\t\t'lng' => '-74.0022524',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9170 Honey Quay Smalltown, Idaho 83491-3357',\n\t\t\t\t'phone' => '(208) 768-3359',\n\t\t\t\t'lat' => '44.0682019',\n\t\t\t\t'lng' => '-114.7420408',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2063 Indian Prairie Landing Blackhawk, Missouri 64773-8741',\n\t\t\t\t'phone' => '(573) 448-2155',\n\t\t\t\t'lat' => '37.9642529',\n\t\t\t\t'lng' => '-91.8318334',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1177 Silent Wynd Prelate, Michigan 49755-2114',\n\t\t\t\t'phone' => '(906) 346-4118',\n\t\t\t\t'lat' => '45.6521002',\n\t\t\t\t'lng' => '-84.7814432',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5550 Harvest Street Yreka, Alabama 35589-7414',\n\t\t\t\t'phone' => '(256) 126-4821',\n\t\t\t\t'lat' => '32.3182314',\n\t\t\t\t'lng' => '-86.902298',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6650 Wishing Rise Ketchikan, Colorado 81727-6300',\n\t\t\t\t'phone' => '(303) 649-9421',\n\t\t\t\t'lat' => '39.5500507',\n\t\t\t\t'lng' => '-105.7820674',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '896 Quiet Shadow Grove Okeewemee, Maine 04888-5600',\n\t\t\t\t'phone' => '(207) 887-6714',\n\t\t\t\t'lat' => '45.253783',\n\t\t\t\t'lng' => '-69.4454689',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5221 Hazy Cove Pigeon Run, Rhode Island 02844-5518',\n\t\t\t\t'phone' => '(401) 397-0342',\n\t\t\t\t'lat' => '41.5800945',\n\t\t\t\t'lng' => '-71.4774291',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4009 Misty Log Mews Potato Patch, Texas 79949-7016',\n\t\t\t\t'phone' => '(432) 694-5133',\n\t\t\t\t'lat' => '31.76',\n\t\t\t\t'lng' => '-106.49',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '3121 Blue Road Cheektowasa, Ohio 44178-5872',\n\t\t\t\t'phone' => '(614) 541-7135',\n\t\t\t\t'lat' => '40.4172871',\n\t\t\t\t'lng' => '-82.907123',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7745 Quaking Island Private Vamoosa, Florida 33726-8437',\n\t\t\t\t'phone' => '(352) 417-7732',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2964 Round Bend Three V Crossing, New York 12895-6061',\n\t\t\t\t'phone' => '(516) 933-1701',\n\t\t\t\t'lat' => '40.7143528',\n\t\t\t\t'lng' => '-74.0059731',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8929 Wishing Brook Close Mudtown, Arkansas 72307-8524',\n\t\t\t\t'phone' => '(870) 040-5761',\n\t\t\t\t'lat' => '35.20105',\n\t\t\t\t'lng' => '-91.8318334',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9857 Shady Barn Corners Boiling Point, Illinois 62370-8259',\n\t\t\t\t'phone' => '(618) 865-5959',\n\t\t\t\t'lat' => '39.5028435',\n\t\t\t\t'lng' => '-91.0011902',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8122 Foggy By-pass Refuge, Georgia 39825-9760',\n\t\t\t\t'phone' => '(404) 653-2379',\n\t\t\t\t'lat' => '30.9942599',\n\t\t\t\t'lng' => '-84.7106567',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9352 Sleepy Creek Mall Lorida, Connecticut 06685-5331',\n\t\t\t\t'phone' => '(860) 074-9188',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1740 Silent Goose Promenade Gothic, Virginia 23080-3616',\n\t\t\t\t'phone' => '(703) 804-6802',\n\t\t\t\t'lat' => '37.4315734',\n\t\t\t\t'lng' => '-78.6568942',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9748 Gentle Rabbit Canyon Laird, New York 11444-2032',\n\t\t\t\t'phone' => '(518) 987-5742',\n\t\t\t\t'lat' => '40.7143528',\n\t\t\t\t'lng' => '-74.0059731',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '14 Burning Butterfly Impasse Frugality, Utah 84659-3929',\n\t\t\t\t'phone' => '(385) 531-1381',\n\t\t\t\t'lat' => '39.3209801',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1002 Red Gate Cape Big Cut, Vermont 05637-0939',\n\t\t\t\t'phone' => '(802) 022-4379',\n\t\t\t\t'lat' => '44.5588028',\n\t\t\t\t'lng' => '-72.5778415',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2826 Velvet Blossom Hill Pearl City, West Virginia 25995-8728',\n\t\t\t\t'phone' => '(681) 707-4520',\n\t\t\t\t'lat' => '38.5976262',\n\t\t\t\t'lng' => '-80.4549026',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6397 Colonial Via Lonesome Prairie, Vermont 05009-4463',\n\t\t\t\t'phone' => '(802) 938-7061',\n\t\t\t\t'lat' => '43.6474348',\n\t\t\t\t'lng' => '-72.342588',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '7824 Umber Fox Parkway Roche Percee, Nebraska 69310-7287',\n\t\t\t\t'phone' => '(308) 868-7311',\n\t\t\t\t'lat' => '41.4925374',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '8786 Iron Grove Ah Fong Village, Colorado 80951-9857',\n\t\t\t\t'phone' => '(720) 743-9084',\n\t\t\t\t'lat' => '38.8622755',\n\t\t\t\t'lng' => '-104.6733584',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1582 Sunny Inlet Mctaggart, New Hampshire 03648-2975',\n\t\t\t\t'phone' => '(603) 770-8206',\n\t\t\t\t'lat' => '43.1938516',\n\t\t\t\t'lng' => '-71.5723953',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4191 Rustic Dale Common Rainbow City, West Virginia 26463-4803',\n\t\t\t\t'phone' => '(304) 618-7564',\n\t\t\t\t'lat' => '39.4349029',\n\t\t\t\t'lng' => '-80.3534899',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6761 Merry Parade Rainbow Bend, Pennsylvania 15102-8551',\n\t\t\t\t'phone' => '(484) 597-9344',\n\t\t\t\t'lat' => '40.3167073',\n\t\t\t\t'lng' => '-80.0423151',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '9422 Middle Berry Street Humboldt, Alaska 99574-3449',\n\t\t\t\t'phone' => '(907) 657-0496',\n\t\t\t\t'lat' => '60.7356503',\n\t\t\t\t'lng' => '-145.5826187',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2415 Silver Lagoon Highlands Saltcoats, Louisiana 70086-3885',\n\t\t\t\t'phone' => '(337) 079-1229',\n\t\t\t\t'lat' => '31.2448234',\n\t\t\t\t'lng' => '-92.1450245',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5293 Honey View Crossing Radical, Connecticut 06000-2541',\n\t\t\t\t'phone' => '(860) 898-9772',\n\t\t\t\t'lat' => '41.6032207',\n\t\t\t\t'lng' => '-73.087749',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2018 Hidden Limits Cockeysville, New Jersey 08526-2387',\n\t\t\t\t'phone' => '(551) 133-0241',\n\t\t\t\t'lat' => '40.17',\n\t\t\t\t'lng' => '-74.51',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1187 Noble River Thicket Tat Momoli, Texas 78085-3232',\n\t\t\t\t'phone' => '(903) 016-0722',\n\t\t\t\t'lat' => '31.9685988',\n\t\t\t\t'lng' => '-99.9018131',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4799 Jagged Robin Beach Weirdale, Minnesota 56231-9007',\n\t\t\t\t'phone' => '(507) 950-8070',\n\t\t\t\t'lat' => '45.2842156',\n\t\t\t\t'lng' => '-95.7948769',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6967 Golden Line Parrots, Alaska 99990-7560',\n\t\t\t\t'phone' => '(907) 102-7536',\n\t\t\t\t'lat' => '64.2008413',\n\t\t\t\t'lng' => '-149.4936733',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5766 Tawny Green Valley of Enchantment, Maryland 20850-1890',\n\t\t\t\t'phone' => '(410) 816-6230',\n\t\t\t\t'lat' => '39.0839994',\n\t\t\t\t'lng' => '-77.1527813',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2690 Lazy Jetty Saxman, Massachusetts 02411-2917',\n\t\t\t\t'phone' => '(339) 206-8396',\n\t\t\t\t'lat' => '42.4072107',\n\t\t\t\t'lng' => '-71.3824374',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '1858 Heather Lake Abbey Enough, Alaska 99700-6940',\n\t\t\t\t'phone' => '(907) 915-5318',\n\t\t\t\t'lat' => '64.2008413',\n\t\t\t\t'lng' => '-149.4936733',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2284 Harvest Sky Edge Bungy, Oklahoma 74224-8696',\n\t\t\t\t'phone' => '(580) 287-3530',\n\t\t\t\t'lat' => '35.0077519',\n\t\t\t\t'lng' => '-97.092877',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2875 Dusty Cloud Centre Happy Valley-Goose Bay, Maine 04130-1318',\n\t\t\t\t'phone' => '(207) 707-6131',\n\t\t\t\t'lat' => '45.253783',\n\t\t\t\t'lng' => '-69.4454689',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '2442 Cotton Campus Arabia, Florida 32543-2413',\n\t\t\t\t'phone' => '(813) 412-6448',\n\t\t\t\t'lat' => '27.6648274',\n\t\t\t\t'lng' => '-81.5157535',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '6054 Thunder Rise Subdivision Buzzards Roost, North Carolina 27577-9290',\n\t\t\t\t'phone' => '(828) 877-4968',\n\t\t\t\t'lat' => '35.7595731',\n\t\t\t\t'lng' => '-79.0192997',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '4442 Old Cider Lookout Alabama Village, Utah 84844-5606',\n\t\t\t\t'phone' => '(435) 733-2606',\n\t\t\t\t'lat' => '39.3209801',\n\t\t\t\t'lng' => '-111.0937311',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'address' => '5484 Bright Willow Pike Sunizona, New Mexico 87149-6244',\n\t\t\t\t'phone' => '(505) 333-5135',\n\t\t\t\t'lat' => '34.5199402',\n\t\t\t\t'lng' => '-105.8700901',\n\t\t\t),\n\t\t);\n\n\t\treturn $data;\n\t}", "public function getObjects()\n {\n return $this->hasMany(Object::className(), ['address_id' => 'id']);\n }", "public function emailAddresses()\n {\n return $this->hasMany(OfficeEmailAddress::class);\n }", "public function emailAddresses()\n {\n return $this->hasMany(OfficeEmailAddress::class);\n }", "public function getAll() {\n\t\t$search = $this->Supplier()->search()\n\t\t\t->setTable($this->_table)\n\t\t\t->setColumns(array(Supplier::SUPPLIER_ID, Supplier::SUPPLIER_NAME, Supplier::SUPPLIER_ADDRESS, Supplier::SUPPLIER_TEL_NO))\n\t\t\t->sortBySupplierCreated('ASC');\n\t\treturn $search->getRows();\n\t}", "public function getCcAddresses()\n {\n }", "public function removeAllContactAddresses()\n {\n $this->contactAddresses = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n return $this;\n }", "public function toArray()\n {\n $data = [];\n\n foreach ($this->addresses as $address) {\n $data[] = $address->toArray();\n }\n\n return $data;\n }", "function select_all_company() {\n\t\t$qury=\"SELECT * FROM company\";\n\t\t$requet=mysqli_query($link,$qury);\n\t\t\n\t\twhile($res=mysqli_fetch_assoc($requet)) {\n\t\t\t$data[]=$res;\n\t\t}\n\t\treturn $data;\n\t}", "public function getAddress()\n {\n //Read it as select * from address, person where address.relatedmodel_id = person.id AND person.id = customer.person_id\n //Thus when via is used second param in the link correspond to via column in the relation.\n return $this->hasOne(Address::className(), ['relatedmodel_id' => 'id'])\n ->where('relatedmodel = :rm AND type = :type', [':rm' => 'Person', ':type' => Address::TYPE_DEFAULT])\n ->via('person');\n }", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function getActiveAddressBooks();", "public function getPersonAddresses(Person $person)\n {\n $builder = $person->addresses()->getQuery();\n\n $resource = $this->datatable->setQueryBuilder($builder);\n\n return $resource->getResponse();\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 listAddresses($cid = null) {\r\n\r\n $addresses = array ();\r\n\r\n if( $this->cid > 0 && (!isset($cid)) ) {\r\n\r\n $sql = Connection::getHandle()->prepare(\r\n \"SELECT * FROM bs_customer_addresses WHERE cid = ? ORDER BY default_billing DESC, default_shipping DESC\"\r\n );\r\n\r\n $sql->execute(array ($this->cid));\r\n\r\n while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\r\n $addresses[] = $row;\r\n }\r\n\r\n return $addresses;\r\n\r\n } else if(isset($cid)) {\r\n\r\n $sql = Connection::getHandle()->prepare(\r\n \"SELECT * FROM bs_customer_addresses WHERE cid = ? ORDER BY default_billing DESC, default_shipping DESC\"\r\n );\r\n\r\n $sql->execute(array ($cid));\r\n\r\n while ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\r\n $addresses[] = $row;\r\n }\r\n\r\n return $addresses;\r\n\r\n }else{\r\n\r\n return FALSE;\r\n }\r\n\r\n\t\t}", "public function invoiceAddress() {\r\n $result = $this->clients->flatInvoice();\r\n foreach ($result as $key => $value) {\r\n $getAdress = $this->clients->companyAddress($value->CustomerCompanyID);\r\n $data = array('Params' => $getAdress[0]->Params);\r\n $response = $this->clients->invoiceAdressupdate($value->InvoiceID, $data);\r\n echo $response . \"<br/>\";\r\n }\r\n }", "public function all(): ResultSetContract;", "function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }", "public function getStreetList() {\n return $this->_get(1);\n }", "public function fetchAll($idCompany=null) {\n $sqlSelect = $this->tableGateway->getSql()->select();\n $sqlSelect->columns(array('idWebsite', 'company_id', 'name', 'status'));\n $sqlSelect->join('company', 'company.idCompany = company_website.company_id', array(\"company\"=>\"name\"), 'left');\n if($idCompany){\n $sqlSelect->where(array(\"company_id\"=>$idCompany));\n }\n $resultSet = $this->tableGateway->selectWith($sqlSelect);\n return $resultSet;\n }", "public function getBccAddresses()\n {\n }", "public function all_social_address_info(){\r\n $query = \"SELECT * FROM tbl_contact_us_social_address\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function fetchContacts()\n {\n return $this->contacts;\n }", "public function getAnswerAddresses()\n {\n return clone $this->answerAddresses;\n }", "public static function getAll()\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT region_id, region_name FROM region\";\n $query = $database->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "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 wp_varejoecom_get_all_shipping_company() : ?array\n {\n global $wpdb;\n $tableName = $wpdb->prefix . $this->table_name;\n\n $result = $wpdb->get_results(\"SELECT * FROM {$tableName}\", ARRAY_A);\n\n return sizeof($result) > 0 ? $result : null;\n }", "public function getAddresses( $id )\n {\n return $this->customerService->getCustomerAddresses( $id );\n }", "public function listaddressgroupings(){\n return $this->bitcoin->listaddressgroupings();\n }", "public function getEmployees() {\n if ( is_null($this->_employees) ){\n $customers = $this->getTable()->getEmployees();\n $objects = new splObjectStorage();\n\n foreach ($customers AS $customer) {\n try {\n $ccust = new Yourdelivery_Model_Customer_Company($customer->customerId, $this->getId());\n if ($ccust->isDeleted()) {\n continue;\n }\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $objects->attach($ccust);\n }\n $this->_employees = $objects;\n }\n return $this->_employees;\n }", "public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }", "function read_address_book()\n {\n return $this->read();\n }", "public function getAddresses(string $name): array;", "public function get_contacts()\n {\n \t$query=$this->db->query(\"SELECT A.*,B.Client_Company_Name FROM ibt_client_contacts A INNER JOIN ibt_client B on A.Contact_Client_Icode = B.Client_Icode \"); \n return $query->result_array();\n }", "public function getAll() {\n\t\treturn $this->rows;\n\t}", "public function getCompanyEmployees();", "public function selectAll() {\n\t\t$employees = $this->employee->all();\n\n\t\t$data = array();\n\t\tforeach ($employees as $employee) {\n\t\t\t$data[] = array(\n\t\t\t\t'name' => $employee->name . ' (' . $employee->contact_number . ')',\n\t\t\t\t'id' => $employee->id,\n\t\t\t);\n\t\t}\n\n\t\treturn $data;\n\t}", "public function companies(): Collection\n {\n return Company::all();\n }", "public function getAddressData()\n {\n return $this->address_data;\n }", "protected function initAddresses()\n {\n /** @var $customer \\Magento\\Customer\\Model\\Customer */\n foreach ($this->customerCollection->create() as $customer) {\n $email = $customer->getEmail();\n if (!isset($this->addresses[$customer->getWebsiteId()][$email])) {\n $this->addresses[$customer->getWebsiteId()][$email] = $customer->getData('default_billing');\n }\n\n }\n return $this;\n }", "public function getAddressToLocationRelationships()\n {\n return $this->AddressToLocationRelationships;\n }", "public function getAddress()\n {\n $res = $this->getEntity()->getAddress();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->getAddress();\n\t\t}\n return $res;\n }", "function getAddresses($userId, $addressType = 0) {\n\t\t$select = 'tx_commerce_fe_user_id=' . intval($userId) . t3lib_Befunc::BEenableFields('tt_address');\n\n\t\tif ($addressType > 0) {\n\t\t\t$select.= ' AND tx_commerce_address_type_id=' . intval($addressType);\n\t\t} elseif (isset($this->conf['selectAddressTypes'])) {\n\t\t\t$select.= ' AND tx_commerce_address_type_id IN (' . $this->conf['selectAddressTypes'] . ')';\n\t\t} else {\n\t\t\t$this->addresses = array();\n\t\t\treturn;\n\t\t}\n\n\t\t$select.= ' AND deleted=0 AND pid=' . $this->conf['addressPid'];\n\n\t\t/** * Hook for adding select statement\n\t\t*/\n\t\t$hookObjectsArr = array();\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses'] as $classRef) {\n \t \t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n \t \t\t}\n \t \t}\n \t \tforeach($hookObjectsArr as $hookObj) {\n \t \t\tif (method_exists($hookObj, 'editSelectStatement')) {\n \t \t\t\t$select = $hookObj->editSelectStatement($select, $userId, $addressType, $this);\n \t \t\t}\n \t \t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\t'tt_address',\n\t\t\t$select,\n\t\t\t'',\n\t\t\t'tx_commerce_is_main_address desc'\n\t\t);\n\n\t\t$result = array();\n\t\twhile ($address = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$result[$address['uid']] = tx_commerce_div::removeXSSStripTagsArray($address);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getaddressesbyaccount($account = ''){\n return $this->bitcoin->getaddressesbyaccount($account);\n }", "public function getContactsList() {\n return $this->_get(7);\n }", "public function address()\n {\n return $this->belongsToMany(Address::class, 'address_user', 'user_id', 'address_id');\n }" ]
[ "0.6976132", "0.69164824", "0.6807836", "0.67456234", "0.67456234", "0.67003393", "0.6654495", "0.6609099", "0.65740657", "0.6525917", "0.65118945", "0.65118945", "0.65118945", "0.64756763", "0.64585054", "0.6455332", "0.639679", "0.6394862", "0.63578767", "0.6319674", "0.62877107", "0.6210491", "0.6150103", "0.6107063", "0.6086482", "0.6047504", "0.60057473", "0.5958789", "0.59173495", "0.59019166", "0.5878361", "0.58598465", "0.585243", "0.5841572", "0.5841572", "0.5811745", "0.5801829", "0.5792812", "0.5779048", "0.575885", "0.574994", "0.57373434", "0.5737191", "0.56818765", "0.5675642", "0.5671002", "0.5656197", "0.5641839", "0.5637508", "0.5636246", "0.5628139", "0.5619163", "0.56140393", "0.56131357", "0.5609199", "0.55731225", "0.55731225", "0.55444825", "0.5542188", "0.55416685", "0.5526742", "0.5525442", "0.5522028", "0.5509114", "0.5506567", "0.549672", "0.5496687", "0.54866767", "0.54843026", "0.5459547", "0.5457205", "0.5445059", "0.54303074", "0.5424365", "0.541925", "0.5394474", "0.53609025", "0.53603816", "0.5360216", "0.53592074", "0.5357033", "0.53524035", "0.53455985", "0.5344431", "0.53384316", "0.5334706", "0.5334172", "0.533111", "0.532903", "0.5313684", "0.5313254", "0.5310982", "0.5309684", "0.5304946", "0.5302891", "0.53027844", "0.52806", "0.5278907", "0.52762246", "0.5269486" ]
0.7773257
0
get locations associated to this company
public function getLocations(){ $table = new Yourdelivery_Model_DbTable_Locations(); $locationRows = $table->fetchAll(sprintf('companyId = %d AND deleted = 0' , $this->getId())); $locations = new SplObjectStorage(); foreach($locationRows as $locationRow){ try{ $loc = new Yourdelivery_Model_Location($locationRow['id']); $locations->attach($loc); }catch(Yourdelivery_Exception_Database_Inconsistency $e){ $this->logger->err(sprintf('Could not create location #', $locationRow['id'])); continue; } } return $locations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddresses() {\n $table = new Yourdelivery_Model_DbTable_Locations();\n return $table->fetchAll('companyId = ' . $this->getId());\n }", "function erp_company_get_locations() {\n global $wpdb;\n\n $cache_key = 'erp_company-location';\n $locations = wp_cache_get( $cache_key, 'wp-erp' );\n\n if ( false === $locations ) {\n $locations = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}erp_company_locations\" );\n wp_cache_set( $cache_key, $locations, 'wp-erp' );\n }\n\n return $locations;\n}", "function findAllLocations() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM locations;'));\r\n\r\n\t}", "public function getLocations()\n {\n return $this->locations;\n }", "public function getLocations()\n {\n return isset($this->Locations) ? $this->Locations : null;\n }", "public function getHotelLocation()\n {\n return $this->select('city')->groupBy('city')->orderBy('city', 'ASC')->findAll();\n }", "public function getAllLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.locations');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('f.*, u.full_name, u.user_name, u.country_iso')\n\t\t\t\t->from(Phpfox::getT('gmap'), 'f')\t\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.user_id = f.user_id')\t\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\t$aOutput = array();\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\tforeach($aRows as $aRow)\n\t\t{\n\t\t\t$aOutput[$aRow['country_iso']][] = $aRow;\n\t\t}\n\t\treturn $aOutput;\n\t}", "public function companyOfUser(){\n\n $company = Auth::user()->companies;\n $location = Location::where('id', Auth::user()->company_location)->get();\n \n foreach($company as $c){\n $c['locations'] = $location;\n }\n\n return $company;\n }", "public function getLocations(): array\n {\n $arrLocations = array();\n $objLocations = ContaoEstateManager\\ProviderModel::findAll();\n\n if ($objLocations === null)\n {\n return $arrLocations;\n }\n\n while ($objLocations->next())\n {\n $arrLocations[ $objLocations->id ] = $objLocations->postleitzahl . ' ' . $objLocations->ort . ' (' . $objLocations->firma . ')';\n }\n\n return $arrLocations;\n }", "public function get_locations() {\n $this->db->select('*');\n $this->db->from('locations');\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "public function getLocations(){\n\n return response()->json( $this->locations );\n\n }", "public function getAll()\n {\n return $this->apiRequest('application/locations');\n }", "public function getLocations()\n {\n return $this->tpLocations;\n }", "public static function getCampaignLocations()\n {\n return self::$db->fetchAll(\n 'SELECT banner_location_id AS value, description AS text FROM website.banner_location'\n );\n }", "public static function getLocations(): array\n {\n return static::$locations;\n }", "public function locations()\n {\n $data = $this->request('POST', 'api/v1/date/locations');\n return $data;\n }", "private function get_cities_origin() {\n $t_location = get_transient('wcis_location');\n return $t_location['cities'];\n }", "public function get_location()\r\n\t\t{\r\n\t\t\t$retArr = $this->obj->getBasics();\r\n\r\n\t\t\treturn $retArr;\r\n\t\t}", "public function findAllWithLocations()\n {\n $query = $this->createQuery();\n $fieldName = ((bool)ConfigurationUtility::getExtensionConfiguration()['enableFilterCategories']) ? 'filter_categories' : 'categories';\n $query->statement('\n SELECT DISTINCT\n sys_category.*\n FROM\n sys_category\n JOIN\n sys_category_record_mm\n ON sys_category_record_mm.uid_local = sys_category.uid\n WHERE\n sys_category_record_mm.tablenames = \"tx_locationmanager_domain_model_location\" AND\n sys_category_record_mm.fieldname = \"' . $fieldName . '\"\n GROUP BY\n sys_category.uid\n ');\n return $query->execute();\n }", "public function getPlaces();", "public static function get( ) {\n\t\t$StaffLocations = Client::request('staff/location');\n\t\t$StaffLocations = $StaffLocations['resultList'];\n\n\t\treturn array_map( function($StaffLocation){\n\n\t\t\treturn new StaffLocation($StaffLocation);\n\n\t\t}, $StaffLocations);\n\t}", "public function all_locations() {\n\t\t// Globals\n\t\tglobal $wpdb;\n\t\t\n\t\t// Load the location from the db\n\t\t$sql = \"SELECT * FROM `\" . rpids_tableprefix() . \"rpids_locations` ORDER BY `location` ASC;\";\n\t\t$sqlret = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\n\t\t// Set the return array\n\t\t$return = new StdClass();\n\t\t\n\t\t// Loop through each result and process\n\t\tforeach( $sqlret as $location ) {\n\t\t\t// Group IDs are stored as an array. Make sure it is actually an array.\n\t\t\t$location['groups'] = rpids_unserialize( $location['groups'] );\n\t\t\t\n\t\t\t// Add location info to an array\n\t\t\t$return->$location['id'] = new StdClass();\n\t\t\t$return->$location['id']->id = $location['id'];\n\t\t\t$return->$location['id']->name = $location['location'];\n\t\t\t$return->$location['id']->groups = (object) $location['groups'];\n\t\t\t$return->$location['id']->weather_id = $location['weather_id'];\n\t\t\t$return->$location['id']->layout_id = $location['layout_id'];\n\t\t}\n\t\t\n\t\t// Return everything as an object\n\t\treturn $return;\n\t}", "public function getAllLocations() {\n\t\t$query = $this->db->select(\"\n\t\t\tRoom.RoomID,\n\t\t\tRoomAbbr,\n\t\t\tRoomName,\n\t\t\tBuildingAbbr,\n\t\t\tRoom.IsApproved,\n\t\t\tBuilding.MapURL,\n\t\t\tOperators\")->\n\t\tfrom('Room')->\n\t\tjoin('Building', 'Building.BuildingID = Room.BuildingID')->\n\t\tjoin(\"\n\t\t\t(SELECT r.RoomID, GROUP_CONCAT(CONCAT(UserFname, ' ', UserLname)) AS Operators\n\t\t\tFROM User u\n\t\t\t\tJOIN UserRole ur ON u.UserID = ur.UserID\n\t\t\t\tJOIN UserRoom urm ON ur.UserRoleID = urm.UserRoleID\n\t\t\t\tJOIN Room r ON r.RoomID = urm.RoomID\n\t\t\tGROUP BY r.RoomID) AS other\", 'other.RoomID = Room.RoomID', 'left')->\n\t\tget();\n\n\t\treturn $query->result_array();\n\t}", "public function locations($params)\r\n {\r\n \t$_query = array('page' => isset($params['page']) ? $params['page'] : 1);\r\n\r\n return $this->curl_execute($method = 'locations', $_query);\r\n }", "public function getAllLocation($admin = false)\n {\n if ($admin) {\n return $this->deliveryLocation->all();\n }\n return $this->deliveryLocation->where('status', 1)->get();\n\n }", "public function getAllCountriesLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.countries');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people')\n\t\t\t\t->from(Phpfox::getT('gmap_countries'), 'fc')\t\t\n\t\t\t\t->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso')\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.country_iso = fc.country_iso')\n\t\t\t\t->join(Phpfox::getT('gmap'), 'f', 'u.user_id = f.user_id')\n\t\t\t\t->group('u.country_iso')\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\t{\n\t\t\tforeach($aRows as $key => $aRow)\n\t\t\t{\n\t\t\t\tif(isset($aRow['phrase_var_name']) && $aRow['phrase_var_name'] != '')\n\t\t\t\t{\n\t\t\t\t\t$aRows[$key]['name'] = Phpfox::getPhrase($aRow['phrase_var_name']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$aRows = $this->sortByProperty($aRows, 'name');\n\t\t}\n\t\t\n\t\treturn $aRows;\n\t}", "public function getall()\r\n {\r\n $locations = array();\r\n $count = 0;\r\n \r\n foreach($this->all() as $location)\r\n {\r\n $location = (array)$location;\r\n \r\n $locations[] = array('id' => $location['id'], 'name' => $location['name'],\r\n 'caption' => $location['caption'], 'description' => $location['description'],\r\n 'address' => $location['address'],\r\n 'contact' => $location['contact'],\r\n 'image1' => $location['image1'], 'image2' => $location['image2'],\r\n 'image3' => $location['image3'], 'image4' => $location['image4']);\r\n $count++;\r\n \r\n }\r\n \r\n if ($count > 0)\r\n {\r\n return $locations;\r\n }\r\n else\r\n {\r\n return null;\r\n } \r\n }", "public function locations()\n {\n return $this->hasMany(Location::class, 'project_id');\n }", "public function location(): array\n {\n return $this->location;\n }", "public function locations()\n {\n return $this->hasMany(Location::class);\n }", "public function findAll()\n {\n return $this->em\n ->getRepository('App:Location')\n ->findAll()\n ;\n }", "public function locations() {\n return $this->hasMany(Location::class);\n }", "public function get()\r\n {\r\n return $this->location->with('services')->get();\r\n }", "private function get_locations_repositry() {\n\t\t\t$this->wpseo_local_locations_repository = new WPSEO_Local_Locations_Repository();\n\t\t}", "public function category_locations(){\n $categories = Category::withCount(['ads', 'adds'])->get();\n $locations = Location::withCount(['ads', 'adds'])->get();\n return response()->json([\n 'categories' => $categories,\n 'locations' => $locations,\n ]);\n }", "public function locations()\n {\n return $this->hasMany(Location::class, 'data_source_id');\n }", "public function getCityList() {\n\t\treturn $this->getByKey(Config::get('constants.KEY_CITY'));\n\t}", "public function getLocations()\n {\n $conds = new CondsList();\n $conds->subjoin(new Param('post_type', '==', 'post'));\n $conds->subjoin(new Param('post_type', '==', 'page'));\n\n return $conds->toArray();\n }", "public function getLocations($countryCode = null, $onlyConnected = false)\n {\n /** @var Oggetto_GeoDetection_Model_Directory_Fetcher $directoryFetcher */\n $directoryFetcher = Mage::getModel('oggetto_geodetection/directory_fetcher');\n\n $locations = $directoryFetcher->getRegionsAndCities($countryCode, $onlyConnected);\n\n if (!$locations) {\n /** @var Oggetto_GeoDetection_Model_Directory_Converter $converterModel */\n $converterModel = Mage::getModel('oggetto_geodetection/directory_converter');\n\n /** @var Oggetto_GeoDetection_Model_Location_Fetcher $locationModel */\n $locationModel = Mage::getModel('oggetto_geodetection/location_fetcher');\n\n $locations = $locationModel->getRegionsAndCities($countryCode, $onlyConnected);\n $locations = $converterModel->convertLocationsToDirectoryRegions($locations);\n }\n\n return $locations;\n }", "public function getLocations()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Location (Linnworks API)');\n\t\t}", "public function listLocations(): ApiResponse\n {\n $_reqBuilder = $this->requestBuilder(RequestMethod::GET, '/v2/locations')->auth('global');\n\n $_resHandler = $this->responseHandler()->type(ListLocationsResponse::class)->returnApiResponse();\n\n return $this->execute($_reqBuilder, $_resHandler);\n }", "private function get_location () {\n try {\n // MaxMind GeoIP lookup\n // See: http://maxmind.github.io/GeoIP2-php/\n $reader = new Reader('assets/GeoLite2-City.mmdb');\n $record = $reader->city($_SERVER['REMOTE_ADDR']);\n return [\n 'lat' => $record->location->latitude,\n 'lng' => $record->location->longitude\n ];\n } catch (Exception $e) {\n return false;\n }\n }", "public function getLocation()\n {\n return $this->getLocationData();\n }", "public function getSitesWithGeoInfo() {\n //Note - we remove any site with 0,0 as it's location, as we have no\n //sites in the middle of the pacific ocean. We also remove sites with\n //invaid (too large) longs and lats (these are legacy values, new values\n // entered through the webportal have to be within expected range,\n // historical values may not)\n $dql = \"SELECT s\n FROM Site s\n JOIN s.certificationStatus c\n WHERE s.latitude IS NOT NULL\n AND s.longitude IS NOT NULL\n AND c.name != 'Closed'\n AND (s.latitude != 0 OR s.longitude != 0)\n AND s.latitude <= 90\n AND s.latitude >= -90\n AND s.longitude <= 180\n AND s.longitude >= -180\";\n\n $sites = $this->em\n ->createQuery($dql)\n ->getResult();\n\n return $sites;\n }", "public function the_locations() {\n\n // Verify if locations exists\n if ( self::$the_locations ) {\n\n // Set all locations\n return self::$the_locations;\n\n } else {\n\n return false;\n\n }\n\n }", "public function pickupLocations(): array\n {\n $pickupLocations = PickupLocation::all();\n\n return [\n 'status' => 1,\n 'pickup_locations' => $pickupLocations,\n ];\n }", "public function listLocations()\n {\n $response = $this->_performRequest(self::OP_LOCATIONS);\n\n \tif ($response->isSuccessful()) {\n\t\t\t$result = $this->_parseResponse($response);\n\n \t\tif (!$result->Location) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t if (count($result->Location) > 1) {\n \t\t $xmlServices = $result->Location;\n \t\t} else {\n \t\t $xmlServices = [$result->Location];\n \t\t}\n\n\t\t\t$services = [];\n\t\t\tif (!is_null($xmlServices)) {\n\n\t\t\t\tfor ($i = 0; $i < count($xmlServices); $i++) {\n\t\t\t\t\t$services[] = new Zend_Service_WindowsAzure_Management_LocationInstance(\n\t\t\t\t\t (string)$xmlServices[$i]->Name\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $services;\n\t\t} else {\n\t\t\trequire_once 'Zend/Service/WindowsAzure/Management/Exception.php';\n\t\t\tthrow new Zend_Service_WindowsAzure_Management_Exception($this->_getErrorMessage($response, 'Resource could not be accessed.'));\n\t\t}\n }", "protected function _get_locations($org_id)\n {\n\t\t\t$request = Request::factory('http://'.Servers::$api_server.\"/locations?org_id=$org_id\")\n\t\t\t\t->method(Request::GET)\n\t\t\t\t->headers('Content-Type', 'application/json');\n\t\t\t$markets = json_decode($request->execute(),true);\n\t\t\t\n\t\t\treturn json_decode($request->execute(),true);\n\t\t\t\n\n }", "public function getSalesCenterLocations(Request $request)\n {\n $client_id = $request->client_id;\n $salescenter_id = $request->salescenter_id;\n if(Auth::user()->access_level == 'sales_center') {\n $salescenter_id = Auth::user()->salescenter_id;\n }\n\n $locations = Salescenterslocations::where('status','active')->orderBy('name');\n if(!empty($client_id)) {\n $locations->where('client_id',$client_id);\n }\n if(!empty($salescenter_id)) {\n $locations->where('salescenter_id',$salescenter_id);\n }\n /* check user has multiple locations */\n if (auth()->user()->hasMultiLocations()) {\n $locationIds = auth()->user()->locations->pluck('id');\n $locations->whereIn('id', $locationIds);\n }\n /* check location level restriction */\n if(Auth::user()->isLocationRestriction()) {\n $locationId = Auth::user()->location_id;\n $locations->where('id',$locationId);\n }\n $locations =$locations->get();\n $res_options = \"\";\n if(!empty($locations)){\n foreach($locations as $location){\n $res_options.=\"<option value=\\\"{$location->id}\\\" >\".$location->name.\"</option>\";\n }\n }\n $response = array(\n 'status' => 'success',\n 'options' => $res_options,\n );\n return \\Response::json($response);\n }", "public function get_locations_officers()\n {\n $items = array();\n $scope = get_post('scope');\n \n if ($scope) {\n\n if ((int)$scope !== 1 && !get_post('location_code')) {\n\n $return_data = array(\n 'status' => false,\n 'message' => 'Location is required.'\n );\n\n } else {\n \n $departments = $this->getDepartment(get_post('keyword'));\n foreach ($departments as $department) {\n\n // get main department locations if has any\n // main has no sub department id\n $locationWhere = array(\n 'deletedAt IS NULL',\n 'DepartmentID' => $department['id'],\n 'SubDepartmentID' => 0, \n 'LocationScope' => $scope\n );\n // not national\n if ((int)$scope !== 1) {\n $locationWhere['LocationCode'] = get_post('location_code');\n }\n\n $location = $this->mgovdb->getRecords('Dept_ScopeLocations', $locationWhere, 'id', array(1));\n if (count($location)) {\n $location = $location[0];\n $location['officers'] = $this->departmentdb->getDepartmentOfficer($location['id'], 'DepartmentLocationID');\n } else {\n $location = false;\n }\n $department['location'] = $location;\n\n $subDepartments = array();\n foreach ($department['subDepartment'] as $subDepartment) {\n // get sub department locations if has any\n $locationWhere = array(\n 'deletedAt IS NULL',\n 'DepartmentID' => $department['id'],\n 'SubDepartmentID' => $subDepartment['id'], \n 'LocationScope' => $scope\n );\n\n // not national\n if ((int)$scope !== 1) {\n $locationWhere['LocationCode'] = get_post('location_code');\n }\n\n $location = $this->mgovdb->getRecords('Dept_ScopeLocations', $locationWhere, 'id', array(1));\n if (count($location)) {\n $location = $location[0];\n $location['officers'] = $this->departmentdb->getDepartmentOfficer($location['id'], 'DepartmentLocationID');\n } else {\n $location = false;\n }\n\n $subDepartment['location'] = $location;\n\n if (get_post('result_filter') == 1) {\n // all active\n if ($subDepartment['location'] != false && $subDepartment['location']['Status']) {\n $subDepartments[] = $subDepartment;\n }\n } else if (get_post('result_filter') == 2) {\n // active with officer\n if ($subDepartment['location'] != false && $subDepartment['location']['Status'] && $subDepartment['location']['officers'] != false) {\n $subDepartments[] = $subDepartment;\n }\n } else if (get_post('result_filter') == 3) {\n // active without officer\n if ($subDepartment['location'] != false && $subDepartment['location']['Status'] && $subDepartment['location']['officers'] == false) {\n $subDepartments[] = $subDepartment;\n }\n } else if (get_post('result_filter') == 4) {\n // inactive\n if ($subDepartment['location'] == false || ($subDepartment['location'] != false && $subDepartment['location']['Status'] == 0)) {\n $subDepartments[] = $subDepartment;\n }\n } else {\n // show all\n $subDepartments[] = $subDepartment;\n }\n }\n\n $department['subDepartment'] = $subDepartments;\n\n $exclude = true;\n // if no sub department. also filter main department result\n if (get_post('result_filter') == 1) {\n // all active\n if ($department['location'] != false && $department['location']['Status']) {\n $items[] = $department;\n $exclude = false;\n }\n } else if (get_post('result_filter') == 2) {\n // active with officer\n if ($department['location'] != false && $department['location']['Status'] && $department['location']['officers'] != false) {\n $items[] = $department;\n $exclude = false;\n }\n } else if (get_post('result_filter') == 3) {\n // active without officer\n if ($department['location'] != false && $department['location']['Status'] && $department['location']['officers'] == false) {\n $items[] = $department;\n $exclude = false;\n }\n } else if (get_post('result_filter') == 4) {\n // inactive\n if ($department['location'] == false || ($department['location'] != false && $department['location']['Status'] == 0)) {\n $items[] = $department;\n $exclude = false;\n }\n } else {\n // show all\n $items[] = $department;\n $exclude = false;\n }\n\n if (count($subDepartments) && $exclude) {\n $department['hideParent'] = true;\n $items[] = $department;\n }\n\n }\n\n if (count($items)) {\n $return_data = array(\n 'status' => true,\n 'data' => $items\n );\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'No record found.'\n );\n }\n\n }\n\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Scope is required.'\n );\n }\n\n response_json($return_data);\n }", "public function locations()\n {\n return $this->hasMany('App\\Location');\n }", "public function get_scope_locations()\n { \n response_json(lookup_scope_locations(get_post('scope')));\n }", "public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }", "protected function _get_locations_by_creative($creative_id)\n {\n\t\t\t$request = Request::factory('http://'.Servers::$api_server.\"/creatives/$creative_id/locations\")\n\t\t\t\t->method(Request::GET)\n\t\t\t\t->headers('Content-Type', 'application/json');\n\t\t\n\t\t\treturn json_decode($request->execute(),true);\n\n }", "public function getLocation()\n {\n return $this->get('location');\n }", "public function main_locations(){\n $locations = Location::whereNull('parent_id')->get();\n }", "abstract function getBaseLocations();", "public function actionLocation() {\n $term = trim($_GET['term']);\n $bGeonames = (isset($_GET['geonames'])) ? true : false;\n $results = array();\n $geonamesUrl = \"http://api.geonames.org/searchJSON?maxRows=10&lang=de&username=wkoller&style=medium\";\n\n if ($bGeonames) {\n // Construct service URL\n $geonamesUrl = $geonamesUrl . \"&q=\" . urlencode($term);\n // Fetch service response\n $service_response = file_get_contents($geonamesUrl);\n if ($service_response) {\n // Decode data\n $service_data = json_decode($service_response, true);\n\n // Save response data in location table\n foreach ($service_data['geonames'] as $geoname) {\n // Check if we already have any entry\n $model_location = null;\n $model_locationGeonames = LocationGeonames::model()->find('geonameId=:geonameId', array(':geonameId' => $geoname['geonameId']));\n if ($model_locationGeonames != null) {\n $model_location = Location::model()->findByPk($model_locationGeonames->id);\n\n // update model with new location description\n $model_location->location = $geoname['name'] . ' (' . $geoname['adminName1'] . ', ' . $geoname['countryName'] . ')';\n $model_location->save();\n } else {\n // Create location model & save it\n $model_location = new Location;\n $model_location->location = $geoname['name'] . ' (' . $geoname['adminName1'] . ', ' . $geoname['countryName'] . ')';\n $model_location->save();\n // Create according geonames model & save it as well\n $model_locationGeonames = new LocationGeonames;\n $model_locationGeonames->id = $model_location->id;\n $model_locationGeonames->service_data = serialize($geoname);\n $model_locationGeonames->geonameId = $geoname['geonameId'];\n $model_locationGeonames->countryCode = $geoname['countryCode'];\n $model_locationGeonames->save();\n }\n\n // Add response to results\n $results[] = array(\n \"label\" => $model_location->location,\n \"value\" => $model_location->location,\n \"id\" => $model_location->id,\n \"countryCode\" => $model_locationGeonames->countryCode\n );\n }\n }\n } else {\n // Find all fitting entries in location table\n $models_location = Location::model()->findAll('location LIKE :location', array(':location' => $term . '%'));\n if ($models_location != NULL) {\n foreach ($models_location as $model_location) {\n $results[] = array(\n \"label\" => $model_location->location,\n \"value\" => $model_location->location,\n \"id\" => $model_location->id,\n );\n }\n }\n }\n\n // Output results as service response\n $this->serviceOutput($results);\n }", "public function get_locations()\n {\n $this->db->select('location_id,area');\n $query = $this->db->get($this->location);\n if ($query->num_rows() > 0) \n {\n return $query->result_array();\n }\n else\n {\n return FALSE;\n } \n \n }", "public function get_loc()\n {\n\n return $this->db->get('LOCATION_TYP')->result();\n\n }", "public function getLocationList($return_active_only = TRUE);", "public function get_locations($nodes);", "public function getLocation()\n {\n return $this->apiLocation === 'Yahoo' ? $this->getLocationYahoo() : $this->getLocationGoogle();\n }", "public function locais()\n {\n return $this->em->createQuery('\n SELECT\n e.id, e.nome\n FROM\n Novosga\\Model\\Local e\n ORDER BY\n e.nome ASC\n ')->getResult();\n }", "public function locations(){\n\t\treturn $this->hasMany('App\\Location');\n\t}", "public function getLocation();", "public function getLocation();", "public static function getSimple( ) {\n\t\t$staffLocations = Client::request('staff/location');\n\n\t\t$staffLocations = array_map(function($location){\n\t\t\treturn $location['name'];\n\t\t}, $staffLocations);\n\n\t\treturn $staffLocations;\n\t}", "public function index()\n {\n $lat = Input::get('lat');\n $lon = Input::get('lon');\n\n $locations = Location::getNearbyLocations($lat, $lon);\n\n return response()->json($locations);\n }", "public function getCityList() {\n return $this->_get(2);\n }", "static function getLocation(LocationResult $p_data): Array\n {\n $l_id_parent = null;\n $l_location = null;\n $l_locations = [];\n foreach ($p_data->getLocationData() as $l_type => $l_name) {\n $l_location = self::getLocationModel($l_id_parent, $l_type, $l_name);\n $l_locations[] = $l_location;\n $l_id_parent = $l_location->id;\n }\n return $l_locations;\n }", "public function locations()\n {\n $locations = Locations::with('Countries:name')->get();\n // dd($locations);\n\n foreach ($locations as $location) {\n $sublocation = Locations::where('location_id', $location->sublocation_id)->get();\n $location['sublocations'] = $sublocation;\n }\n return view('setup.location.locations', compact('locations', 'sublocation'));\n }", "public static function getProductLocations($productID,$cityID) {\n //echo \"product_id == \".$productID.\" , city = \".$cityID; die;\n $queryResult = DB::table('product_vendor_locations as pvl')\n ->leftJoin(DB::raw('vendor_location_address as vla'),'vla.vendor_location_id','=','pvl.vendor_location_id')\n ->leftJoin('locations as l1', 'l1.id','=','vla.area_id')\n ->leftJoin('locations as l2', 'l2.id','=','vla.city_id')\n ->leftJoin('locations as l3', 'l3.id','=','vla.state_id')\n ->select('pvl.id as vendor_location_id','l1.name as area','l2.name as city','l3.name as state_name','vla.address','vla.pin_code','vla.latitude','vla.longitude')\n ->where('pvl.product_id',$productID)\n ->where('vla.city_id',$cityID)\n ->get();\n \n //array to hold location details\n $arrLocation = array();\n if($queryResult) {\n foreach($queryResult as $row) {\n\n $arrLocation[] = array(\n \"vendor_location_id\" => $row->vendor_location_id,\n \"address_line\" => $row->address,\n \"area\" => $row->area,\n \"city\" => $row->city,\n \"pincode\" => $row->pin_code,\n \"state\" => $row->state_name, \n //\"country\" => $row->country,\n \"latitude\" => $row->latitude,\n \"longitude\" => $row->longitude \n\n );\n }\n } \n return $arrLocation;\n }", "public function index()\n {\n $owner_id = auth()->user()->id;\n $company_id = CarCompany::where('owner_id', '=', $owner_id)->first()->id;\n $locations = Location::where('company_id', '=', $company_id)->get();\n\n return view('/company/location', ['displays' => $locations]);\n }", "private function getWorkAddressesBaseOnCurrentWorkLocation()\n {\n $chosen_work_location = session('current_work_location');\n\n $work_address_list = null;\n\n if ($chosen_work_location == \"all\") {\n\n $work_address_list = Auth::user()->company->workAddresses()->workLocationEnable();\n\n } elseif (is_array($chosen_work_location)) {\n\n $work_address_list = Auth::user()->company->workAddresses()->workLocationEnable()->whereIn('work_location_id', $chosen_work_location);\n\n } else {\n\n $work_address_list = Auth::user()->company->workAddresses()->where('work_location_id', $chosen_work_location);\n }\n\n return $work_address_list;\n }", "public function location()\n { \n return $this->attributes['type'] == 'country' \n ? $this->hasOne(Country::class, 'id', 'location_id') \n : $this->hasOne(City::class, 'id', 'location_id');\n }", "function LocationDropdownList()\n\t{\t$loc_list = array();\n\t\t\n\t\tif ($locations = $this->GetLocations())\n\t\t{\tforeach ($locations as $location)\n\t\t\t{\t$loc_list[$location->id] = $location->details[\"loctitle\"];\n\t\t\t}\n\t\t}\n\t\t//print_r($this);\n\t\treturn $loc_list;\n\t}", "public function ddl_location()\r\n\t\t{\r\n\t\t\t\t$link = $this->connect();\r\n\t\t\t\t$query = \"SELECT loc_name, \r\n\t\t\t\t\t\t\tloc_id,\r\n\t\t\t\t\t\t\taddress \r\n\t\t\t\t\t\tFROM location\";\r\n\t\t\t\t$result = mysqli_query($link, $query) or die(mysqli_error($link));\r\n\t\t\t\t$loc = array();\r\n\t\t\t\t$arr_loc = array();\r\n\t\t\t\twhile ($row = mysqli_fetch_row($result)) {\r\n\t\t\t\t\t\t$loc['loc_name'] = $row[0];\r\n\t\t\t\t\t\t$loc['loc_id'] = $row[1];\r\n\t\t\t\t\t\t$loc['address'] = $row[2];\r\n\t\t\t\t\t\t$arr_loc[] = $loc;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn $arr_loc;\r\n\t\t}", "public function getLocations($city_id)\n\t{\n\t\ttry\n {\n\t\t $select = $this->getDbTable()->select()\n\t\t\t ->where('city_id=?',$city_id)\n\t\t\t ->where('status = ?', true)\n\t\t\t ->order('description ASC');\n\t\t\t$records = $this->getDbTable()->fetchAll($select);\n\t\t\t$locaationdata=Array();\t\n\t\t\t$locationdata[0]= array('value'=>'','key'=>'Select Location');\t\t\n\t\t\tforeach($records as $record)\n\t\t\t{\n\t\t\t\t$locationdata[] = array('key'=>$record['description'],'value'=>$record['id']);\t\n\t\t\t}\t\n\t\t\treturn $locationdata;\n\t\t}\n\t\tcatch (Exception $ex){\n\t\t\tthrow new Exception($ex->getMessage()) ;\n\t\t}\n\t}", "public function locations()\n {\n return $this->morphMany(Location::class,'trackable','trackable_type','trackable_id','uuid');\n }", "private function getLocation(){\n \n $location = [];\n $node = $this->getNode();\n $locationreference = $node->field_location_reference->entity;\n \n if($locationreference){\n $location = $locationreference->field_location->view(array('type' => 'LocationAddressFormatter', 'label' => 'hidden'));\n $location[0]['#prefix'] = '<i class=\"icon icon-home icon-smaller\"></i>';\n }\n \n return $location;\n \t\n }", "public function getMapSites()\n {\n return $this->map_sites;\n }", "public function index()\n {\n $invlocations = InvLocation::getAllInvLocation();\n return InvLocationResource::collection($invlocations);\n }", "private function mapping()\n {\n return Cache::remember('everflow-city-mapping', 30, function () {\n return (new EverflowMetadata)->cities()->cities;\n });\n }", "public function getLocation() { return $this->location; }", "public function getCities()\n {\n \treturn $this->citiesRepository->getCities();\n }", "public function getCompanyAddresses(Company $company)\n {\n $builder = $company->addresses()->getQuery();\n\n $resource = $this->datatable->setQueryBuilder($builder);\n\n return $resource->getResponse();\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public static function getProductLocations($productID,$product_vendor_location_id,$cityID) {\n //echo \"product_id == \".$productID.\" , city = \".$cityID; die;\n $queryResult = DB::table('product_vendor_locations as pvl')\n ->leftJoin(DB::raw('vendor_location_address as vla'),'vla.vendor_location_id','=','pvl.vendor_location_id')\n ->leftJoin('locations as l1', 'l1.id','=','vla.area_id')\n ->leftJoin('locations as l2', 'l2.id','=','vla.city_id')\n ->leftJoin('locations as l3', 'l3.id','=','vla.state_id')\n ->select('pvl.id as vendor_location_id','l1.name as area','l2.name as city','l3.name as state_name','vla.address','vla.pin_code','vla.latitude','vla.longitude')\n ->where('pvl.product_id',$productID)\n ->where('vla.city_id',$cityID)\n //->whereIn('pvl.status',array('Active','Hidden'))\n ->where('pvl.status','Active')\n //->orWhere('pvl.status','Hidden')\n ->get();\n \n //array to hold location details\n $arrLocation = array();\n if($queryResult) {\n foreach($queryResult as $row) {\n\n $arrLocation[] = array(\n \"vendor_location_id\" => $row->vendor_location_id,\n \"address_line\" => $row->address,\n \"area\" => $row->area,\n \"city\" => $row->city,\n \"pincode\" => $row->pin_code,\n \"state\" => $row->state_name, \n //\"country\" => $row->country,\n \"latitude\" => $row->latitude,\n \"longitude\" => $row->longitude \n\n );\n }\n } \n return $arrLocation;\n }", "function GetLocations(){\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare(\"SELECT location_id, name FROM location\");\n\t$query->execute();\n\t$result = $query->fetchAll(); //Fetching it\n\treturn $result;\n}", "public function getClientLocations($clid){\r\r\n\t\t\t$location = false;\r\r\n\t\t\t$dbhandle = $this->dbhandle();\r\r\n\t\t\tif ($dbhandle){\r\r\n\t\t\t\t$dbfound = $this->dbfound();\r\r\n\t\t\t\tif ($dbfound){\r\r\n\t\t\t\t\t$tablename = \"clientloc\";\r\r\n\t\t\t\t\t$tableExists = $this->tableExists($tablename);\r\r\n\t\t\t\t\tif ($tableExists){\r\r\n\t\t\t\t\t\t$active = \"active\";\r\r\n\t\t\t\t\t\t$eactive = $this->encode($active);\r\r\n\t\t\t\t\t\t$sql = \"SELECT `$tablename`.`id`, `$tablename`.`locid` FROM `$this->db`.`$tablename` WHERE `$tablename`.`clid` = '$clid' AND `$tablename`.`status` = '$eactive'\";\r\r\n\t\t\t\t\t\t$result = mysql_query($sql, $dbhandle);\r\r\n\t\t\t\t\t\tif ($result){\r\r\n\t\t\t\t\t\t\tif (mysql_num_rows($result) > 0){\r\r\n\t\t\t\t\t\t\t\t$i = 0;\r\r\n\t\t\t\t\t\t\t\twhile ($resarr = mysql_fetch_assoc($result)){\r\r\n\t\t\t\t\t\t\t\t\t$location[$i]['id'] = $resarr['id'];\r\r\n\t\t\t\t\t\t\t\t\t$location[$i]['locid'] = $this->decode($resarr['locid']);\r\r\n\t\t\t\t\t\t\t\t\t$i++;\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\treturn $location;\r\r\n\t\t}", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function locations()\n {\n return $this->belongsToMany('App\\Location', 'admin_location');\n }", "public function getAutoprovisioningLocations()\n {\n return $this->autoprovisioning_locations;\n }", "public function GetLocations(GetLocations $parameters)\n {\n return $this->__soapCall('GetLocations', array($parameters));\n }", "public function set_locations() {\n\t\t\t$this->locations = $this->wpseo_local_locations_repository->get( [], false );\n\t\t}", "public function locations()\n {\n return $this->belongsToMany(\n Locations::class,\n TripLocations::class,\n 'trip_id',\n 'location_id',\n 'id',\n 'id',\n );\n }", "public function getLocation()\r\n {\r\n return $this->location;\r\n }", "public function getAddressToLocationRelationships()\n {\n return $this->AddressToLocationRelationships;\n }", "public function location()\n {\n return $this->hasMany('App\\Location');\n }" ]
[ "0.73204905", "0.7269763", "0.715325", "0.7091369", "0.69753784", "0.68884516", "0.6781724", "0.6735656", "0.6646941", "0.6572236", "0.64921284", "0.64795774", "0.6343667", "0.63180554", "0.6298667", "0.6285085", "0.6283854", "0.62782335", "0.62691855", "0.62336695", "0.6228775", "0.6209962", "0.6169471", "0.6168867", "0.6111737", "0.61095774", "0.6107768", "0.61034596", "0.6078168", "0.6076685", "0.6059309", "0.6051516", "0.60502684", "0.59827816", "0.59738606", "0.5953469", "0.59357333", "0.59111685", "0.5899639", "0.58974624", "0.5880955", "0.5875733", "0.5858756", "0.5851801", "0.5848742", "0.58486027", "0.58474046", "0.5827842", "0.5813072", "0.5801344", "0.57986194", "0.5785727", "0.5780927", "0.57327545", "0.57305145", "0.57084715", "0.5687326", "0.5683905", "0.56662434", "0.56592906", "0.56405973", "0.56405175", "0.56328994", "0.56316066", "0.5631546", "0.56246674", "0.56246674", "0.56186646", "0.56068146", "0.5592698", "0.5588809", "0.5578595", "0.5572787", "0.5562594", "0.55461144", "0.5529964", "0.55246896", "0.55230206", "0.5518808", "0.5507502", "0.5507022", "0.55065084", "0.5481229", "0.547262", "0.54580843", "0.544965", "0.54491055", "0.5447309", "0.5441244", "0.54398346", "0.54271907", "0.54220057", "0.5420207", "0.5419739", "0.5411731", "0.54103196", "0.540592", "0.54052764", "0.5399864", "0.53961986" ]
0.7332577
0
gets all Budgets that are related to a given address
public function getBudgetsByAddressId($addressId) { $nnTable = new Yourdelivery_Model_DbTable_Company_Location(); $all = $nnTable->fetchAll('locationId = "' . $addressId . '"'); $collector = new SplObjectStorage(); foreach ($all AS $budget) { try { $budget = new Yourdelivery_Model_Budget($budget->id); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $collector->attach($budget); } return $collector; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddressBooks();", "public function getAddressBooks()\n {\n $response = $this->request('GET', 'addressbooks');\n\n return new Types\\AddressBook($response['addressBook']);\n }", "public function findAll()\n {\n return $this->em->getRepository(Address::class)->findAll();\n }", "public function getActiveAddressBooks();", "function getAddressBalances($address=null, $asset_list=null){\n global $counterparty;\n $balances = array();\n // Break asset list up into chunks of 500 (API calls with more than 500 assets fail)\n $asset_list = array_chunk($asset_list, 500);\n foreach($asset_list as $assets){\n // Lookup any balance for this address and asset\n $filters = array(array('field' => 'address', 'op' => '==', 'value' => $address),\n array('field' => 'asset', 'op' => 'IN', 'value' => $assets));\n $data = $counterparty->execute('get_balances', array('filters' => $filters, 'filterop' => \"AND\"));\n if(count($data)){\n $balances = array_merge($balances, $data);\n }\n }\n return $balances;\n}", "private function getAddresses()\n {\n $doctrine = $this->getDoctrine();\n\n /** @var \\Doctrine\\ORM\\QueryBuilder $qb */\n $qb = $doctrine\n ->getRepository('BadcowAddressBundle:BaseAddress')\n ->createQueryBuilder('a');\n\n $qb->add('where', $qb->expr()->orX(\n $qb->expr()->isNull('a.latitude'),\n $qb->expr()->isNull('a.longitude')\n ));\n\n return $qb->getQuery()->getResult();\n }", "function getBusinessAddresses($userId) {\r\n $sql = $this->db->prepare(\"SELECT addressid, postal FROM BUSINESS JOIN USER ON USER.businessID=BUSINESS.businessID WHERE UserID=:user_id\");\r\n $sql->execute(array('user_id' => $userId));\r\n $result = $sql->fetch(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "public function addresses()\n {\n return $this->hasMany('App\\Address');\n }", "public function getBillingAddresses()\n {\n return $this->morphMany(Address::class, 'addressable', ['type' => Address::TYPE_BILLING]);\n }", "public function addresses() {\n return $this->hasMany(Models\\Address::class);\n }", "public function getAddressesByAccount($account);", "public function getAll($person_id){\n $SQL = 'SELECT * FROM address_information JOIN country ON address_information.country_code = country.country_code WHERE person_id=:person_id';\n $STMT = self::$_connection->prepare($SQL);\n $STMT->execute(['person_id'=>$person_id]);\n $STMT->setFetchMode(\\PDO::FETCH_CLASS,'app\\\\models\\\\Address');\n return $STMT->fetchAll();//returns an array of all the records\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany('App\\Models\\Address', 'organization_id');\n }", "public function getBalances($address, $as_satoshis=false) {\n $result = $this->newAPIRequest('GET', '/balances/'.$address);\n $key = ($as_satoshis ? 'balancesSat' : 'balances');\n return $result[$key];\n }", "public function getAddresses() {\n $table = new Yourdelivery_Model_DbTable_Locations();\n return $table->fetchAll('companyId = ' . $this->getId());\n }", "public function ShipmentFrom_AddressList() {\n\t\treturn $this->db->get_results(\n\t\t\t\"SELECT * FROM wp_azlabs_address\", \n\t\t\tARRAY_A\n\t\t);\n\t}", "public function findAll() {\n $sql = \"SELECT * FROM budget\";\n $result = $this->db->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $budget = array();\n foreach ($result as $row) {\n $budgetID = $row['id'];\n $budget[$budgetID] = $this->buildBudget($row);\n }\n return $budget;\n }", "public function addresses()\n {\n return $this->hasMany('App\\Address')->where('is_editable', '=', true);\n }", "private function getAddresses()\n\t{\n\t\t\n\t\t$userID = $this->session->userID;\n\t\t$addresses = $this->dbConnection->prepareRecordSet(\"SELECT * FROM b_user_address WHERE user_id = ? AND record_status = 'A'\", $userID);\n\n\t\treturn $addresses;\n\t\t\n\t}", "public function address()\n {\n return $this->hasMany(Address::class, 'u_id', 'u_id')->orderBy('id');\n }", "public function addresses()\n {\n return $this->hasMany(\"FJR\\models\\AddressModel\", \"customer_id\");\n }", "function GetBusinesses()\n\t{\n\t\t$result = $this->sendRequest(\"GetBusinesses\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getAddresses() {\n\n\t\t$query = \"SELECT id, cap, street, name, city FROM agrishop__addresses WHERE profile_id = ? ;\";\n\n\t\t$options = [ 'types' => ['i'], 'params' => [Session::get('id')] ];\n\n\t\treturn $this->db->directQuery($query, $options) ?: [];\n\n\t}", "function getSubscribedAddressBooks() {\n $principalUriExploded = explode('/', $this->addressBookInfo['principaluri']);\n $path = 'addressbooks/' . $principalUriExploded[2] . '/' . $this->addressBookInfo['uri'];\n $id = $this->addressBookInfo['id'];\n\n $result = array_merge(\n $this->carddavBackend->getSharedAddressBooksBySource($id),\n $this->carddavBackend->getSubscriptionsBySource($path)\n );\n\n return $result;\n }", "public function getFiltersAddresses()\n {\n return $this->hasMany(FilterAddress::className(), ['address_id' => 'id']);\n }", "public function getaddressesbyaccount($account = ''){\n return $this->bitcoin->getaddressesbyaccount($account);\n }", "public function budgets()\n {\n return $this->hasMany(Budget::class);\n }", "function getAddresses($userId, $addressType = 0) {\n\t\t$select = 'tx_commerce_fe_user_id=' . intval($userId) . t3lib_Befunc::BEenableFields('tt_address');\n\n\t\tif ($addressType > 0) {\n\t\t\t$select.= ' AND tx_commerce_address_type_id=' . intval($addressType);\n\t\t} elseif (isset($this->conf['selectAddressTypes'])) {\n\t\t\t$select.= ' AND tx_commerce_address_type_id IN (' . $this->conf['selectAddressTypes'] . ')';\n\t\t} else {\n\t\t\t$this->addresses = array();\n\t\t\treturn;\n\t\t}\n\n\t\t$select.= ' AND deleted=0 AND pid=' . $this->conf['addressPid'];\n\n\t\t/** * Hook for adding select statement\n\t\t*/\n\t\t$hookObjectsArr = array();\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses'] as $classRef) {\n \t \t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n \t \t\t}\n \t \t}\n \t \tforeach($hookObjectsArr as $hookObj) {\n \t \t\tif (method_exists($hookObj, 'editSelectStatement')) {\n \t \t\t\t$select = $hookObj->editSelectStatement($select, $userId, $addressType, $this);\n \t \t\t}\n \t \t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\t'tt_address',\n\t\t\t$select,\n\t\t\t'',\n\t\t\t'tx_commerce_is_main_address desc'\n\t\t);\n\n\t\t$result = array();\n\t\twhile ($address = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$result[$address['uid']] = tx_commerce_div::removeXSSStripTagsArray($address);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function addresses()\n {\n return $this->hasMany(UserAddress::class);\n }", "public function getBorrowings();", "public function getAllBusinesses() {\n\t\t$em = $this->getEntityManager();\n\t\t$businesses = $em->createQueryBuilder()\n\t\t\t->select('b.businessID,b.costCenter,b.name')\n\t\t\t->from('Business', 'b')\n\t\t\t->orderBy('b.name')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"businesses\" => $businesses\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public function getObjects()\n {\n return $this->hasMany(Object::className(), ['address_id' => 'id']);\n }", "public function addresses()\n {\n return $this->hasMany('App\\PatientAddress');\n }", "public function findByUser($user_id)\n {\n return $this->em->getRepository(Address::class)->find(['user_id' => $user_id]);\n }", "public function getBudgets() {\n $table = new Yourdelivery_Model_DbTable_Company_Budgets();\n $all = $table->fetchAll('companyId = ' . $this->getId());\n $obj = new splObjectStorage();\n foreach ($all AS $budget) {\n try {\n $budget = new Yourdelivery_Model_Budget($budget->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $obj->attach($budget);\n }\n return $obj;\n }", "function fetchMultipleAddress()\n{\n\t$cf = new addressData();\n\t\n\t$data = array();\n\t$data['app_id'] = isset($_POST['app_id']) ? $_POST['app_id'] : '';\n\t$data['auth_token'] = isset($_POST['auth_token']) ? $_POST['auth_token'] : '';\n\t$data['domain_id'] = isset($_POST['domain_id']) ? $_POST['domain_id'] : '';\n \n\t$cf->fetchMultipleAddress($data);\n}", "function blockchain_get_address_totals($addresses) {\n $totals = array();\n \n foreach (explode(',',$addresses) as $address) {\n if (substr($address,1,1) != '#') {\n $_o_url = new URLScrape(\"http://blockchain.info/q/addressbalance/\" . $address);\n $totals[$address] = $_o_url->response;\n }\n }\n return $totals;\n}", "public function typesForCobertura()\n {\n return AddressType::all();\n }", "public function invoiceAddress() {\r\n $result = $this->clients->flatInvoice();\r\n foreach ($result as $key => $value) {\r\n $getAdress = $this->clients->companyAddress($value->CustomerCompanyID);\r\n $data = array('Params' => $getAdress[0]->Params);\r\n $response = $this->clients->invoiceAdressupdate($value->InvoiceID, $data);\r\n echo $response . \"<br/>\";\r\n }\r\n }", "public function get($addressId);", "function &getAll( )\n {\n $db =& eZDB::globalDatabase();\n $address_array = 0;\n \n $db->array_query( $address_array, \"SELECT * FROM eZAddress_Address\" );\n \n return $address_array;\n }", "public function queryAll($addressListUrl = null)\n {\n $result = file_get_contents($addressListUrl?$addressListUrl:$this->WAREHOUSE_ADDRESS_PATH);\n if (empty($result)){ return array(); }\n $array = json_decode($result, true);\n return $array;\n }", "public function getAccount($bitcoinaddress);", "public function getAddressData($ab_id)\n\t{\n\t\t$addressBookEntry = array();\n\t\t$addressBookQuery = 'SELECT * FROM `address_book` WHERE `address_book_id` = :ab_id';\n\t\t$addressBookQuery = strtr($addressBookQuery, array(':ab_id' => (int)$ab_id));\n\t\t$useDBCaching = false;\n\t\t$addressBookResult = xtc_db_query($addressBookQuery, 'db_link', $useDBCaching);\n\t\twhile($addressBookRow = xtc_db_fetch_array($addressBookResult))\n\t\t{\n\t\t\t$addressBookEntry = $addressBookRow;\n\t\t}\n\t\treturn $addressBookEntry;\n\t}", "public function findAllBooks()\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.findAllBooks\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //creates an array of education\n $books = Array();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //calls the find all method in the data service\n $books = $service->findAllBooks();\n \n //closes the connection\n $conn = null;\n \n //return the array\n return $books;\n \n MyLogger::info(\"Exiting OwnedBookBusinessService.findAllBooks\");\n }", "public function address()\n {\n return $this->belongsToMany(Address::class, 'address_user', 'user_id', 'address_id');\n }", "public function listBlbs($address = null, $name = null, $blbId = null, $bccId = null, $marker = null, $maxKeys = 1000, $options = array())\n {\n list($config) = $this->parseOptions($options, 'config');\n $params = array();\n if ($address !== null) {\n $params['address'] = $address;\n }\n if ($blbId !== null) {\n $params['blbId'] = $blbId;\n }\n if ($name !== null) {\n $params['name'] = $name;\n }\n if ($bccId !== null) {\n $params['bccId'] = $bccId;\n }\n if ($marker !== null) {\n $params['marker'] = $marker;\n }\n if ($maxKeys !== null) {\n $params['maxKeys'] = $maxKeys;\n }\n\n return $this->sendRequest(\n HttpMethod::GET,\n array(\n 'config' => $config,\n 'params' => $params,\n ),\n '/blb'\n );\n }", "public function getBillings($filter = null) {\n $billingTable = new Yourdelivery_Model_DbTable_Billing();\n $all = $billingTable->fetchAll('mode=\"company\" AND refId=\"' . $this->getId() . '\"');\n $storage = new splObjectStorage();\n foreach ($all AS $bill) {\n try {\n $bill = new Yourdelivery_Model_Billing($bill->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $storage->attach($bill);\n }\n return $storage;\n }", "public function getRates($address)\n {\n /** @var OnePica_AvaTax_Model_Sales_Quote_Address $address */\n $this->_lines = array();\n $this->setCanSendRequest(true); //reset flag\n\n $quote = $address->getQuote();\n $storeId = $quote->getStore()->getId();\n $transactionDate = $this->_convertGmtDate(Varien_Date::now(), $storeId);\n\n // Set up document for request\n $this->_request = $this->_getNewDocumentRequestObject();\n\n // set up header\n $header = $this->_getRequestHeaderWithMainValues($storeId, $address);\n $header->setDocumentCode('quote-' . $address->getId());\n $header->setTransactionDate($transactionDate);\n $header->setDefaultLocations($this->_getHeaderDefaultLocations($address));\n\n $this->_request->setHeader($header);\n\n $this->_addItemsInCart($address);\n $this->_addShipping($address);\n //Added code for calculating tax for giftwrap items (order)\n $this->_addGwOrderAmount($address);\n $this->_addGwPrintedCardAmount($address);\n\n //check to see if we can/need to make the request to Avalara\n $requestKey = $this->_genRequestKey();\n $makeRequest = empty($this->_rates[$requestKey]['items']);\n //@startSkipCommitHooks\n $makeRequest &= count($this->_lineToLineId) ? true : false;\n\n $makeRequest &= $this->_hasDestinationAddress();\n $makeRequest &= $address->getId() ? true : false;\n $makeRequest &= !isset($this->_rates[$requestKey]['failure']);\n //@finishSkipCommitHooks\n\n //make request if needed and save results in cache\n if ($makeRequest) {\n /** @var OnePica\\AvaTax16\\Document\\Response $result */\n $result = $this->_send($quote->getStoreId());\n $this->_rates[$requestKey] = array(\n 'timestamp' => $this->_getDateModel()->timestamp(),\n 'address_id' => $address->getId(),\n 'summary' => array(),\n 'items' => array(),\n 'gw_items' => array()\n );\n\n //success\n if (!$result->getHasError()) {\n foreach ($result->getLines() as $ctl) {\n /** @var OnePica\\AvaTax16\\Document\\Response\\Line $ctl */\n $id = $this->_getItemIdByLine($ctl);\n $code = $this->_getTaxArrayCodeByLine($ctl);\n $this->_rates[$requestKey][$code][$id] = array(\n 'rate' => $this->_getLineRate($ctl),\n 'amt' => $ctl->getCalculatedTax()->getTax(),\n 'jurisdiction_rates' => $this->_getItemJurisdictionRate($ctl)\n );\n }\n $this->_rates[$requestKey]['summary'] = $this->_getSummaryFromResponse($result);\n //failure\n } else {\n $this->_rates[$requestKey]['failure'] = true;\n }\n Mage::getSingleton('avatax/session')->setAvatax16Rates($this->_rates);\n }\n\n $rates = isset($this->_rates[$requestKey]) ? $this->_rates[$requestKey] : array();\n return $rates;\n }", "public function getBills()\n {\n return $this->hasMany(Bill::className(), ['cust_id' => 'id']);\n }", "public function getAddress()\n {\n //Read it as select * from address, person where address.relatedmodel_id = person.id AND person.id = customer.person_id\n //Thus when via is used second param in the link correspond to via column in the relation.\n return $this->hasOne(Address::className(), ['relatedmodel_id' => 'id'])\n ->where('relatedmodel = :rm AND type = :type', [':rm' => 'Person', ':type' => Address::TYPE_DEFAULT])\n ->via('person');\n }", "public function businesses()\n {\n return $this->belongsTo(\\Illuminate\\Support\\Facades\\Config::get('sitec.core.models.user', \\App\\Models\\User::class), 'business_id', 'id');\n }", "public function index()\n {\n return Address::all();\n }", "public function addresses()\n {\n return $this->morphMany(config('contactable.models.address', Address::class), 'addressable')\n ->orderBy('position', 'asc');\n }", "public function getTaxRulesByAddress( \\App\\Address $address = null )\n {\n // If no address, use default Company address\n if ( $address == null ) $address = \\App\\Context::getContext()->company->address;\n\n return $address->getTaxRules( $this->tax );\n }", "public function returnDepositAddresses(): DepositAddresses\n {\n $depositAddresses = new DepositAddresses();\n foreach ($this->request('returnDepositAddresses') as $coin => $address) {\n $depositAddresses->addresses[$coin] = $address;\n }\n\n return $depositAddresses;\n }", "public function getDepositAddresses() {\n return $this->trading([\n 'command' => 'returnDepositAddresses',\n ]);\n }", "public function bills()\n {\n return $this->hasMany(Bill::class, 'bil_booking');\n }", "public function billingAddress()\n {\n return $this->belongsTo('App\\Address');\n }", "public function related() {\n\t\t$query = $this->request->params['named'];\n\t\tif (empty($query)) {\n\t\t\tthrow new NotFoundException('No Parameters');\n\t\t}\n\t\t$this->set('businesses', $this->Business->find('all', ['conditions' => $query]));\n\t}", "public function billingaddress()\n {\n return $this->belongsTo('App\\Models\\BookAddress','billing_address_id');\n }", "public function getAllUsersWithAddressProfile()\n {\n return $this->createQueryBuilder('u')\n ->where('u.state IS NOT NULL')\n ->andWhere('u.city IS NOT NULL')\n ->andWhere('u.address1 IS NOT NULL')\n ->getQuery()\n ->getResult();\n }", "public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_sotrudnik' => 'id_sotrudnik']);\n }", "protected function _doAddressbooks()\n {\n global $prefs;\n\n $abooks = $prefs->getValue('addressbooks');\n if (is_array(json_decode($abooks))) {\n return;\n }\n\n $abooks = explode(\"\\n\", $abooks);\n if (is_array($abooks) && !empty($abooks[0])) {\n $new_prefs = array();\n foreach ($abooks as $abook) {\n $new_prefs[] = $this->_updateShareName($abook);\n }\n\n $prefs->setValue('addressbooks', json_encode($new_prefs));\n }\n }", "public function getBillingAddress() : Address;", "public function getAddresses(string $name): array;", "public function bills() {\n return $this->hasMany('App\\Bill');\n }", "public function index()\n {\n $query=Address::select()->get();\n return $query;\n }", "private function _getAllBookings(User $driver) {\n\t\t$bookings = $driver->getDriverBookings ();\n\t\treturn $bookings;\n\t}", "function read_address_book()\n {\n return $this->read();\n }", "public function getBanks()\n {\n return $this->hasMany(Bank::className(), ['currency_id' => 'currency_id']);\n }", "public function listaddressgroupings(){\n return $this->bitcoin->listaddressgroupings();\n }", "public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }", "public function getBusinesses() {\n try {\n $statement = Configuration::openConnection()->prepare(\"SELECT * FROM businesses AS b JOIN states AS s ON b.state=s.stateId, businessTypes AS bt WHERE b.type=bt.typeId\");\n $statement->execute();\n\n $results = $statement->fetchAll(PDO::FETCH_COLUMN);\n\n $businesses = array();\n\n //echo ('test': 'test2');\n \n foreach ($results as $index => $id) {\n $business = new Business($id);\n array_push($businesses, json_decode($business));\n }\n\n Configuration::closeConnection();\n }\n catch (PDOException $e) {\n return \"Error: \" . $e->getMessage();\n }\n $businesses = json_encode($businesses, JSON_PRETTY_PRINT);\n\n return $businesses;\n }", "public function order_billing() : HasMany\n {\n return $this->hasMany(Order::class, 'address_Billing_ID');\n }", "public function getOrderAddresses($customerId, $orderId);", "public function getAllRecipientAddresses()\n {\n }", "static function getAllBuddies($userID)\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * FROM buddies INNER JOIN user ON (CASE WHEN buddy1ID = :userID THEN buddy2ID = user.userID WHEN buddy2ID = :userID THEN buddy1ID = user.userID END)\");\n //$statement = $conn->prepare(\"SELECT u.firstname, u.lastname* FROM buddies as b, user u \n //WHERE (u.userID = b.buddy1ID OR u.userID = b.buddy2ID) AND (buddy1ID = :currentUser OR buddy2ID = :currentUser)\");\n $statement->bindValue(\":userID\", $userID);\n if ($statement->execute()) {\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }\n }", "public function fetchById($id, $addressType=null){\n $where = $this->quoteInto('agency_id = ?', $id);\n\t\tif(!is_null($addressType)){\n\t\t\t$where .= $this->quoteInto(' AND address_type = ?', $addressType);\n\t\t}\n \t$select = $this->select()\n\t\t\t->from($this->_name)\n ->where($where);\n \n\t\t$rows = $this->fetchAll($select);\n\t\treturn $rows->toArray(); \n }", "public function getBooks($id, $secret) {\n\t\tif($id != '' && $secret != ''){\n\t\t\ttry {\n\t\t\t\t$SPApiProxy = new SendpulseApi( $id, $secret, TOKEN_STORAGE );\n\t\t\t\t$AddressBooks = $SPApiProxy->listAddressBooks();\n\t\t\t\treturn $AddressBooks;\n\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "function wd_ac_get_address( $id ) {\n global $wpdb;\n \n\n return $wpdb->get_row(\n $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}wc_addresses WHERE id = %d\", $id )\n );\n}", "public function fetchAll(){\n $addresses = $this->addressMapper->fetchAll();\n\n $response = array('data' =>array());\n foreach($addresses as $address){\n $response['data'][] = array(\n $line[] = $address->getNom(),\n $line[] = $address->getDescription(),\n $line[] = $address->getAdresse(),\n $line[] = $address->getUrl(),\n $line[] = '<a href=\"#\" data-id=\"' . $address->getId() . '\" data-action=\"edit\"><i class=\"glyphicon glyphicon-pencil\"></i></a>' .\n ' <a href=\"#\" data-id=\"' . $address->getId() . '\" data-action=\"delete\"><i class=\"glyphicon glyphicon-remove-circle\"></i></a>'\n );\n }\n return json_encode($response); \n }", "public static function getAddressBookData($customer_id, $address_book_id = null) {\n global $lC_Database;\n\n $Qab = $lC_Database->query('select ab.address_book_id, ab.entry_gender as gender, ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, ab.entry_telephone as telephone_number, ab.entry_fax as fax_number, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where');\n\n if ( is_numeric($address_book_id) ) {\n $Qab->appendQuery('ab.address_book_id = :address_book_id and');\n $Qab->bindInt(':address_book_id', $address_book_id);\n }\n\n $Qab->appendQuery('ab.customers_id = :customers_id and ab.entry_country_id = c.countries_id');\n $Qab->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);\n $Qab->bindTable(':table_zones', TABLE_ZONES);\n $Qab->bindTable(':table_countries', TABLE_COUNTRIES);\n $Qab->bindInt(':customers_id', $customer_id);\n $Qab->execute();\n\n if ( is_numeric($address_book_id) ) {\n $data = $Qab->toArray();\n $data['zoneData'] = lc_get_zone_data($Qab->value('zone_id'));\n\n $Qab->freeResult();\n\n return $data;\n }\n\n return $Qab;\n }", "public function getGlBudgets()\n {\n return $this->hasMany(GlBudget::className(), ['account_id' => 'account_id']);\n }", "public function getBccAddresses()\n {\n }", "public function suburbs()\n {\n return $this->hasMany('App\\Suburb');\n }", "public function findAll()\n {\n return $this->bids->all();\n }", "public function billing_address()\n {\n return $this->hasOne(AddressProxy::modelClass(), 'saas_subscription_recurring_profile_id');\n }", "function getBorrowItemsBorrowedBy($user_id)\n\t{\n\t\treturn $this->query->getBorrowItemsBorrowedBy($user_id);\n\t}", "public function findAddressById(int $id);", "public function listReceivedByAddress($bitcoinaddress, $includeempty = false);", "public function getUserAddresses(User $user)\n {\n $builder = $user->addresses()->getQuery();\n\n $resource = $this->datatable->setQueryBuilder($builder);\n\n return $resource->getResponse();\n }", "protected function FixAddress()\n {\n $rows = db::Query(\"SELECT min(id) as id, uid, (SELECT wallet FROM finances.accounts WHERE accounts.uid=quests.uid) FROM finances.quests GROUP BY uid ORDER BY uid ASC;\");\n $wallet = LoadModule('api', 'wallet');\n $bitcoin = LoadModule('api', 'bitcoin');\n $ret = array();\n foreach ($rows as $row)\n {\n if ($row['wallet'] === null)\n {\n array_push($ret, $row['uid']);\n echo \"<hr>{$row['uid']}<br>\";\n echo $tx = $wallet->GetFirstSourceTxid($row['id']);\n echo \"<br>\";\n echo $source = $bitcoin->GetSourceByTransaction($tx);\n if (strlen($source))\n db::Query(\"INSERT INTO finances.accounts(uid, wallet) VALUES ($1, $2)\",\n array($row['uid'], $source));\n }\n }\n return $ret;\n }", "public function listreceivedbyaddress($confs = 1, $empty = false){\n return $this->bitcoin->listreceivedbyaddress($confs, $empty);\n }", "public function getownerBooks($ownerid)\n {\n $sql2 = \"SELECT * from book JOIN item on book.itemid= item.itemid where bUserid= '\".$ownerid.\"'\";\n $bookdetails = mysql_fetch_array(mysql_query($sql2));\n return $bookdetails;\n \n }" ]
[ "0.6640048", "0.61151385", "0.5981912", "0.59783477", "0.58681965", "0.5790016", "0.5787011", "0.57290065", "0.5691443", "0.56606495", "0.56505084", "0.5641255", "0.56365776", "0.56365776", "0.56365776", "0.56357634", "0.56304324", "0.5625829", "0.5591508", "0.5568026", "0.5567595", "0.55484253", "0.5508672", "0.5417676", "0.53508425", "0.5348092", "0.5342372", "0.53312314", "0.5297519", "0.5294861", "0.5269733", "0.52529866", "0.5233793", "0.52319413", "0.51979166", "0.51803786", "0.5175056", "0.51734823", "0.516742", "0.51640916", "0.5148069", "0.5129552", "0.5125588", "0.5074698", "0.50473833", "0.50410527", "0.49959236", "0.49736902", "0.49617147", "0.49569574", "0.49421027", "0.49378487", "0.49348494", "0.492167", "0.49008566", "0.48880568", "0.48849168", "0.4881827", "0.4881559", "0.48811904", "0.48601556", "0.4855066", "0.48498887", "0.48494977", "0.48459482", "0.4839659", "0.48278543", "0.48244014", "0.48227707", "0.4822077", "0.48182172", "0.48153695", "0.48123822", "0.4812079", "0.4810945", "0.4804833", "0.4804285", "0.47976053", "0.47940192", "0.47871873", "0.47815576", "0.47771668", "0.477452", "0.4769102", "0.4769102", "0.47663325", "0.47641757", "0.47594914", "0.47593406", "0.47555515", "0.47544208", "0.47506663", "0.47468644", "0.47459227", "0.4739715", "0.47303793", "0.47279936", "0.47270915", "0.4720579", "0.47111025" ]
0.6850676
0
gets all Billings of the Company filtered by $filter
public function getBillings($filter = null) { $billingTable = new Yourdelivery_Model_DbTable_Billing(); $all = $billingTable->fetchAll('mode="company" AND refId="' . $this->getId() . '"'); $storage = new splObjectStorage(); foreach ($all AS $bill) { try { $bill = new Yourdelivery_Model_Billing($bill->id); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $storage->attach($bill); } return $storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function companyBillings($request)\n {\n if (Auth::user()->type != 'company') {\n throw new \\Exception('Unauthorized viewing of billing accounts.');\n }\n\n $data = [\n 'company_id' => Auth::user()->company->id,\n ]; \n\n $with = ['billable' => function($sub_query) { \n $sub_query->select('id', 'title', 'reference_id', 'price', 'incentive_per_share');\n \n }];\n \n $billings = $this->jobChoiceRepository->billing()->whereWhereMonthAndYear(\n $data, \n 'created_at', \n $request->month,\n $request->year,\n $with \n );\n \n // Fixed tax percentage\n $tax_percentage = Billing::VARIABLES['tax_percentage'];\n // Sub total amount of bills\n $sub_total_amount = $billings->sum('billable.incentive_per_share');\n // Result to be returned\n $result['billings'] = $billings; \n $result['sub_total_amount'] = $sub_total_amount;\n $result['consumption_tax_fee'] = $sub_total_amount * $tax_percentage;\n $result['total_amount_fee'] = $sub_total_amount + ($sub_total_amount * $tax_percentage);\n \n return $result;\n }", "public function getBorrowings();", "public function index(Request $request, BillCollectionFilter $filter)\n {\n// $bill_collection = BillCollection::filter($filter)\n// ->join('customer')\n// ->paginate($request->per_page);\n// return response()->json($bill_collection);\n\n $bill_collection = BillCollection::filter($filter)\n ->join('customers', 'customers.id', '=', 'bill_collections.customer_id')\n ->join('areas', 'areas.id', '=', 'customers.area_id')\n ->join('users', 'users.id', '=', 'bill_collections.user_id')\n ->select(\n 'bill_collections.id',\n 'bill_collections.customer_id',\n 'customers.code',\n 'customers.name',\n 'customers.phone',\n 'areas.name as area',\n 'customers.shared',\n 'customers.ppoe',\n 'customers.bandwidth',\n 'bill_collections.no_of_months',\n 'bill_collections.created_at',\n 'users.name as collector',\n 'bill_collections.total',\n 'bill_collections.discount',\n 'bill_collections.due_on',\n 'bill_collections.latest',\n 'bill_collections.lat',\n 'bill_collections.lon',\n DB::raw('(bill_collections.total - bill_collections.discount) as grand_total')\n )\n ->orderBy('created_at', 'desc')\n ->paginate($request->per_page);\n return response()->json($bill_collection);\n }", "public function index(Request $request)\n {\n $input = $request->all();\n $bills = Bill::with(['booking'])->get();\n $billStatus = Bill::status();\n $billType = Bill::type();\n $billPaymentType = Bill::paymentType();\n\n if (count($input) > 0) {\n $billQuery = Bill::where('id', '>', 0);\n\n if (!empty($input['unique_number_filter'])) {\n $billQuery = $billQuery->where('unique_number', 'like', '%' . $input['unique_number_filter'] . '%');\n }\n\n if (!empty($input['booking_number_filter'])) {\n $billQuery = $billQuery->whereHas('booking', function ($q) use ($input) {\n $q->where('booking_number', 'like', '%' . $input['booking_number_filter'] . '%');\n });\n }\n\n if (!empty($input['type_filter'])) {\n $billQuery = $billQuery->where('type', $input['type_filter']);\n }\n\n if (!empty($input['amount_filter'])) {\n $billQuery = $billQuery->where('amount', 'like', '%' . $input['amount_filter'] . '%');\n }\n\n if (!empty($input['payment_type_filter'])) {\n $billQuery = $billQuery->where('payment_type', $input['payment_type_filter']);\n }\n\n if (!empty($input['status_filter'])) {\n $billQuery = $billQuery->where('status', $input['status_filter']);\n }\n\n if (!empty($input['start_date_filter'])) {\n $startDateFormatted = \\DateTime::createFromFormat('d/m/Y', $input['start_date_filter'])->format('Y-m-d');\n $billQuery = $billQuery->where('start_date', '>=', $startDateFormatted);\n }\n if (!empty($input['end_date_filter'])) {\n $endDateFormatted = \\DateTime::createFromFormat('d/m/Y', $input['end_date_filter'])->format('Y-m-d');\n $billQuery = $billQuery->where('start_date', '<=', $endDateFormatted);\n }\n\n if (!empty($input['author_id_filter'])) {\n $billQuery = $billQuery->whereHas('author', function ($q) use ($input) {\n $q->where('name', 'like', '%' . $input['author_id_filter'] . '%');\n });\n }\n\n $bills = $billQuery->get();\n\n $exportedFile = Excel::create(trans('bill::bills.title.export'), function ($excel) use (\n $bills,\n $billStatus,\n $billType,\n $billPaymentType\n ) {\n $excel->sheet(trans('bill::bills.title.export'), function ($sheet) use (\n $bills,\n $billStatus,\n $billType,\n $billPaymentType\n ) {\n $sheet->loadView('bill::admin.bills.export', array('bills' => $bills,\n 'status' => $billStatus,\n 'type' => $billType,\n 'paymentType' => $billPaymentType));\n });\n })->export('xls');\n\n return $exportedFile;\n }\n\n return view('bill::admin.bills.index', compact('bills', 'billStatus', 'billType', 'billPaymentType'));\n }", "public function display_pending_bills()\n {\n // Check for an active session else redirect\n $this->app->check_active_session(2);\n\n // Load library\n $this->load->library('datatables');\n\n $columns = [\n 'bill_id' => function($value, $row, $num)\n {\n return $num++;\n },\n 'hospital_number' => null,\n 'patient_name' => function($value)\n {\n return ucwords($value);\n },\n 'patient_phone' => null,\n 'patient_type' => null,\n 'bill_debit' => function($value)\n {\n return number_format($value, 2);\n },\n 'receipt_number' => null,\n 'bill_date' => function($value)\n {\n return time_format($value, 'DD MMM. YYYY');\n },\n null => function($value)\n {\n $actions = '<a href=\"' . site_url('cashier/billing/') . $this->security->encrypt_id($value['bill_id']) . '\" class=\"btn btn-default btn-xs\">Pay Bill</a> ';\n\n return $actions;\n }\n ];\n\n $this->datatables->render_advance(\n $columns,\n 'SELECT {TOTAL_ROWS} *\n FROM bills\n WHERE {SEARCH_COLUMN} AND bill_status = 0\n ORDER BY {ORDER_COLUMN} {ORDER_DIR} {LIMIT_ROWS}'\n );\n }", "public function getBills()\n {\n return $this->hasMany(Bill::className(), ['cust_id' => 'id']);\n }", "public function bills()\n {\n return $this->hasMany(Bill::class, 'bil_booking');\n }", "public function getBudgets() {\n $table = new Yourdelivery_Model_DbTable_Company_Budgets();\n $all = $table->fetchAll('companyId = ' . $this->getId());\n $obj = new splObjectStorage();\n foreach ($all AS $budget) {\n try {\n $budget = new Yourdelivery_Model_Budget($budget->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $obj->attach($budget);\n }\n return $obj;\n }", "protected function billed()\n {\n return $this->builder->where('billed', true);\n }", "public function filterMyBookingsAction()\n {\n $request = Request::createFromGlobals();\n $data = array();\n $data2 = array();\n $fromDate = $request->request->get('fromDay', '');\n $toDate = $request->request->get('toDay', '');\n $accountId = $request->request->get('accountId', '');\n $userId = $request->request->get('userId', '');\n $currencyCode = $request->request->get('currencyCode', '');\n $types = $request->request->get('types', '');\n $pg_start_page = $request->request->get('start', '');\n \n if(!$pg_start_page)\n $pg_start_page = 1;\n \n $commonCode = $this->commonCode();\n $countItem = $commonCode['countItem'];\n \n if($fromDate){\n $fromDate = new \\DateTime($fromDate);\n $fromDate = $fromDate->format('Y-m-d');\n }\n if($toDate){\n $toDate = new \\DateTime($toDate);\n $toDate = $toDate->format('Y-m-d');\n }\n $class = $commonCode['class'];\n $pg_limit_records = $commonCode['pg_limit_records'];\n $page = $pg_start_page;\n $count = $commonCode['count'];\n $pagination = '';\n $pg_start_page = ( $pg_start_page * $pg_limit_records ) - $pg_limit_records;\n $modules = $commonCode['modules'];\n $accountId = $commonCode['accountId'];\n if(!$userId){\n $userId = $commonCode['userId'];\n }\n $parameters['accountId'] = $accountId;\n $parameters['userId'] = $userId;\n $status = $commonCode['status'];\n $data2['preferredAccountCurrency'] = $commonCode['preferredAccountCurrency'];\n $data2['hotelModuleId'] = $commonCode['hotelModuleId'];\n $data2['flightModuleId'] = $commonCode['flightModuleId'];\n $data2['dealModuleId'] = $commonCode['dealModuleId'];\n $data2['approvedStatus'] = $commonCode['approvedStatus'];\n $data2['accountId'] = $accountId;\n $data2['modules'] = $modules;\n $params = array(\n 'accountId' => $accountId,\n 'userId' => $userId,\n 'currencyCode' => $currencyCode,\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n 'types' => $types,\n 'status' => $status,\n 'start' => $pg_start_page,\n 'limit' => $pg_limit_records\n );\n $approvalFlow = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n \n $params['count']= 1;\n $countApprovalFlowList = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n if($countApprovalFlowList){\n $countItem = $countApprovalFlowList;\n $pagination = $this->getRelatedDiscoverPagination($countItem, $pg_limit_records, $page,$count ,$class );\n }\n \n $data2['allApprovalFlowList'] = $approvalFlow;\n $data['allApprovalFlow'] = $this->render('@Corporate/corporate/corporate-my-bookingsInfo.twig', $data2)->getContent();\n \n if($pagination){\n $data['pagination'] = $pagination;\n }\n\n $res = new Response(json_encode($data));\n $res->headers->set('Content-Type', 'application/json');\n\n return $res;\n }", "public function searchCostBill() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n $criteria = new CDbCriteria;\n $criteria->order = 'id DESC';\n $criteria->compare('id', $this->id);\n $criteria->compare('bill_no', $this->bill_no, true);\n // $criteria->compare('bill_date', $this->bill_date, true);\n $criteria->compare('bill_from_date', $this->bill_from_date, true);\n $criteria->compare('bill_to_date', $this->bill_to_date, true);\n $criteria->compare('customer_id', $this->customer_id);\n // $criteria->compare('purchase_order_id', $this->purchase_order_id);\n $criteria->compare('item_id', $this->item_id);\n $criteria->compare('bill_type', $this->bill_type, true);\n $criteria->compare('print_type', $this->print_type, true);\n $criteria->compare('added_on', $this->added_on, true);\n $criteria->compare('particulars', $this->particulars, true);\n $criteria->condition=\"bill_type='cost_bill'\";\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function get_blasts() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/blasts.json\");\n }", "function get_customerbookings($custID, $shipID, $filter = false, $filterable = false, $interval = '', $loginID = '', $debug = false) {\n\t\t$loginID = (!empty($loginID)) ? $loginID : DplusWire::wire('user')->loginid;\n\t\t$user = LogmUser::load($loginID);\n\t\t$q = (new QueryBuilder())->table('bookingc');\n\t\t$q->where('custid', $custID);\n\n\t\tif (!empty($shipID)) {\n\t\t\t$q->where('shiptoid', $shipID);\n\t\t}\n\n\t\tif ($user->get_dplusrole() == DplusWire::wire('config')->roles['sales-rep']) {\n\t\t\t$q->where('salesrep', DplusWire::wire('user')->salespersonid);\n\t\t}\n\t\t$q->generate_filters($filter, $filterable);\n\n\t\tswitch ($interval) {\n\t\t\tcase 'month':\n\t\t\t\t$q->field($q->expr(\"CAST(CONCAT(YEAR(bookdate), LPAD(MONTH(bookdate), 2, '0'), '01') AS UNSIGNED) as bookdate\"));\n\t\t\t\t$q->field('SUM(amount) as amount');\n\t\t\t\t$q->group('YEAR(bookdate), MONTH(bookdate)');\n\t\t\t\tbreak;\n\t\t\tcase 'day':\n\t\t\t\t$q->field('bookingc.*');\n\t\t\t\t$q->field('SUM(amount) as amount');\n\t\t\t\t$q->group('bookdate');\n\t\t\t\tbreak;\n\t\t}\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t}", "function wpbs_get_bookings($args = array(), $count = false)\n{\n\n $bookings = wp_booking_system()->db['bookings']->get_bookings($args, $count);\n\n /**\n * Add a filter hook just before returning\n *\n * @param array $bookings\n * @param array $args\n * @param bool $count\n *\n */\n return apply_filters('wpbs_get_bookings', $bookings, $args, $count);\n\n}", "public function allCompanies()\n {\n return Company::all();\n }", "public function room_bill_item()\n {\n return $this->hasManyThrough(BillItem::class, 'App\\Bill', 'bil_booking', 'bili_bill', 'book_id', 'bil_id')->whereHas('resource', function($query) {\n $query->where('rs_type', '=', 1);\n });\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $form = $this->createForm(BillingclassFilterType::class);\n if (!is_null($response = $this->saveFilter($form, 'billingclass', 'admin_billingclass'))) {\n return $response;\n }\n $qb = $em->getRepository('AppBundle:Billingclass')->createQueryBuilder('b');\n $paginator = $this->filter($form, $qb, 'billingclass');\n \n return array(\n 'form' => $form->createView(),\n 'paginator' => $paginator,\n );\n }", "function get_billed_job() {\n\t\t// exit;\n\t\t$this->job_card_model->_table = 'view_service_billing_jobs';\n\t\t$where['jobcard_group'] = $this->input->get('jobcard_group');\n\n\t\tsearch_params();\n\t\t$rows = $this->job_card_model->find_all($where);\n\t\t$total = count($rows);\n\n\t\tforeach ($rows as $key => $value) {\n\t\t\t$rows[$key]->has_billed = 1;\n\t\t\t$rows[$key]->cost = $rows[$key]->price;\n\t\t}\n\t\t\n\t\t$this->job_card_model->_table = 'view_service_billing_outsideworks';\n\t\t$ow_rows = $this->job_card_model->findAll($where);\n\n\t\tforeach ($ow_rows as $key => $value) {\n\t\t\t$k = $total+$key;\n\t\t\t$rows[$k]['id'] = $value->id;\n\t\t\t$rows[$k]['job_id'] = $value->job_id;\n\t\t\t$rows[$k]['job'] = $value->job;\n\t\t\t$rows[$k]['job_description'] = $value->job_description;\n\t\t\t// $rows[$k]['min_price'] = $value->id;\n\t\t\t// $rows[$k]['customer_price'] = $value->amount + $value->taxes;\n\t\t\t$rows[$k]['cost'] = $value->price;\n\t\t\t$rows[$k]['discount_amount'] = $value->discount_amount;\n\t\t\t$rows[$k]['discount_percentage'] = $value->discount_percentage;\n\t\t\t$rows[$k]['margin_percentage'] = $value->margin_percentage;\n\t\t\t$rows[$k]['final_amount'] = $value->final_amount;\n\t\t\t// $rows[$k]['status'] = '';\n\t\t\t$rows[$k]['ow'] = true;\n\t\t\t$rows[$k]['has_billed'] = 1;\n\t\t}\n\t\t$total += count($ow_rows);\n\n\n\n\t\techo json_encode(array('total' => $total, 'rows' => $rows));\n\t}", "public function showbill(Request $request) {\n try {\n $param = $request->all();\n if (!isset($param[\"RentalOID\"]) || !$param[\"RentalOID\"]) {\n $rtn = array(\n \"total\" => 0,\n \"data\" => [],\n );\n return response()->json(compact('rtn'));\n }\n $search = $request->get(\"search\");\n $order = $request->get(\"order\");\n $limit = $request->get(\"limit\");\n if ($search && isset($search[\"value\"]) && $search[\"value\"]) {\n $search = $search[\"value\"];\n } else {\n $search = \"\";\n }\n if ($order && isset($order[\"0\"]) && $order[\"0\"]) {\n $column = $order[\"0\"][\"column\"];\n $dir = $order[\"0\"][\"dir\"];\n }\n\n $rentalBill = Rental::showbill($param[\"RentalOID\"], $search, $order, $dir, $limit);\n\n $rtn = array(\n \"total\" => $rentalBill->total(),\n \"data\" => $rentalBill->items(),\n );\n return response()->json(compact('rtn'));\n\n return response()->json(compact('rentalBill'));\n } catch (Exception $ex) {\n Log::error($ex);\n return response()->json(['error' => trans('messages.systemError')], 411);\n }\n }", "public function allBoons() {\n\n // retrieve all Boons\n $boonModel = new Boon();\n $boonList = $boonModel->findAllBoons(); // array of objects\n\n // Send the datas to the view\n $this->show('boons', [\n 'boonList' => $boonList\n ]);\n }", "public function getBillingItem($id)\n {\n// foreach ($table_order as $order) {\n// $arr = Order::where(['OID' => $order->OID, 'is_cancelled' => 0])->get();\n $sql = 'select * from order_descriptions where OID in (select oid from tbl_order where tbl_id=\"' . $id . '\" and is_cancelled=0 and IsBill=0)';\n $bills = DB::select($sql);\n return view('bill.partial_bill_item')->with(['bills' => $bills]);\n }", "protected function billable()\n {\n return $this->builder->where('billable', true);\n }", "public function getAllCompanyByPage($filter, $page = 1, $page_size = 20, $orderby = '') {\n $regulatorToCompanyModel = new Model_Jiafuyun_RegulatorToCustomer();\n// $companyModel = new Model_Zhianbao_Company();\n $companyModel = new Model_Jiafuyun_Company();\n $rs = $regulatorToCompanyModel->getAll ( '*', $filter, $page, $page_size, $orderby );\n foreach ( $rs as $key => $value){\n $rs[$key]['create_time'] = strtotime($value['create_time']) == 0 ? '-': $value['create_time'];\n $rs[$key]['last_modify'] = strtotime($value['last_modify']) == 0 ? '-': $value['last_modify'];\n $companyInfo = $companyModel->get($value['company_id']);\n $rs[$key]['company_info'] = $companyInfo;\n }\n return $rs;\n }", "function getBillsByUser($userID, $filterDest=\"any\") {\n\t$db = connectDB();\n $sql = <<<SQL\n \tSELECT billID, startDate, destination, description, cost, isPaid, userID\n \tFROM bills\n\t\tWHERE userID = ?\nSQL;\n\n\tif ($filterDest != \"any\") {\n\t\t$sql .= \" AND destination = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param(\"ss\", $userID, $filterDest);\n\n\t} else {\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param(\"s\", $userID);\n\t}\n\n\n\t$stmt->execute();\n\n\t$res = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n\n\t$stmt->close();\n\t$db->close();\n\treturn $res;\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n // $all = $em->getRepository('NvCargaBundle:Bill')->findBy(['canceled'=>FALSE, 'maincompany'=> $maincompany])\n $all = $em->getRepository('NvCargaBundle:Bill')->createQueryBuilder('b')\n ->where('b.status != :status')\n ->andwhere('b.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany, 'status' => 'ANULADA'))\n ->orderBy('b.number', 'DESC')\n ->setMaxResults(500)\n ->getQuery()\n ->getResult();\n if ($type == \"MASTER\") {\n $entities = $all;\n } else {\n $entities = [];\n foreach ($all as $entity) {\n $guide = $entity->getGuides()->last();\n if ($guide->getAgency() === $agency()) {\n $entities[] = $entity;\n }\n }\n }\n return array(\n 'entities' => $entities,\n );\n\n }", "public function getAllBusinesses() {\n\t\t$em = $this->getEntityManager();\n\t\t$businesses = $em->createQueryBuilder()\n\t\t\t->select('b.businessID,b.costCenter,b.name')\n\t\t\t->from('Business', 'b')\n\t\t\t->orderBy('b.name')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"businesses\" => $businesses\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public static function getReportBillSalesByCustomer($company_id, $branch_id = null, $time_start, $time_end) {\n $bills = self::selectRaw('customer_id, sum(total) as sum, sum(base_price_total) as base_total')\n ->where('company_id', $company_id)\n ->where('customer_id','!=', 0);\n if(!empty($branch_id)) {\n $bills = $bills->where('branch_id', $branch_id);\n }\n $bills = $bills->where('status', '=', self::ACTIVE)->whereNull('deleted_at')\n ->whereBetween('sale_date', array($time_start, $time_end))\n ->groupBy(DB::raw('customer_id'))\n ->orderBy('sum','DESC')\n ->limit(10)\n ->get();\n return $bills;\n }", "public function searchIncrementalBill() {\n // should not be searched.\n $criteria = new CDbCriteria;\n $criteria->order = 'id DESC';\n $criteria->compare('id', $this->id);\n $criteria->compare('bill_no', $this->bill_no, true);\n // $criteria->compare('bill_date', $this->bill_date, true);\n $criteria->compare('bill_from_date', $this->bill_from_date, true);\n $criteria->compare('bill_to_date', $this->bill_to_date, true);\n $criteria->compare('customer_id', $this->customer_id);\n // $criteria->compare('purchase_order_id', $this->purchase_order_id);\n $criteria->compare('item_id', $this->item_id);\n $criteria->compare('bill_type', $this->bill_type, true);\n $criteria->compare('print_type', $this->print_type, true);\n $criteria->compare('added_on', $this->added_on, true);\n $criteria->compare('particulars', $this->particulars, true);\n $criteria->condition=\"bill_type='incremental_bill'\";\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function getBans(User_Model_Row_Account $account, $filter = null) {\n\t\t\n\t}", "function get_pending_bookings(){\n\t\tif( get_option('dbem_bookings_approval') == 0 ){\n\t\t\treturn new EM_Bookings();\n\t\t}\n\t\t$pending = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 0){\n\t\t\t\t$pending[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($pending);\n\t\treturn $EM_Bookings;\t\n\t}", "public function companies(): Collection\n {\n return Company::all();\n }", "public function getCompaniesToSuspend() {\n return $this->createQuery('c')\n ->select('c.*')\n ->from('Companies_Model_Company c')\n ->where('c.status = ?', Companies_Model_Company::STATUS_EXPIRED)\n ->addWhere('c.payment_date IS NOT NULL AND ADDDATE(c.payment_date, 8) < NOW()')\n ->execute();\n }", "public function getBuildingsWithBudgets()\n {\n $buildings_budgets = $this->find('all', [\n 'contain' => ['Budgets' =>\n function ($q) {\n return $q\n ->select(['id', 'building_id']);\n }],\n 'conditions' => ['Buildings.softland_id IS NOT NULL', 'Buildings.omit' => false]\n ]);\n $buildingsWithBudget = array();\n foreach ($buildings_budgets as $buildings_budget) {\n if (!empty($buildings_budget['budget'])) {\n $buildingsWithBudget[$buildings_budget['softland_id']]['budget_id'] = $buildings_budget['budget']['id'];\n $buildingsWithBudget[$buildings_budget['softland_id']]['active'] = $buildings_budget['active'];\n }\n }\n return $buildingsWithBudget;\n }", "function getBankLists() {\r\n\t\t$idealPlugin = os_payments::loadPaymentMethod('os_ideal');\t\t\r\n\t\t$params = new JRegistry($idealPlugin->params) ;\t\t\r\n\t\t$partnerId = $params->get('partner_id');\r\n\t\t$ideal = new iDEAL_Payment($partnerId) ;\r\n\t\t$bankLists = $ideal->getBanks();\r\n\t\treturn $bankLists ;\r\n\t}", "public function get_all_data_bonifications_company($id)\n {\n $datos = $this->db->query('select * from money_usuario left join money_back on usuariosMoneyBackId = moneyBackId where usuarioMoneyId = ' . $id);\n return $datos->row();\n }", "public static function getReportBillSales($company_id, $branch_id = null, $time_start, $time_end) {\n $bills = self::selectRaw('DATE(sale_date) AS sale_date, sum(total) as sum, sum(base_price_total) as base_total')\n ->where('company_id', $company_id);\n if(!empty($branch_id)) {\n $bills = $bills->where('branch_id', $branch_id);\n }\n $bills = $bills->where('status', '=', self::ACTIVE)->whereNull('deleted_at')\n ->groupBy(DB::raw('DAY(sale_date)'))\n ->orderBy('sale_date','DESC')\n ->get();\n return $bills;\n }", "function get_billed_parts() {\n\t\t// exit;\n\t\t$this->job_card_model->_table = 'view_service_billing_parts';\n\n\t\t$where['jobcard_group'] = $this->input->get('jobcard_group');\n\n\t\t$rows = $this->job_card_model->find_all($where);\n\n\t\tforeach ($rows as $key => $value) {\n\t\t\t$rows[$key]->has_billed = 1;\n\t\t}\n\n\t\t$total = count($rows);\n\t\techo json_encode(array('total' => $total, 'rows' => $rows));\n\t}", "public function banks()\n {\n return Cache::remember('banks', $this->cacheTime, function () {\n return collect(Paymentmethods::getBanks(10))->pluck('name', 'id');\n });\n }", "public function actionIndex()\n {\n $bill_id = Yii::$app->request->get('bill_id');\n $tab = Yii::$app->request->get('tab',2);\n $returnUrl = Yii::$app->request->get('returnUrl',Url::to(['bill-b/index', 'bill_id'=>$bill_id]));\n $searchModel = new SearchModel([\n 'model' => $this->modelClass,\n 'scenario' => 'default',\n 'partialMatchAttributes' => [], // 模糊查询\n 'defaultOrder' => [\n 'id' => SORT_DESC\n ],\n 'pageSize' => $this->pageSize,\n 'relations' => [\n\n ]\n ]);\n\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->query->andWhere(['=', 'bill_id', $bill_id]);\n $dataProvider->query->andWhere(['>',WarehousebillGoods::tableName().'.status',-1]);\n\n $bill = WarehouseBill::find()->where(['id'=>$bill_id])->one();\n return $this->render($this->action->id, [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n 'bill' => $bill,\n 'tab' => $tab,\n 'tabList'=>\\Yii::$app->warehouseService->bill->menuTabList($bill_id, $this->billType, $returnUrl),\n ]);\n }", "public function bills() {\n return $this->hasMany('App\\Bill');\n }", "public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_complaints' => 'id_complaint']);\n }", "public function getData(Request $request, $companyId)\n\t{\n\t\t//Authentication\n\t\t$tokenAuthentication = new TokenAuthentication();\n\t\t$authenticationResult = $tokenAuthentication->authenticate($request->header());\n\n\t\t// get constant array\n\t\t$constantClass = new ConstantClass();\n\t\t$constantArray = $constantClass->constantVariable();\n\t\tif (strcmp($constantArray['success'], $authenticationResult) == 0) {\n\t\t\tif (array_key_exists('fromdate', $request->header()) && array_key_exists('todate', $request->header())) {\n\t\t\t\t$processor = new BillProcessor();\n\t\t\t\t$billPersistable = new BillPersistable();\n\t\t\t\t$billPersistable = $processor->getPersistableData($request->header());\n\t\t\t\tif (!is_object($billPersistable)) {\n\t\t\t\t\treturn $billPersistable;\n\t\t\t\t}\n\t\t\t\t$data = $billPersistable;\n\t\t\t} else if (array_key_exists('invoicenumber', $request->header())) {\n\t\t\t\t$data = $request->header();\n\t\t\t}\n\n\t\t\t$billService = new BillService();\n\t\t\t$status = $billService->getData($data, $companyId);\n\t\t\treturn $status;\n\t\t} else {\n\t\t\treturn $authenticationResult;\n\t\t}\n\t}", "public function index()\n {\n $query = Company::query();\n\n $parameters = $parameters = request()->query->all();\n\n $this->sortBy(Company::class, $query, $parameters);\n\n $this->filterBy(Company::class, $query, $parameters);\n \n return CompanyResource::collection($query->paginate(10));\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function getBanners($perPage = 20, array $filter = array(), array $sort = array(), $paginate = true);", "public function getPendingApproval(Filter $filter): Collection;", "public function getBankList()\n {\n $url = Moota::BASE_URL . Moota::ENDPOINT_BANK_INDEX;\n\n return (new ParseResponse(\n Zttp::withHeaders([\n 'User-Agent' => 'Moota/2.0',\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer ' . Moota::$ACCESS_TOKEN\n ])->get($url), $url\n ))\n ->getResponse()\n ->getBankData();\n }", "public function getAll(Filter $filter): Builder;", "public function index() {\n $month = Input::get('month', \\Carbon\\Carbon::now()->format('m/Y'));\n $start = \\Carbon\\Carbon::createFromFormat('m/Y', $month)->startOfMonth();\n $end = \\Carbon\\Carbon::createFromFormat('m/Y', $month)->endOfMonth();\n $bills = \\Bill::with('creator', 'buyer')\n ->whereBetween('created_at', array($start, $end))\n //->condition(\\Input::all())\n ->orderBy('created_at', 'desc')\n ->paginate(25);\n $months = \\Member::getMonthsLog();\n $this->layout->content = View::make('admin.bills.index', array(\n 'bills' => $bills,\n 'months' => $months,\n 'month' => $month,\n ));\n }", "public function index() {\n return view('bills', [\n 'bills' => Bill::with('who','whoId','bsn')\n ->where('BillStatus', '!=', '0')\n ->get()\n ]\n );\n }", "public function ContractsGetAll($filter)\n {\n $query = Contracts::with('Customers')->whereRaw(\"1 = 1\");\n $sSearchInput = isset($filter['searchInput']) ? trim($filter['searchInput']) : '';\n $sSortCol = isset($filter['sSortCol']) ? $filter['sSortCol'] : 'code';\n $sSortDir = isset($filter['sSortDir']) ? $filter['sSortDir'] : 'desc';\n\n $limit = isset($filter['limit']) ? $filter['limit'] : config('const.LIMIT_PER_PAGE');\n if ($sSearchInput != '') {\n $query->where('content', 'LIKE', '%' . $sSearchInput . '%');\n $query->orWhere('code', 'LIKE', '%' . $sSearchInput . '%');\n $query->orWhere('value', 'LIKE', '%' . $sSearchInput . '%');\n }\n\n if ($sSortCol) {\n $query->orderBy($sSortCol, $sSortDir);\n }\n\n $rResult = $query->paginate($limit)->toArray();\n $arrData = $rResult['data'];\n foreach ($arrData as $key => $value) {\n $signdate = date('d/m/Y', strtotime($value['signdate']));\n $arrData[$key]['signdate'] = $signdate;\n }\n $rResult['data'] = $arrData;\n return $rResult;\n }", "public function findAll() {\n $sql = \"SELECT * FROM budget\";\n $result = $this->db->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $budget = array();\n foreach ($result as $row) {\n $budgetID = $row['id'];\n $budget[$budgetID] = $this->buildBudget($row);\n }\n return $budget;\n }", "public function index(Request $request)\n\t{\n\t $input = $request->all();\n\n\t\t$result = $this->billingRepository->search($input);\n\n\t\t$billings = $result[0];\n\n\t\t$attributes = $result[1];\n\n\t\treturn view('billings.index')\n\t\t ->with('billings', $billings)\n\t\t ->with('attributes', $attributes);;\n\t}", "public function listMyBills()\n {\n $invoices = Invoice::all();\n $clubs = Club::all();\n $products = Product::all();\n\n return view('client/listmybills', ['products' => $products, 'invoices' => $invoices, 'clubs' => $clubs]);\n }", "public static function getAllBank()\n {\n return DB::table('banks')->select('id', 'name')->get();\n }", "public function getAll()\n {\n return $this->banque->paginate(10);\n }", "public function getBanks()\n {\n return $this->hasMany(Bank::className(), ['currency_id' => 'currency_id']);\n }", "public function getCreditRequests()\n {\n $search['q'] = request('q');\n\n $partner = auth()->user()->companies->first();\n\n $creditRequests = CreditRequest::search($search['q'])->with('quotation.user','user','credits')->paginate(10);\n\n return $creditRequests;\n /*$creditRequestsPublic = CreditRequest::search($search['q'])->where('public',1)->with('quotation.user','user','shippings')->get()->all();\n \n $creditRequestsPrivate = CreditRequest::search($search['q'])->where('public', 0)->whereHas('suppliers', function($q) use($partner){\n $q->where('shipping_request_supplier.supplier_id', $partner->id);\n })->get()->all();\n\n $creditRequests = array_collapse([$creditRequestsPublic, $creditRequestsPrivate]);\n\n // dd($creditRequests);\n \n \n $paginator = paginate($creditRequests, 10);\n \n return $paginator; */\n \n \n\n \n \n }", "public function corporateMyBookingsAction() {\n $commonCode = $this->commonCode();\n $countItem = $commonCode['countItem'];\n $pg_start_page = 0;\n $page = 1;\n $pg_limit_records = $commonCode['pg_limit_records'];\n $count = $commonCode['count'];\n $class=$commonCode['class'];\n $pagination= '';\n $modules = $commonCode['modules'];\n $accountId = $commonCode['accountId'];\n $userId = $commonCode['userId'];\n $parameters['accountId'] = $accountId;\n $parameters['userId'] = $userId;\n $status = $commonCode['status'];\n $this->data['preferredAccountCurrency'] = $commonCode['preferredAccountCurrency'];\n $this->data['hotelModuleId'] = $commonCode['hotelModuleId'];\n $this->data['flightModuleId'] = $commonCode['flightModuleId'];\n $this->data['dealModuleId'] = $commonCode['dealModuleId'];\n $this->data['approvedStatus'] = $commonCode['approvedStatus'];\n $this->data['accountId'] = $commonCode['accountId'];\n $this->data['modules'] = $modules;\n $params = array(\n 'accountId' => $accountId,\n 'userId' => $userId,\n 'status' => $status,\n 'start' => $pg_start_page,\n 'limit' => $pg_limit_records\n );\n $userObj = $this->get('UserServices')->getUserDetails(array('id' => $userId));\n if($userObj[0]['cu_cmsUserGroupId'] == $this->container->getParameter('ROLE_SYSTEM')){\n $this->data['role'] = $this->container->getParameter('ROLE_SYSTEM');\n }\n $allApprovalFlowList = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n\n $params['count']= 1;\n $countApprovalFlowList = $this->get('CorpoApprovalFlowServices')->getAllApprovalFlowList($params);\n if($countApprovalFlowList){\n $countItem = $countApprovalFlowList;\n $pagination = $this->getRelatedDiscoverPagination($countItem, $pg_limit_records, $page,$count ,$class );\n } \n $this->data['pagination'] = $pagination;\n $this->data['allApprovalFlowList'] = $allApprovalFlowList;\n \n return $this->render('@Corporate/corporate/corporate-my-bookings.twig', $this->data);\n }", "public static function getReportBillSalesMonth($company_id, $branch_id = null) {\n $bills = self::selectRaw('MONTH(sale_date) AS month, sum(total) as sum, sum(base_price_total) as base_total')\n ->where('company_id', $company_id);\n if(!empty($branch_id)) {\n $bills = $bills->where('branch_id', $branch_id);\n }\n $time_start = date('Y-01-01');\n $time_end = date('Y-12-31');\n $bills = $bills->where('status', '=', self::ACTIVE)->whereNull('deleted_at')\n ->whereBetween('sale_date', array($time_start, $time_end))\n ->groupBy(DB::raw('MONTH(sale_date)'))\n ->orderBy('sale_date','ASC')\n ->get();\n return $bills;\n }", "public function actionGetFilteredEmptyCompaniesList()\n {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['companyName'])) {\n $companyName = $_POST['companyName'];\n\n $companies = Companies::getEmptyCompanies($companyName);\n\n $this->renderPartial('empty_companies_list' , array(\n 'companies' => $companies,\n ));\n }\n }", "public static function getReportBillSalesByStaff($company_id, $branch_id = null, $time_start, $time_end) {\n $bills = self::selectRaw('user_id, sum(total) as sum, sum(base_price_total) as base_total')\n ->where('company_id', $company_id);\n if(!empty($branch_id)) {\n $bills = $bills->where('branch_id', $branch_id);\n }\n $bills = $bills->where('status', '=', self::ACTIVE)->whereNull('deleted_at')\n ->whereBetween('sale_date', array($time_start, $time_end))\n ->groupBy(DB::raw('user_id'))\n ->orderBy('sum','DESC')\n ->limit(10)\n ->get();\n return $bills;\n }", "public function findAll() {\n $sql = \"select * from billets order by billet_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n \n // Convert query result to an array of domain objects\n $billets = array();\n foreach ($result as $row) {\n $billetId = $row['billet_id'];\n $nbComment = $this->commentDAO->countAllByBillet($billetId);\n $billets[$billetId] = $this->buildDomainObject($row);\n $billets[$billetId]->setNbComment($nbComment);\n }\n return $billets;\n }", "function getBookingsByCustomerId($customerid) {\n $query = \"SELECT * FROM `bookings` WHERE CustomerId='\" . $customerid . \"'\";\n \n $result = Database::selectQuery($query);\n \n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }", "public function bills()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = spsd_id, localKey = spsd_id)\n return $this->hasMany('App\\Bill','spsd_id','spsd_id');\n }", "public function getApproved(Filter $filter): Collection;", "public function getAllInvoicesList(InvoiceListingFilter $filter): Builder;", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public static function getUnpaidBills(Project $project)\n {\n return BillWaterSourceDetail::selectRaw(DB::raw(\"sum(bills_water_source_details.bill) - sum(bills_water_source_details.payment) as amount, properties.name as property, CONCAT(buyers.first_name,' ',buyers.middle_name,' ',buyers.last_name) as buyer\")) \n ->leftJoin('bills_water_source','bills_water_source_details.bills_water_source_id','=','bills_water_source.id')\n ->leftJoin('projects','projects.id','=','bills_water_source.project_id')\n ->leftJoin('properties','properties.id','=','bills_water_source_details.property_id')\n ->leftJoin('buyers','buyers.id','=','properties.buyer_id')\n ->groupBy('bills_water_source_details.property_id')\n ->havingRaw('amount > 0')\n ->get(); \n }", "public function filterByBill($bill, $comparison = null)\n {\n if ($bill instanceof \\Bill) {\n return $this\n ->addUsingAlias(EmployeeTableMap::COL_ID, $bill->getEmployeeId(), $comparison);\n } elseif ($bill instanceof ObjectCollection) {\n return $this\n ->useBillQuery()\n ->filterByPrimaryKeys($bill->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByBill() only accepts arguments of type \\Bill or Collection');\n }\n }", "public function getBilling();", "public function index(Request $request)\n {\n\n $from=$request->searchFrom;\n $to=$request->searchTo;\n\n // dd($to);\n\n $distributorIDs = User::where('name', 'like', '%' . request('search') . '%')\n ->where('set_as', 0)->pluck('id')->toArray();\n \n\n $billings = Billing::with('user')->whereIn('distributor_id', $distributorIDs)\n ->when($from, function($query) use ($from) {\n $query->where('date', '>=', $from);\n })\n ->when($to, function($query) use ($to) {\n $query->where('date', '<=', $to);\n })\n ->paginate(5);\n return view('users.admin-billing', ['data' => $billings]);\n }", "public function getBankListByStatus($status){\n return $this->where('is_deleted', $status)->orderBy('created_at','desc')->get();\n }", "public function listCompanyBank(Request $request){\n $this->setPageHeader(\"List of Companie's Banks\");\n if (!$this->user->hasAccessRoute('admin.company.bank')) return view('404');\n return view('admin.company.list_bank');\n }", "public function index($bill_id)\n\t{\n\t\treturn $this->payments->get_bill_payments($bill_id);\n\t}", "private function getList()\n\t{\n\t\t// Get the correct billboards collection to display from the parameters\n\t\t$collection = (int) $this->params->get('collection', 1);\n\n\t\t// Grab all the buildboards associated with the selected collection\n\t\t// Make sure we only grab published billboards\n\t\t$rows = Billboard::whereEquals('published', 1)\n\t\t ->whereEquals('collection_id', $collection)\n\t\t ->order('ordering', 'asc')\n\t\t ->rows();\n\n\t\treturn $rows;\n\t}", "public function setBillingCompany($value)\n {\n return $this->setParameter('billingCompany', $value);\n }", "public static function getReportBillSalesByYear($company_id, $branch_id = null) {\n $bills = self::selectRaw('Year(sale_date) AS year, sum(total) as sum, sum(base_price_total) as base_total')\n ->where('company_id', $company_id);\n if(!empty($branch_id)) {\n $bills = $bills->where('branch_id', $branch_id);\n }\n $bills = $bills->where('status', '=', self::ACTIVE)->whereNull('deleted_at')\n ->groupBy(DB::raw('Year(sale_date)'))\n ->orderBy('sale_date','DESC')\n ->get();\n return $bills;\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function index()\n {\n return Company::paginate(10);\n }", "function get_bookings( $all_bookings = false ){\n\t\t$confirmed = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif( $EM_Booking->booking_status == 1 || (get_option('dbem_bookings_approval') == 0 && $EM_Booking->booking_status == 0) || $all_bookings ){\n\t\t\t\t$confirmed[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($confirmed);\n\t\treturn $EM_Bookings;\t\t\n\t}", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "function get_all_brands() {\n $this->db->order_by('name', 'asc');\n return $this->db->get('brands')->result_array();\n }", "public function all(): array\n {\n return Billingo::get('bank_accounts');\n }", "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 pay_bill_get(){\r\n if (!$this->pronet_model->pay_bill(1, '882332411098', '4999999999999999', '4521','12','2022')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function index(Request $request)\n {\n $payment = Payment::with('user','billType');\n if ($request->account_number) {\n $payment->where('bill_account_number', 'like', '%'.$request->account_number.'%');\n }\n if ($request->bill_type) {\n $payment->whereHas('billType', function ($query) use ($request){\n $query->where('name', 'like', '%'.$request->bill_type.'%');\n });\n }\n if ($request->merchant_name) {\n $payment->whereHas('user', function ($query) use ($request){\n $query->where('firstname', 'like', '%'.$request->merchant_name.'%');\n });\n }\n if ($request->customer_name) {\n $payment->where('customer_name', 'like', '%'.$request->customer_name.'%');\n }\n $payments = $payment->paginate(5);\n return view('bill.index', ['payments' => $payments, \n 'account_number' => $request->account_number, \n 'bill_type' => $request->bill_type, \n 'merchant_name' => $request->merchant_name, \n 'customer_name' => $request->customer_name]);\n }", "function getCompanyFilter() {\n return $this->getAdditionalProperty('company_filter', self::CLIENT_FILTER_ANYBODY);\n }", "public function filter(BrochureFilterRequest $request)\n {\n $input = $request->all();\n $sort_type = 'DESC';\n if ($request->has('sort_type') && $input['sort_type'] === 'a') {\n $sort_type = 'ASC';\n }\n\n $brochures = Brochure::active();\n if ($request->has('user_id')) {\n $brochures->where('provider_id', $input['user_id']);\n }\n\n return new BrochureCollection(\n $brochures->orderBy(\"created_at\", $sort_type)\n ->paginate(10)\n );\n\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public static function getUnpaidBills(Project $project)\n {\n return BillElectricitySourceDetail::selectRaw(DB::raw(\"sum(bills_electricity_source_details.bill) - sum(bills_electricity_source_details.payment) as amount, properties.name as property, CONCAT(buyers.first_name,' ',buyers.middle_name,' ',buyers.last_name) as buyer\")) \n ->leftJoin('bills_electricity_source','bills_electricity_source_details.bills_electricity_source_id','=','bills_electricity_source.id')\n ->leftJoin('projects','projects.id','=','bills_electricity_source.project_id')\n ->leftJoin('properties','properties.id','=','bills_electricity_source_details.property_id')\n ->leftJoin('buyers','buyers.id','=','properties.buyer_id')\n ->groupBy('bills_electricity_source_details.property_id')\n ->havingRaw('amount > 0')\n ->get(); \n }", "public function index(Request $request)\n {\n if($request->seller_id && $request->customer_id){\n $bills=DB::table('bills')->join('inks','bills.ink_id','=','inks.ink_id')\n ->join('customers','bills.customer_id','=','customers.customer_id')\n ->join('sellers','bills.seller_id','=','sellers.seller_id')\n ->where('bills.seller_id','=',$request->seller_id)\n ->where('bills.customer_id','=',$request->customer_id)\n ->get();\n }\n else if($request->seller_id){\n $bills=DB::table('bills')->join('inks','bills.ink_id','=','inks.ink_id')\n ->join('customers','bills.customer_id','=','customers.customer_id')\n ->join('sellers','bills.seller_id','=','sellers.seller_id')\n ->where('bills.seller_id','=',$request->seller_id)\n ->get();\n }else if($request->customer_id){\n $bills=DB::table('bills')->join('inks','bills.ink_id','=','inks.ink_id')\n ->join('customers','bills.customer_id','=','customers.customer_id')\n ->join('sellers','bills.seller_id','=','sellers.seller_id')\n ->where('bills.customer_id','=',$request->customer_id)\n ->get();\n }else{\n $bills=DB::table('bills')->join('inks','bills.ink_id','=','inks.ink_id')\n ->join('customers','bills.customer_id','=','customers.customer_id')\n ->join('sellers','bills.seller_id','=','sellers.seller_id')\n ->get();\n }\n\n\n\n return new BillResource($bills);\n }", "public function getBudgetHeads($conditions='') {\n \n $query = \"SELECT \n * \n FROM \n budget_heads\n $conditions\";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "public function UserBilling(){\n\n $billings = Billing::with('user')\n ->where('distributor_id', Auth::user()->id)\n ->paginate(4);\n return view('users.billing', ['data' => $billings]);\n\n }", "function listBillets(){ \n\t\t$billets = array();\n\n\t\t$bdd = new PDO('mysql:host=localhost;dbname=test;charset=utf8','root','',array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n\t\t$req = $bdd->query('SELECT * FROM billets ORDER BY date_creation DESC LIMIT 5');\n\t\t\n\t\twhile($billet = $req->fetch(PDO::FETCH_ASSOC)){\n\t\t\t$billets[] = $billet;\n\t\t}\n\t\t\n\t\treturn $billets ;\n\t}", "public function index()\n {\n if (! Gate::allows('bill_access')) {\n return abort(401);\n }\n\n $user = Auth::user();\n if ($user->isAdmin()){\n $bills = Bill::all();\n }\n\n if ($user->isLandlord()){\n $house = House::where('landlord_id', $user->id)->pluck('id');\n $bills = Bill::whereIn('house_id', $house)->get();\n }\n\n if ($user->isTenant()){\n $house = House::where('tenant_id', $user->id)->pluck('id');\n\n $bills = Bill::where('house_id', $house)->get();\n }\n\n\n return view('admin.bills.index', compact('bills'));\n }", "public function getConsultantBookings($consultantId)\n {\n $this->logger->info(\"get all active consultant bookings\");\n\n return $this->em->getRepository(\"SkedAppCoreBundle:Booking\")\n ->getAllConsultantBookings($consultantId);\n }", "public function getBanks()\n {\n return $this->hasMany(Bank::className(), ['gl_account_id' => 'account_id']);\n }", "function supplier_get_all_bookings_limit($myitems, $perpage = null, $page = null, $orderby = null)\n {\n $offset = null;\n if ($page != null) {\n $offset = ($page == 1) ? 0 : ($page * $perpage) - $perpage;\n }\n\n $this->db->select('pt_bookings.booking_user,pt_bookings.booking_cancellation_request,pt_bookings.booking_id,pt_bookings.booking_type,pt_bookings.booking_expiry,pt_bookings.booking_ref_no,\n pt_bookings.booking_status,pt_bookings.booking_item,pt_bookings.booking_item_title,\n booking_total,pt_bookings.booking_deposit,pt_bookings.booking_date,pt_accounts.ai_first_name,pt_accounts.ai_last_name,pt_accounts.accounts_email');\n if (!empty ($myitems)) {\n $this->db->where_in('pt_bookings.booking_item', $myitems);\n } else {\n $this->db->where('pt_bookings.booking_item', 0);\n }\n $this->db->join('pt_accounts', 'pt_bookings.booking_user = pt_accounts.accounts_id', 'left');\n $this->db->order_by('pt_bookings.booking_id', 'desc');\n $query = $this->db->get('pt_bookings', $perpage, $offset);\n $data['all'] = $query->result();\n $data['nums'] = $query->num_rows();\n return $data;\n }" ]
[ "0.71305776", "0.65136105", "0.61629456", "0.61071646", "0.6101719", "0.5972914", "0.5969841", "0.5923577", "0.58913356", "0.5872776", "0.58487344", "0.58283657", "0.57602173", "0.57503307", "0.55982226", "0.55793315", "0.5564691", "0.5559925", "0.5559049", "0.55503607", "0.5545811", "0.55343145", "0.551965", "0.55139786", "0.5494404", "0.54846394", "0.548233", "0.54522175", "0.54407287", "0.5437619", "0.5430164", "0.542843", "0.5419407", "0.5412148", "0.53976107", "0.53955436", "0.5389312", "0.5376912", "0.53680366", "0.5366814", "0.53655237", "0.5362289", "0.5361866", "0.53595775", "0.53506523", "0.53469664", "0.534469", "0.53428", "0.53302854", "0.53218925", "0.53212667", "0.5299375", "0.528666", "0.5278779", "0.5266793", "0.5261371", "0.52604866", "0.5257519", "0.52356714", "0.5231868", "0.5230435", "0.5227273", "0.5217131", "0.5215268", "0.5198404", "0.51964265", "0.5182737", "0.51740885", "0.51698536", "0.5167407", "0.51657456", "0.51622593", "0.5159588", "0.5151807", "0.5149098", "0.5140836", "0.51369065", "0.5134282", "0.5132744", "0.512839", "0.51268005", "0.5125421", "0.5117095", "0.5114098", "0.5112557", "0.5101779", "0.5093446", "0.5091157", "0.5085582", "0.50817096", "0.50817096", "0.5081658", "0.5080882", "0.5080517", "0.507635", "0.5071399", "0.5067578", "0.50662076", "0.5061304", "0.5041767" ]
0.7499952
0
get all departments assigned to company
public function getDepartments($onlyCostcenters = false) { $departments = new SplObjectStorage(); foreach ($this->getTable()->getDepartments() as $dep) { try { $department = new Yourdelivery_Model_Department($dep['id']); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $departments->attach($department); } $this->_departments = $departments; return $this->_departments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllDepartments() {\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllDepartments();\r\n }", "public function getDepartmentList() {\n return $this->_get(2);\n }", "public function getAllDepartmentInfo(){\n $LOG = Logger::getLogger(__CLASS__ . '.' . __FUNCTION__);\n\n $dao = new LabInspectionSummaryReportDAO();\n $min_year = $this->getMinimumReportYear();\n $departments = $dao->getDepartmentDetails(null, $min_year);\n\n return $departments;\n }", "function GetDepartments()\n\t{\n\t\t$result = $this->sendRequest(\"GetDepartments\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getDepartments() {\n //but if none, get from db\n if(null==$this->departments){\n $mapper=new Application_Model_DirectoryDepartmentMapper();\n $departments=$mapper->fetchAll();\n $options=array();\n foreach($departments as $department){\n $options[]=$department->getName();\n }\n $this->departments=$options;\n }\n return $this->departments;\n }", "public function ListDepartments(){\n\t\t$query = \"SELECT code, label, division, sortOrder FROM [DEPARTMENTS TABLE] ORDER BY sortOrder ASC\";\n\t\treturn array(\"results\" => $this->SelectQueryHelper($query));\n\t}", "public static function getDepartmentsList(){\n $cont = new RestController();\n\n $result = $cont->getRequest('ProductDepartments');\n\n $departments = [];\n\n if($result instanceof View){\n return $departments;\n }\n\n foreach($result->value as $dep){\n $departments[$dep->Id]=$dep->Name;\n }\n\n return $departments;\n\n }", "public function departments()\r\n {\r\n return new QueryForDepartments();\r\n }", "function getdepartments() {\n\t\t// import department db\n\t\tApp::import('Model','Department');\n\t\t$this->Department = & new Department();\n\t\t# fetch list of active departments \n\t\t$departments_list = $this->Department->find('list',array('conditions'=>array('Department.status'=>'1'),'fields'=>array('id','name'),'limit'=>10,'order'=>array('Department.id')));\n\t\treturn $departments_list;\n\t}", "public function getCompanyEmployees();", "public function getAllAvailableDepartments(){\n if( in_array('Admin', $this->getCurrentRoles()) ){\n // User is admin; get all Departments\n return $this->getAllDepartmentInfo();\n }\n else{\n // Non-admin user; just get their primary department\n return array(\n $this->getDepartmentInfo()\n );\n }\n }", "public function departments() {\n return $this->hasMany('Department')->orderBy('name');\n }", "public function GetAllDepartments()\r\n\t{\t\r\n\t\t$WhereCondition = \"\";\r\n\t\t$query = $this->db->query(\" \t\r\n\t\t\t\t\t\t\t\t\tSELECT * FROM `tbl_user_department`\r\n\t\t\t\t\t\t\t\t\");\r\n\t\t$result = $query->result_array();\t\t\t\r\n\t\treturn $result;\r\n\t}", "private function getDepartments(): array\n {\n try {\n /** @var Departments[] $departments */\n $departments = $this->getDoctrine()\n ->getRepository(Departments::class)\n ->findAll();\n }\n catch(\\Exception $ex) {\n return [];\n }\n\n return $departments;\n }", "function get_department(){\n $this->_db2->where(\"DeleteFlag\",\"A\");\n return $this->_db2->get($this->_tblorg);\n }", "public function getDepartment() {\n return response()->json([\n 'success' => true,\n 'statusCode' => 200,\n 'message' => 'Successfully retrieved clearances departments',\n 'data' => Department::all()]);\n }", "public static function all() {\n $departments = array();\n \n $rows = DB::query('SELECT * FROM Department');\n \n foreach ($rows as $row) {\n $departments[] = self::create_department($row);\n }\n \n return $departments;\n }", "public function getDepartments(){\r\n $sql=\"SELECT * FROM departments\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "function getTicketDepartments()\r\n\t{\r\n\t\treturn $this->call_API('getTicketDepartments');\r\n\t}", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function departments(){\n \t$departments = Department::all();\n\n \treturn view('departments.departments')->with('departments', $departments);\n }", "public function departments()\n {\n return $this->belongsToMany('App\\Models\\Department');\n }", "public function departments()\n {\n return $this->belongsToMany(\n config('core.acl.department'), \n config('core.acl.departments_roles_table'), \n 'role_id', \n 'department_id'\n );\n }", "public function getDepartnetsForVacancies(\\Doctrine\\ORM\\EntityManager $em) {\n $qb = $em->createQueryBuilder();\n $qb->select('d')\n ->from('Application\\Entity\\Departments', 'd')\n ->join('d.vacanciesVacancy', 'v')\n ->groupBy('d.departmentId')\n ;\n $query = $qb->getQuery();\n $query->useResultCache(TRUE);\n return $query->getArrayResult();\n }", "private function getDepartment() {\n\t\t$return = NULL;\n\t\t$sql = 'SELECT `#__Department`.* FROM `#__Department` LEFT JOIN `#__Department_User` ON `#__Department_User`.`department_id` = `#__Department`.`id` WHERE `#__Department_User`.`user_id` = ?';\n\t\t$result = $this->execute($sql, $this->id);\n\n\t\tif (count($result) > 0) {\n\t\t\t$return[$result[0]['id']] = $result[0];\n\t\t}\n\t\treturn $return;\n\t}", "public function companies(): Collection\n {\n return Company::all();\n }", "function get_companies_list() {\n return get_view_data('org_list');\n}", "public function allCompanies()\n {\n return Company::all();\n }", "function getDepartmentsByUsername(){\n if(Current_User::isDeity()){\n $db = &new PHPWS_DB('sysinventory_department');\n $db->addColumn('description');\n $db->addColumn('id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n return $list;\n // otherwise return a list of departments of which they're an admin \n }else if(Current_User::allow('sysinventory','admin')){\n $db = new PHPWS_DB('sysinventory_admin');\n $db->addWhere('username',Current_User::getUsername(),'ILIKE');\n $db->addJoin('left outer','sysinventory_admin','sysinventory_department','department_id','id');\n $db->addColumn('sysinventory_department.description');\n $db->addColumn('sysinventory_department.id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n \n return $list;\n }else{\n return NULL;\n }\n \n }", "function getDepartmentsByUsername(){\n if(Current_User::isDeity()){\n $db = &new PHPWS_DB('sysinventory_department');\n $db->addColumn('description');\n $db->addColumn('id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n return $list;\n // otherwise return a list of departments of which they're an admin \n }else if(Current_User::allow('sysinventory','admin')){\n $db = new PHPWS_DB('sysinventory_admin');\n $db->addWhere('username',Current_User::getUsername(),'ILIKE');\n $db->addJoin('left outer','sysinventory_admin','sysinventory_department','department_id','id');\n $db->addColumn('sysinventory_department.description');\n $db->addColumn('sysinventory_department.id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n \n return $list;\n }else{\n return NULL;\n }\n \n }", "public function getUsersDepartments()\n\t{\n\t\t$db = $this->getDbTable()->getAdapter();\n\t\t$select = $db->select()\n\t\t\t->from(array('u' => 'users'), array('user_id', 'name', 'surname', 'patronymic'))\n\t\t\t->joinLeft(array('ud' => 'users_departments'),\n\t\t\t\t'ud.user_id = u.user_id', array('department_id', 'chief'));\n\t\treturn $db->fetchAll($select);\t\n\t}", "public function departments()\n {\n $departments = Departments::where('status', 'active')->orderBy('idx')->get();\n foreach ($departments as $dept) {\n $subdepartment = Departments::where('department_id', $dept->subdepartment_id)->get();\n $dept['subdepartments'] = $subdepartment;\n }\n\n return view('setup.department.departments', compact('departments', 'subdepartment'));\n }", "public function getDeptItems()\n {\n return $this->hasMany(DeptItem::className(), ['sales_disc_gl_acc_id' => 'account_id']);\n }", "public function getdepartments(Request $request){\n $departments = Department::where('departmentable_id', intval($request->input('office_id')))->whereNull('deleted_at')->get();\n return response()->json(array('status' => true, 'data' => $departments));\n }", "public function getRelatedDepartments()\n\t{\n if (is_null($this->department)) return [];\n\n $member_department = $this->department()->get();\n\n\t\tif ($this->department()->first()->is_main()){\n\t\t\treturn $member_department->merge($this->department()->first()->descendants()->get());\n\t\t}else{\n\t\t\treturn $member_department->merge($this->department()->first()->ancestor()->get());\n\t\t}\n\t}", "public function getList(){\n\t\t$listeDepartements = array();\n\t\t$req = $this->db->prepare('SELECT dep_num,dep_nom,vil_num FROM departement ORDER BY dep_nom');\n\t\t$req->execute();\n\n\t\twhile ($departement = $req->fetch(PDO::FETCH_OBJ)) {\n\t\t\t$listeDepartements[]= new Departement($departement);\n\t\t}\n\n\t\treturn $listeDepartements;\n\t\t$req -> closeCursor();\n\t}", "public function getCompaniesReport() : CompaniesReport\n\t{\n\t\t$response = $this->execute('Empresa');\n\t\t\n\t\t$companiesByArea = [];\n\t\tforeach($response['e'] as $areaPool){\n\t\t\t$i = $areaPool['a'];\n\t\t\tforeach($areaPool['e'] as $company){\n\t\t\t\t$companiesByArea[$i][]=new Company(\n\t\t\t\t\t$company['a'],\n\t\t\t\t\t$company['c'],\n\t\t\t\t\t$company['n']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn new CompaniesReport($response['hr'],$companiesByArea);\n\t}", "public function department() {\n\t\treturn $this->has_many_and_belongs_to('Department', 'department_members');\n\t}", "public function index()\n {\n $departments = Department::orderBy('company_department_id','DESC')->get();\n return view('admin.department.index',compact('departments'));\n }", "public function get_dept()\n\t{\n\t\t$division_id = $this->input->post('division_id');\n\t\t$department['dept'] = $this->reports->get_dept($division_id);\n\t\techo json_encode($department);\n\t}", "private function getDeptIds(): array\n\t{\n\t\treturn config('curl-connection.' . $this->service . '.dept_ids');\n\t}", "public function departments()\n {\n $this->authCheck();\n\n $departmentData = DB::table('departments')\n ->get();\n \n $departments=view('admin.department_list')\n ->with('departmentData',$departmentData);\n\n return view('admin.master')\n ->with('main_content',$departments);\n }", "function getDepartments($conn){\n $codes = array();\n $depts = array();\n\n $cmd = $conn->prepare(\"SELECT code FROM courses GROUP BY code ORDER BY code\");\n $cmd->execute();\n $result = $cmd->get_result();\n while($row = $result->fetch_assoc()){\n array_push($codes, $row[\"code\"]);\n }\n\n foreach($codes as $code){\n //Split along the sace\n $dept = explode(\" \", $code)[0];\n //Add new department to array if not already in\n if(!in_array($dept, $depts)){\n array_push($depts, $dept);\n }\n }\n\n return $depts;\n }", "public function allDepartment(){\n\n $all_department=$this->settings->all_departmentasc();\n return response()->json([\n 'all_department' => $all_department,\n ], $this->successStatus);\n\n }", "function getDepartment($abbrev){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n\r\n $dept = $data->getDepartment($abbrev);\r\n $deptId = $dept[0][\"department_id\"];\r\n $programs = $data->getProgramsInDepartment($deptId);\r\n\r\n $output = array(\"deptInfo\"=>$dept, \"programs\"=>$programs);\r\n return $output;\r\n }", "public function index()\n {\n return Departments::all();\n }", "function getAllDept(){\r\n echo\r\n $query = \"SELECT dept_name,dept_id FROM department\";\r\n $result = $this->executeQuery($query); \r\n return $result;\r\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public function getCompaniesForSelect()\n {\n return Company::whereNull('deleted_at')->pluck('name', 'id');\n }", "function get_deleted_companies() {\n return get_view_data('org_list_archived');\n}", "public function departments() : BelongsToMany\n {\n return $this->belongsToMany(Department::class);\n }", "function getDepartments(){ // Return department codes and names from database.\n\n\tglobal $DB;\n\t\n\tif($DB->query(\"SELECT code, name FROM department ORDER BY code\")){\n\t\treturn $DB->results();\n\t}\n\t\n\telse{\n\t\treturn false;\n\t}\n}", "public function get()\n {\n return $this->remote->select()->from('departments')->getStatement()->fetchAll();\n }", "public function llenarDepartamentosModel(){\n\t\ttry{\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT iddept, name FROM department\"); //(\"SELECT idzone, zone FROM zones\");\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetchAll();\n\n\t\t\t$stmt = null;\n\n\t\t}catch(PDOException $error){\n\t\t\techo 'error: '.$error->getMessage();\n\t\t}\n\t}", "public static function userdept(){\n $rolelist = [];\n $db = Db::getInstance(); \t \n $req = $db->query('SELECT * FROM user_department'); \n foreach($req->fetchAll() as $row) {\n $rolelist[] = $row;\n }\n return $rolelist;\n \n }", "public function getCompanyDepartmentById($companyId, $departmentId)\n {\n $companyDepartment = Department::select('id', 'name')->find($departmentId);\n if ($companyDepartment) {\n $response_message = array('success' => true, 'message' => \"Data fetched\", 'data' => $companyDepartment);\n return response()->json($response_message);\n } else {\n $response_message = array('success' => false, 'message' => \"Department not found\");\n return response()->json($response_message);\n }\n \n \n }", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "public function getDepartmentsList($accountId)\n {\n $query = $this->createQueryBuilder('p')\n ->select('p,ca.name as accountName')\n ->leftJoin('CorporateBundle:CorpoAccount', 'ca', 'WITH', \"ca.id = p.accountId\");\n if ($accountId) {\n $query->where(\"p.accountId = :accountId\")\n ->setParameter(':accountId', $accountId);\n }\n\n $quer = $query->getQuery();\n $result = $quer->getScalarResult();\n\n if (!empty($result) && isset($result[0])) {\n return $result;\n } else {\n return array();\n }\n }", "function getDepartmentList($client_id=null) {\n\t\t $this->layout = false;\n\t\t //$this->autoRender = false;\n\t\t $departments = array();\n\t\t \n\t\t if($client_id != null){\n\t\t\t $client = $this->User->Client->Department->find('all',array('conditions'=>array('Client.id'=>$client_id,'Department.status'=>1)));\n\t\t\t foreach($client as $cli)\n\t\t\t\t {\n\t\t\t\t $departments[$cli['Department']['id']] = $cli['Department']['name'];\t\t\t\t \n\t\t\t\t }\n\t\t }\n\t\t $this->set('departments', $departments);\n\t\t \n\t\t //echo $this->Form->input('department_name', array('options' => $departments));\n\t }", "public function listofDepartments()\n {\n return view('Admin.ShowallDepartments');\n //.blade\n }", "public function get_dept()\n\t{\n\t\t$division_id = $this->input->post('division_id');\n\t\t$department['dept'] = $this->file_maintenance_model->get_dept($division_id);\n\t\techo json_encode($department);\n\t}", "function getConveyancingCompanies(){\n \n $conveyancingCompanies = array();\n \n $conveyancingLeadTypeCatIds = unserialize(CONVEYANCING_LEAD_TYPE_CATEGORY_IDS);\n foreach($conveyancingLeadTypeCatIds as $id){\n \n $leadTypeCat = new Models_LeadTypeCategory($id);\n $companies = $leadTypeCat->getCompanies();\n \n foreach($companies as $company){\n $conveyancingCompanies[$company[\"id\"]] = trim($company[\"companyName\"]);\n }\n }\n \n natcasesort($conveyancingCompanies);\n \n return $conveyancingCompanies;\n}", "public function dept_choice(){\n $outputs = array();\n $dept_type = (new TbMsCmnCdModel())->getCdKeyY(TbMsCmnCdModel::$department_type_cd_pre);\n $outputs['dept_type'] = $this->arrKeyVal2NewArr($dept_type);\n $dept_status = TbHrDeptModel::getStatusForDept();\n $outputs['dept_status'] = $this->arrKeyVal2NewArr($dept_status);\n $dept_incharge = TbHrDeptModel::getTypeForEDRelation();\n $outputs['dept_incharge'] = $this->arrKeyVal2NewArr($dept_incharge);\n\n return $outputs;\n }", "public function getDepartment()\n {\n $option = Paging::normalizeOption($_GET);\n $result = DepartmentTable::get($option);\n //$result = Paging::genNextPrev($option, $result);\n\n http_response_code(200);\n echo json_encode($result);\n }", "public function departures()\n {\n return $this->hasMany(Departure::class, 'from_port_id');\n }", "public function getCompany();", "public function department($dept)\n {\n //find by department code\n $personnels = $this->model\n ->where('office_code', '=', $dept)\n ->get();\n\n return $this->response->item($personnels, new PersonnelTransformer());\n }", "public function getdep()\n {\n $query = $this->db->get('departments');\n\n return $query->result();\n }", "public function getDepartamentosTodos(){\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$consulta=\"SELECT * FROM departamentos\";\n\t\t\t\t\n\n\t\t\t\t$query=$this->db->preparar($consulta);\n\t\t\t\t$query->execute();\n\t\t\t\t\n\t\t\t\t$tClientes = $query->fetchAll();\n\t\t\t\t\n\t\t\t\t//obtiene todas las tuplas de la tabla clientes\n\t\t\t\t//y devuelve el array $tClientes\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"Se ha producido un errro\";\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$tablaClientes=array(); //inicializamos la tabla de salida\n\t\t\tforeach ($tClientes as $fila) {\n\t\t\t\t$c=new Departamento($fila[0], $fila[1], \n\t\t\t\t\t$fila[2], $fila[3]);\n\t\t\t\tarray_push($tablaClientes, $c);\n\t\t\t}\n\t\t\treturn $tablaClientes;\n\t\t}", "function getUsersInDept($dept) {\r\n $data=new \\Cars\\Data\\Common($this->app);\r\n return $data->getUsersByLastNameInitAndDept(\"\",$dept);\r\n }", "public function getDepartment(){\r\n\t return $this->_department;\r\n\t}", "public function index()\n {\n return DepartmentResource::collection(Department::paginate());\n }", "function get_departments()\n {\n $organizationId = $this->uri->segment(4);\n $this->db->select(\"*\")\n ->from(TBL_DEPARTMENTS)\n ->where('organizationId', $organizationId);\n $db = $this->db->get();\n\n $array = array();\n foreach($db->result() as $row):\n $array[] = array(\"value\" => $row->departmentId, \"property\" => $row->departmentName);\n endforeach;\n\n echo json_encode($array);\n exit;\n }", "public function show_all_department(){\n // Jika yang mengakses bukan ADMIN, redirect ke department miliknya\n if(!Auth::user()->admin) return redirect('/department/'.Auth::user()->department_id);\n\n // Mengakses fungsi eloquent all() pada class model untuk mendapatkan semua data pada database.\n $departments = Department::all();\n\n // Membuat array asosiasi (association array) bernama $data yang digunakan untuk \n // menampung data $departments yang nantinya akan ditampilkan pada view.\n $data = [\n 'departments' => $departments\n ];\n\n // Menampilkan view dari file views/department/list_all_department.blade.php\n // dengan mengirimkan variabel $data yang akan ditampilkan di view tersebut.\n return view('department.list_all_department', $data);\n }", "public function getDepartment()\n {\n return $this->department;\n }", "public static function getAllDepartmentAcronyms()\n {\n\n return DB::table('l_contracts')\n ->select(['owner_acronym'])\n ->orderBy('owner_acronym')\n ->distinct()\n ->pluck('owner_acronym')\n ->toArray();\n }", "public function get_department() \n {\n return $this->department;\n }", "public function departments(Request $request){\n if (!$request->block) {\n $html = '<option value=\"\">Select Department</option>';\n }\n\n else {\n $html = '<option value=\"\">Select Department</option>';\n $departments = LocationInfo::where('block', $request->block)->distinct()->pluck('department');\n foreach ($departments as $department) {\n $html .= '<option value=\"'.$department.'\">'.$department.'</option>';\n }\n }\n\n return response()->json(['html' => $html]);\n }", "public function getCompany() {}", "public function getDepartmentUsers()\n {\n # code...\n $dept_id = auth()->user()->department_id;\n $users = User::where('department_id', $dept_id)->get();\n return response()->json(['users'=>$users]);\n }", "public function getHospitalDepartment($globalUtil,$condition){\n\t\t$sql = \"SELECT * FROM \".TABLE_HOSPITAL_DEPARTMENT_INFORMATION.\" \".$condition;\n\t\t$HospitalDeptDetails = $globalUtil->sqlFetchRowsAssoc($sql,2);\t\n\t\treturn $HospitalDeptDetails;\n\t\t}", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function getPersonelAdd() {\n $companies = Companies::all();\n return $companies;\n }", "public function index(){\n return Responser::ok('Projects available',Auth::user()->companies->reduce(function($carry,$company){\n $company->projects->each(function($project) use(&$carry){\n $project->load('company');\n $carry[] = $project;\n });\n\n return $carry;\n },[]));\n }", "public function deptlist(){\n\t\t\t$prgid = $this->input->post('stu_prgname');\n\t\t\t//print_r($prgid);die;\n\t\t\t$sarray='prg_deptid';\n\t\t\t$wharray = array('prg_id' => $prgid);\n\t\t\t$department = $this->commodel->get_listarry('program',$sarray,$wharray);\n\t\tforeach($department as $datas):\n\t\t\t\t$deptid = $datas->prg_deptid; \n\t\t\t\t$deptname=$this->commodel->get_listspfic1('Department','dept_name','dept_id',$deptid)->dept_name;\n\t\t\t\techo \"<option id='stu_departname' value='$deptid'>\".\"$deptname\".\"</option>\";\n \t\tendforeach;\n\t }", "function getUserDepartments($user) {\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n\r\n return $data->getUserDepartments($user);\r\n\r\n }", "public function index()\n {\n $departments = Department::with('office.organisation')\n ->where('status','Active')\n ->orderBy('id','DESC')\n ->paginate(6);\n\n $organisations = Organisation::where('status','Active')\n ->orderBy('organisation','ASC')\n ->get();\n\n return view('admin/department/departments',compact('departments','organisations'));\n }", "function GetDepartmentList($departmentIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetDepartmentList\", array(\"DepartmentIds\"=>$departmentIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function get_departments() {\r\n switch_to_blog(1);\r\n $depts = get_terms([\r\n 'taxonomy' => 'dept',\r\n 'hide_empty' => false,\r\n ]);\r\n restore_current_blog();\r\n\r\n if( !is_array( $depts ) || empty( $depts ) ) {\r\n $url = \"https://news.cah.ucf.edu/wp-json/news/depts\";\r\n $response = wp_remote_get( $url, ['timeout' => 20] );\r\n if( is_wp_error( $response ) ) {\r\n $depts = [];\r\n }\r\n else {\r\n $depts = json_decode( $response['body'] );\r\n }\r\n }\r\n return $depts;\r\n}", "public static function getList()\n {\n return CHtml::listData(Departamentos::model()->findAll(),'id_departamento', 'descripcion');\n }", "function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$CompArr[$Sql->Position]['Name']=htmlspecialchars(stripslashes($Row->NAME));\n\t\t$CompArr[$Sql->Position]['Value']=$Row->ID;\n\t}\n\treturn $CompArr;\n}", "public static function GetDepartmentListIndexedbyID() {\n global $dbh;\n $deptList = array();\n $stmt = $dbh->prepare('SELECT * FROM fac_Department ORDER BY Name ASC');\n $stmt->execute();\n while ($row = $stmt->fetch()) {\n $dept = Department::RowToObject($row);\n $deptList[$dept->DeptID] = $dept;\n }\n\t\treturn $deptList;\n\t}", "public function getCompanyWithUsers();", "public function departemen()\n {\n //Query untuk mengambil semua data departemen dan diurutkan berdasarkan nama_dept\n $query = $this->db->query(\"SELECT * FROM departemen ORDER BY nama_dept\");\n return $query;\n }", "public function getFreeCompanies() { return $this->FreeCompanies; }", "public function userdepartments()\n {\n return $this->belongsToMany(\n config('core.acl.department'), \n config('core.acl.user_role_department')\n )->withPivot('user_id');\n }", "public function manageDepartments()\n {\n $departmentArr = Department::all();\n return view('admin.manage.departments', ['departments' => $departmentArr, 'count' => 0]);\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function getDepartment()\n {\n return $this->hasOne(Departments::className(), ['ID' => 'DepartmentID']);\n }", "public function getDepartment(): string;" ]
[ "0.73565865", "0.6898825", "0.68211037", "0.6766175", "0.6687836", "0.6546002", "0.652315", "0.64614624", "0.6425933", "0.63521415", "0.63421345", "0.6336638", "0.6335205", "0.6334583", "0.6321534", "0.63174796", "0.62856674", "0.62610394", "0.6260421", "0.62184954", "0.61882955", "0.6165075", "0.6138615", "0.60939544", "0.6025964", "0.60249174", "0.6022471", "0.6021887", "0.6011205", "0.6011205", "0.6009895", "0.59988666", "0.5996335", "0.599218", "0.5986397", "0.59339845", "0.59324425", "0.59078693", "0.5905062", "0.59040755", "0.58853966", "0.58842516", "0.58752584", "0.58724535", "0.58407825", "0.5807684", "0.57869613", "0.57844836", "0.5784361", "0.5784101", "0.57703465", "0.5769965", "0.5763065", "0.5761955", "0.5756613", "0.57565665", "0.5755445", "0.57519233", "0.5751517", "0.5736001", "0.57259285", "0.5700454", "0.5699201", "0.5692729", "0.5689452", "0.56825614", "0.56823456", "0.5680764", "0.56788415", "0.5676693", "0.56766105", "0.5676262", "0.5656364", "0.56413805", "0.5637046", "0.5635836", "0.5635662", "0.56332165", "0.56114405", "0.56094563", "0.5599667", "0.5596969", "0.5589485", "0.5581835", "0.5581662", "0.5573296", "0.5567655", "0.55674577", "0.5561935", "0.5561482", "0.5552177", "0.5543357", "0.55384564", "0.5534959", "0.5534781", "0.5527831", "0.55226004", "0.55091166", "0.55029225", "0.55009615" ]
0.6123944
23
get all costcenters assigned to company
public function getCostcenters() { return $this->getDepartments(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function getAllForCustonObj() {\n $query = $this->db->query(\"SELECT * FROM $this->table ORDER BY shortname;\");\n $this->allcpny = $query->custom_result_object('entity\\Company');\n // print \"<pre>\";\n // print_r($this->cpny);\n // print \"</pre>\";\n // exit();\n return $this->allcpny;\n }", "function Companies(){\n\t\t\t\treturn $this->companies;\n\t\t\t}", "public function costCenterAllocated($years)\n {\n $entityManager = $this->getEntityManager();\n\n // Get the current open year\n $year = $years->findOneBy(['is_open' => true, 'is_current' => true]);\n\n $dql = 'SELECT c \n FROM App\\Entity\\CostCenter c, App\\Entity\\ParamCostCenter p \n WHERE c.id = p.costcenter AND p.year = ' . $year;\n $query = $entityManager->createQuery($dql);\n var_dump($query->execute());\n die;\n return $query->execute();\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function companies(): Collection\n {\n return Company::all();\n }", "public function listarCentro()\r\n {\r\n $sql = \"SELECT * FROM Centro\";\r\n $resultado = $this-> conex-> consultaRetorno($sql);\r\n return $resultado;\r\n }", "public function get_centroCosto(){\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"SELECT distinct AREA.COD_CC2, AREA.NOM_CC2 \n\t\t\t\t\t\tFROM CENTROCOSTO2 AREA, EMPLEADOS_BASIC EPL, EMPLEADOS_GRAL GRAL\n\t\t\t\t\t\tWHERE EPL.COD_EPL = GRAL.COD_EPL\n\t\t\t\t\t\tAND EPL.COD_CC2=AREA.COD_CC2\n\t\t\t\t\t\tand AREA.estado='A'\n\t\t\t\t\t\tand EPL.estado='A'\n\t\t\t\t\t\torder by nom_cc2 asc\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"COD_CC2\"],\n\t\t\t\t\t\t\t\t\t\t \"area\"\t => utf8_encode($fila[\"NOM_CC2\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t\t\n\t\t\t\n\t\t}", "public function scopeCostCenters($query)\n\t{\n\t\treturn $query->where('cost_center', 1);\n\t}", "public function getSalesCenterAndCommodity(Request $request) {\n $client = Client::find($request->client_id);\n if (!empty($client)) {\n /* check user access level */\n if(Auth::check() && Auth::user()->hasAccessLevels('salescenter')) {\n $salesCenters = getAllSalesCenter();\n } else {\n $salesCenters = $client->salesCenters()->orderBy('name')->get();\n }\n $commodity = $client->commodity()->orderBy('name')->get();\n\n return response()->json([\n \"status\" => true,\n \"data\" => [\n 'sales_centers' => $salesCenters,\n 'commodity' => $commodity\n ]\n ]);\n } else {\n $salesCenters = getAllSalesCenter();\n $commodity = Commodity::orderBy('name')->get();\n return response()->json([\n\n \"status\" => true,\n \"data\" => [\n 'sales_centers' => $salesCenters,\n 'commodity' => $commodity\n ]\n ]);\n }\n }", "public function get_cargosCentroCosto($centro_costo,$cargos){\n\t\t\t\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"select cod_epl, rtrim(nom_epl)+' '+rtrim(ape_epl) as nombres from empleados_basic where cod_car='\".$cargos.\"' and cod_cc2 ='\".$centro_costo.\"' and estado='A'\";\n\n\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"cod_epl\"],\n\t\t\t\t\t\t\t\t\t\t \"nombres\"=> utf8_encode($fila[\"nombres\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t}", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function getOriginCompanies () {\n $corp = $this->perteneceCorporacion();\n\n if ($corp) {\n return new ArrayObjectList([$corp, $this]);\n }\n\n return new ArrayObjectList([$this]);\n }", "public function getCompany();", "public function getCompanyWithUsers();", "public function getContracts()\n {\n return $this->hasMany(Contracts::className(), ['company_id' => 'id']);\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public function testGetCentersList()\n {\n if ($this->only_priority_tests) {\n $this->markTestSkipped(\"Running only priority tests.\");\n }\n\n $this->load('/centers?city_id=1');\n $data = json_decode($this->response->getContent());\n\n $this->assertEquals($data->status, 'success');\n $search_for = 'Ashadeep';\n $found = false;\n foreach ($data->data->centers as $key => $info) {\n if ($info->name == $search_for) {\n $found = true;\n break;\n }\n }\n $this->assertTrue($found);\n $this->assertEquals(count($data->data->centers), 8);\n $this->response->assertStatus(200);\n }", "public function getCompany() {\n return Companies::findById($this->company_id);\n }", "public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }", "public function getFreeCompanies() { return $this->FreeCompanies; }", "public function getCompany() {}", "public function getEmployeesByCostCenter($costCenter) {\n\t\t$em = $this->getEntityManager();\n\t\t$employees = $em->getRepository('Employee')->findByCostCenter($costCenter);\n\t\t\n\t\tforeach ($employees as &$employee) {\n\t\t\t$metaData = $em->getRepository('MetaData')->findBy(array(\n\t\t\t\t'type' => 'employee',\n\t\t\t\t'typeID' => $employee->getEmployeeID()\n\t\t\t), array(\n\t\t\t\t'valueOrder' => 'ASC'\n\t\t\t));\n\t\t\t$employee->meta_data = $metaData;\n\t\t}\n\t\t\n\t\treturn $this->respond($employees);\n\t}", "public function getCompanyEmployees();", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "public function getCompaniesCrmSearchUrl()\n {\n $type = 'company' ;\n return $this->getEntitiesCrmSearchUrl( $type ) ;\n }", "public function getCompanies($document)\n {\n $docs = $this->clienteRepository->getCompanies($document);\n\n return $this->ok($docs);\n }", "public function obtenerCentroCotizacions($count = false){\n if( $count ){\n $sql = \"SELECT count(uid_elemento) FROM \". TABLE_CENTRO_COTIZACION .\" WHERE uid_elemento = {$this->getUID()} AND uid_modulo = {$this->getModuleId()}\";\n return $this->db->query($sql, 0, 0);\n } else {\n $sql = \"SELECT uid_centrocotizacion FROM \". TABLE_CENTRO_COTIZACION .\" WHERE uid_elemento = {$this->getUID()} AND uid_modulo = {$this->getModuleId()}\";\n $items = $this->db->query($sql, \"*\", 0, \"centrocotizacion\");\n return new ArrayObjectList($items);\n }\n }", "function getCostAccountCompany(){\n\treturn campo('config_system','id','1','cost_account_company');\n}", "function getCostAccountCompany(){\n\treturn campo('config_system','id','1','cost_account_company');\n}", "public function getAllCompanies(){\n\t\t$path=\"../db/data.json\";\n\t\t$file=$this->getData($path);\n\t\n\t\t$arrayFile = json_decode($file, true);\n\t\n\t\treturn $arrayFile['companies'];\n\t}", "public function getCompaniesReport() : CompaniesReport\n\t{\n\t\t$response = $this->execute('Empresa');\n\t\t\n\t\t$companiesByArea = [];\n\t\tforeach($response['e'] as $areaPool){\n\t\t\t$i = $areaPool['a'];\n\t\t\tforeach($areaPool['e'] as $company){\n\t\t\t\t$companiesByArea[$i][]=new Company(\n\t\t\t\t\t$company['a'],\n\t\t\t\t\t$company['c'],\n\t\t\t\t\t$company['n']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn new CompaniesReport($response['hr'],$companiesByArea);\n\t}", "public function getCoCentroDato()\n\t{\n\t\treturn $this->co_centro_dato;\n\t}", "public function getOwnerCompanies () {\n\t\t\tif (count($this) === 0) return new ArrayObjectList;\n\n\t\t\t$db \t\t= db::singleton();\n\t\t\t$table \t\t= TABLE_DOCUMENTOS_ELEMENTOS . \" INNER JOIN \". TABLE_DOCUMENTO_ATRIBUTO . \" USING (uid_documento_atributo)\";\n\t\t\t$set \t\t= $this->toComaList();\n\t\t\t$SQL \t\t= \"SELECT uid_empresa_propietaria FROM {$table} WHERE uid_documento_elemento IN ({$set}) GROUP BY uid_empresa_propietaria\";\n\t\t\t$collection\t= $db->query($SQL, '*', 0, \"empresa\");\n\n\n\t\t\treturn new ArrayObjectList($collection);\n\t\t}", "public function return_islamic_centers_for_Rating(){\n return IslamicCenter::return_islamic_centers_for_Rating();\n }", "function SHOWALL(){\n\n $stmt = $this->db->prepare(\"SELECT * FROM centro\");\n $stmt->execute();\n $centros_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $allcentros = array(); //array para almacenar los datos de todos los centros\n\n //Recorremos todos las filas de centros devueltas por la sentencia sql\n foreach ($centros_db as $centro){\n //Introducimos uno a uno los grupos recuperados de la BD\n array_push($allcentros,\n new CENTRO_Model(\n $centro['centro_id'],$centro['nombre_centro'],$centro['edificio_centro']\n )\n );\n }\n return $allcentros;\n }", "public function initGearCompanyInfos()\n\t{\n\t\t$this->collGearCompanyInfos = array();\n\t}", "public function get_cargos($centro_costo){\n\t\t\t\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"SELECT distinct c.cod_car, C.NOM_CAR \n\t\t\t\t\t FROM CARGOS C, CENTROCOSTO2 AREA, EMPLEADOS_BASIC EPL\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t EPL.COD_CC2='\".$centro_costo.\"'\n\t\t\t\t\t\tAND EPL.COD_CAR=C.COD_CAR\n\t\t\t\t\t\torder by nom_car asc\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"cod_car\"],\n\t\t\t\t\t\t\t\t\t\t \"cargos\"=> utf8_encode($fila[\"NOM_CAR\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t\n\t\t}", "function GetCompanies()\n{\n\t$CompArr=array();\n\t$Query = \"SELECT * FROM \".PFX.\"_tracker_client ORDER BY NAME ASC\";\n\t$Sql = new Query($Query);\n\twhile ($Row=$Sql->Row()) {\n\t\t$CompArr[$Sql->Position]['Name']=htmlspecialchars(stripslashes($Row->NAME));\n\t\t$CompArr[$Sql->Position]['Value']=$Row->ID;\n\t}\n\treturn $CompArr;\n}", "public function centres()\n {\n return $this->hasMany(Centre::class);\n }", "public function findCompanies(){\n $data = SCompany::select('id_company', 'name')\n ->get();\n return response()->json($data);\n }", "public static function getAvailableContractors(): array\n {\n $contractorsQuery = ContractorOccupation::find()->select('DISTINCT(contractor_id)');\n\n return self::find()\n ->select('*')\n ->addSelect([\n 'COUNT(task.contractor_id) AS doneTaskCount',\n 'COUNT(review.task_id) AS reviewCount',\n 'AVG(review.rating) AS rating'\n ])\n ->rightJoin(['occupation' => $contractorsQuery], 'user.id = occupation.contractor_id')\n ->leftJoin('task', 'task.contractor_id = user.id')\n ->leftJoin('review', 'task.id = review.task_id')\n\n ->andWhere(['task.state_id' => Task::STATE_DONE])\n ->andWhere(['user.hide_profile' => false])\n ->groupBy('user.id')\n ->orderBy('user.datetime_created ASC')\n ->all();\n }", "public function company()\n {\n return $this->business();\n }", "public function getCentros($provincia_id = 19, $departamento = false, $localidad = false) {\n\t //si departamento o localidad tienen valores, traigo los centros usando esos filtros\n\t $new_centros = array();\n $centros = $this->Centro->getCentrosLocation($provincia_id = 19, $departamento, $localidad);\n\t\tif (!empty($centros)) {\n\t \t foreach ($centros as $centro) {\n\t \t \t$new_centros[$centro[\"Centro\"][\"id\"]] = $centro[\"Centro\"][\"nombre\"];\n\t \t}\t\n \t $centros = $new_centros;\n\t\t};\n\t\t\n\t\t$this->set(compact(\"centros\"));\t\n\t\t\n }", "public function getAllCompanyAccounts()\n { \n // select all fields and columns form the 'companies' table and return is as an array of objects\n $companies = Company::all();\n\n // if the length of array of company objects is greater than 0 (contains elements)\n if (count($companies) > 0) {\n // loop through each company, get the token from the 'company_activation_codes' table and update the object\n foreach ($companies as $key => $value) {\n $token = CompanyActivationCode::where('company_id', $value['id'])->first()->activation_code;\n $value['token'] = $token;\n $companies[$key] = $value;\n }\n }\n \n // send a response to the requester of the data\n $response_message = array('success' => true, 'message' => 'Data fetched', 'data' => $companies);\n return response()->json($response_message);\n }", "public static function getAllGroupCompanies($ccgr_id) {\n $sql = \"\n SELECT \n ccmp_id,\n ccmp_name \n FROM\n ccxg_company_x_group \n INNER JOIN ccmp_company \n ON ccxg_ccmp_id = ccmp_id \n WHERE ccxg_ccgr_id = :ccgr_id\n ORDER BY ccmp_name\n \";\n return Yii::app()->db\n ->createCommand($sql)\n ->bindParam(\":ccgr_id\", $ccgr_id, PDO::PARAM_INT)\n ->queryAll();\n }", "public function companylist() {\r\n $companies = $this->model->getCompanies();\r\n return $this->view('company/companylist', $companies);\r\n }", "public function scopeFindByCostCenter($query, $c)\n {\n $struct = SAP\\StructDisp::selfStruct()\n ->costCenterOf($c)\n ->get();\n\n $struct->each(function ($item, $key) {\n\n // mencari di Employee\n $employee = Employee::where('personnel_no', $item->empnik)\n ->first();\n\n // jika tidak ditemukan di Employee buat baru\n if (is_null($employee)) {\n $employee = new Employee();\n $employee->personnel_no = $item->empnik;\n }\n\n // buat baru / update perubahan employee\n $employee->name = $item->empname;\n $employee->esgrp = $item->emppersk;\n $employee->cost_ctr = $item->empkostl;\n $employee->position_name = $item->emppostx;\n $employee->org_unit_name = $item->emportx;\n $employee->save();\n });\n\n // kembalikan data Employee berdasarkan pencarian (terbaru)\n return $query->where('cost_ctr', $c);\n }", "function getConveyancingCompanies(){\n \n $conveyancingCompanies = array();\n \n $conveyancingLeadTypeCatIds = unserialize(CONVEYANCING_LEAD_TYPE_CATEGORY_IDS);\n foreach($conveyancingLeadTypeCatIds as $id){\n \n $leadTypeCat = new Models_LeadTypeCategory($id);\n $companies = $leadTypeCat->getCompanies();\n \n foreach($companies as $company){\n $conveyancingCompanies[$company[\"id\"]] = trim($company[\"companyName\"]);\n }\n }\n \n natcasesort($conveyancingCompanies);\n \n return $conveyancingCompanies;\n}", "public function getContractorOccupations()\n {\n return $this->hasMany(ContractorOccupation::className(), ['contractor_id' => 'id']);\n }", "function get_companies_list() {\n return get_view_data('org_list');\n}", "public function companies()\n {\n return $this->belongsToMany('Villato\\Company', 'company_region_product', 'product_id', 'company_id');\n }", "public function index()\n {\n $centers = Center::query()->with('city')->get();\n return view('cms.center.index', compact('centers'));\n }", "function get_all_continents($obj = '')\n{\n\t$continent_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_continents_list', array()));\n\t\n\treturn $continent_result->result_array();\n}", "function fn_GetInsuranceCalculationCompanies(){\n\t\t\t$params = $this->params;\n\t\t\t$wsdl \t= $this->wsdl;\n\t\t\t$responce = \"\";\n\t\t\ttry{\n\t\t\t\t$soap = new SoapClient($wsdl, $params);\n\t\t\t\t$responce = $soap->GetInsuranceCalculationCompanies();\n\t\t\t} \n\t\t\tcatch (SoapFault $e) {\n\t\t\t\t//$responce = \"\";\n\t\t\t \t//$responce = 'Caught exception:'.$e->getMessage().\"\\n\";\n\t\t\t \t\n\t\t\t \t$responce['faultcode'] \t\t= $e->faultcode;\n\t\t\t $responce['faultstring'] \t= $e->faultstring;\n\t\t\t $responce['faultactor'] \t= $e->faultactor;\n\t\t\t $responce['faultname'] \t\t= $e->faultname;\n\t\t\t $responce['headerfault'] \t= $e->headerfault;\n\t\t\t}\n\t\t\treturn $responce;\n\t\t}", "public function clients() {\n\t\treturn $this->clients_model->getClients($this->compID);\n\t}", "public function getAddresses() {\n $table = new Yourdelivery_Model_DbTable_Locations();\n return $table->fetchAll('companyId = ' . $this->getId());\n }", "public function testGetAllCompanies()\n {\n $response = $this->get('/api/v1/company');\n\n $response->assertStatus(200);\n }", "public function getallCreditCustomers() \n\t{ \n\t $cid = $this->gasolinereceived_model->getCompanyId();\n\t\t $cid1 = $cid['0']->c_id;\n\t\t \n\t\t $this->db->where('c_id',$cid1);\n\t\t \n\t\t $this->db->order_by('date_created','DESC');\n\t\t $query = $this->db->get('credit_customer')->result();\n\t $q=$this->db->last_query($query );\n\t\t// print_r($q); die('err');\n\t return $query;\n\t \n\t}", "public function testCanGetDatacenters(): void\n {\n $client = new CatalogClient(ConsulManager::testConfig());\n\n [$dcs, $err] = $client->Datacenters();\n\n try {\n self::assertNull($err, 'CatalogClient::datacenters returned error: ' . $err);\n self::assertIsArray($dcs);\n self::assertCount(1, $dcs);\n self::assertSame('dc1', $dcs[0]);\n } catch (AssertionFailedError $e) {\n \\var_dump($dcs);\n throw $e;\n }\n }", "public function getCoCNES()\n {\n return isset($this->coCNES) ? $this->coCNES : null;\n }", "function select_all_company() {\n\t\t$qury=\"SELECT * FROM company\";\n\t\t$requet=mysqli_query($link,$qury);\n\t\t\n\t\twhile($res=mysqli_fetch_assoc($requet)) {\n\t\t\t$data[]=$res;\n\t\t}\n\t\treturn $data;\n\t}", "public function company(Request $request)\n {\n $company_customer = Company::find($request->id);\n return response()->json($company_customer);\n }", "public function listAllCustomers();", "public static function getAllCentre_id() {\n try {\n $database = Model::getInstance();\n $query = \"select centre_id from stock\";\n $statement = $database->prepare($query);\n $statement->execute();\n $results = $statement->fetchAll(PDO::FETCH_COLUMN, 0);\n return $results;\n } catch (PDOException $e) {\n printf(\"%s - %s<p/>\\n\", $e->getCode(), $e->getMessage());\n return NULL;\n }\n }", "public function index()\n {\n return Company::all();\n }", "public function index()\n {\n return Company::all();\n }", "public function exam_centers() {\n $center = Exam_centers::all();\n $data['center'] = $center;\n return view('admin.exam_centres', $data);\n }", "public function getAllClient() {\n $qb = $this ->createQueryBuilder('p')\n ->select('p')\n ->where('p.estEmploye = 0')\n ->orderBy('p.nom');\n return $qb->getQuery()->getResult();\n }", "public function getCentresCount()\n {\n return $this->manager->createQuery('SELECT COUNT(c) FROM App\\Entity\\CentreEtatCivil c')\n ->getSingleScalarResult();\n }", "public function all()\n\t{\t\n\t\t$counts = $this->contact_model->get_conatct_counts();\n\t\t$this->load->library('pagination');\n\t\t$config['base_url'] = base_url().'/Company/index';\n\t\t$config['total_rows'] = $counts;\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$contacts = $this->contact_model->get_all_conatct();\n\t\t\n\t\t$response = array('total' => $counts,\n\t\t\t\t\t\t'contacts' => $contacts);\n\t\techo json_encode($response);\n\t}", "public function getCreditmemoWarehouseList();", "public function buildDefaultCostTables() {\n\t\t// Get services table data\n\t\t$service_list = new ServicesInfo;\n\t\t$service_list = $service_list->getServicesTableData($id_list = NULL); // Note that the sizeof($service_data) == 8\n\t\t$cost_table_array = array();\n\t\tforeach ($service_list as $value) {\n\t\t\t$cost_table_array[$value['svc_name']][] = array('svc_id' => $value['svc_id'], 'svc_name' => '', 'cost_desc' => '', 'cost_code' => '', 'cost_ro_count' => '', 'cost_parts_sale' => '', 'cost_parts_cost' => '', 'cost_labor_sale' => '');\n\t\t}\n\t\treturn $cost_table_array;\n\t}", "public function get_customers_for_dropdown($company){\r\n\t\theader(\"Access-Control-Allow-Origin: \". base_url());\r\n\t\terror_log(\"get_customers_for_dropdown($company)\");\r\n\r\n\t\t$cid = intval($company);\r\n\t\tif($cid>0){\r\n\t\t\t$cs = $this->customer_model->get_companys_customers($cid);\r\n\t\t}\r\n\t\telse if($cid == 0){\r\n\t\t\t$cs = $this->customer_model->get_customers();\r\n\t\t}\r\n\t\telse{\r\n\t\t\techo \"0\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$data = array();\r\n\t\tforeach($cs as $c){\r\n\t\t\t$id = $c[\"id\"];\r\n\t\t\t$name = $c[\"namn\"];\r\n\t\t\t$data[] = array($id => $name);\r\n\t\t}\r\n\t\terror_log(print_r($data, true));\r\n\t\techo json_encode($data);\r\n\t}", "public function companyOfUser(){\n\n $company = Auth::user()->companies;\n $location = Location::where('id', Auth::user()->company_location)->get();\n \n foreach($company as $c){\n $c['locations'] = $location;\n }\n\n return $company;\n }", "public function getCompany() : \\App\\Domain\\Model\\Company\n {\n return $this->getRef('from__company_id__to__table__companies__columns__id', 'products');\n }", "public function getContractors()\n {\n return $this->hasMany(User::className(), ['id' => 'contractor_id'])->viaTable('favorite_contractor', ['customer_id' => 'id']);\n }", "public function company()\n {\n return $this->hasMany('\\App\\Company', 'id_plan');\n }", "public function getlatestCompanies()\n {\n $AdminDashboardModel = $this->model('AdminDashboardModel');\n $this->latestCompanies = $AdminDashboardModel->getLatestCompanies();\n }", "public function getCustomers()\n {\n return $this->hasMany(Customer::className(), ['currency_id' => 'currency_id']);\n }", "public function listallAction(Request $request)\n {\n if (! $request->isXmlHttpRequest()) {\n throw new NotFoundHttpException();\n }\n\t\n $em = $this->getDoctrine()->getManager();\n $maincompany = $this->getUser()->getMaincompany();\n $entities = $em->getRepository('NvCargaBundle:Customer')->findBy(['maincompany'=>$maincompany,'active'=>true]);\n \n $result=array();\n $counter = 0;\n foreach ($entities as $entity) {\n foreach ($entity->getBaddress() as $dir ) {\n $city = $dir->getCity();\n if ($city) { \n $result[$counter]['name'] = $dir->getName();\n $result[$counter]['lastname'] = $dir->getLastname();\n if ($dir->getCustomer()->getPobox()) {\n $result[$counter]['pobox'] = $dir->getCustomer()->getPobox()->getNumber();\n } else {\n $result[$counter]['pobox'] = '';\n }\n $result[$counter]['email'] = $dir->getCustomer()->getEmail();\n\n $result[$counter]['docid'] = $dir->getDocid();\n $result[$counter]['address'] = $dir->getAddress();\n $result[$counter]['customerid'] = $entity->getId();\n \n $result[$counter]['cityid'] = $city->getId();\n $result[$counter]['cityname'] = $city->getName();\n $result[$counter]['state'] = $city->getState()->getName();\n $result[$counter]['country'] = $city->getState()->getCountry()->getName();\n $result[$counter]['phone'] = $dir->getPhone();\n $result[$counter]['mobile'] = $dir->getMobile();\n \n $result[$counter]['barrio'] = $dir->getBarrio();\n $result[$counter]['zip'] = $dir->getZip();\n if ($dir->getCustomer()->getType()) {\n $result[$counter]['type'] = $dir->getCustomer()->getType()->getName();\n } else {\n $result[$counter]['type'] = 'Persona';\n }\n $counter++;\n }\n }\n }\n// foreach ($entities as $entity) {\n// $result[$counter]['customerid'] = $entity->getId();\n// $result[$counter]['name'] = $entity->getName();\n// $result[$counter]['lastname'] = $entity->getLastname();\n// if ($entity->getPobox()) {\n// $result[$counter]['pobox'] = $entity->getPobox()->getNumber();\n// } else {\n// $result[$counter]['pobox'] = '';\n// }\n// $result[$counter]['email'] = $entity->getEmail();\n// \n// $result[$counter]['docid'] = $entity->getAdrdefault()->getDocid();\n// $result[$counter]['address'] = $entity->getAdrdefault()->getAddress();\n// $city = $entity->getAdrdefault()->getCity();\n// $result[$counter]['cityid'] = $city->getId();\n// $result[$counter]['cityname'] = $city->getName();\n// $result[$counter]['state'] = $city->getState()->getName();\n// $result[$counter]['country'] = $city->getState()->getCountry()->getName();\n// $result[$counter]['phone'] = $entity->getAdrdefault()->getPhone();\n// $result[$counter]['mobile'] = $entity->getAdrdefault()->getMobile();\n// \n// $result[$counter]['barrio'] = $entity->getAdrdefault()->getBarrio();\n// $result[$counter]['zip'] = $entity->getAdrdefault()->getZip();\n// $result[$counter]['type'] = $entity->getType()->getName();\n// $counter++;\n// }\n return new JsonResponse($result); \n }", "public function getGearCompanyInfos($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(UserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collGearCompanyInfos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collGearCompanyInfos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(GearCompanyInfoPeer::USER_ID, $this->id);\n\n\t\t\t\tGearCompanyInfoPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collGearCompanyInfos = GearCompanyInfoPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(GearCompanyInfoPeer::USER_ID, $this->id);\n\n\t\t\t\tGearCompanyInfoPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastGearCompanyInfoCriteria) || !$this->lastGearCompanyInfoCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collGearCompanyInfos = GearCompanyInfoPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastGearCompanyInfoCriteria = $criteria;\n\t\treturn $this->collGearCompanyInfos;\n\t}", "public function companies()\n {\n return $this->hasMany('App\\Company');\n }", "public function getFkAlmoxarifadoCentroCustoEntidades()\n {\n return $this->fkAlmoxarifadoCentroCustoEntidades;\n }", "function getListaCentros($sCondicion = '', $orden = '')\n {\n $oDbl = $this->getoDbl_Select();\n $nom_tabla = $this->getNomTabla();\n if (empty($orden)) {\n $orden = 'nombre_ubi';\n }\n if (empty($sCondicion)) $sCondicion = \"WHERE status = 't'\";\n $sQuery = \"SELECT id_ubi, nombre_ubi\n\t\t\t\tFROM $nom_tabla\n\t\t\t\t$sCondicion\n\t\t\t\tORDER BY $orden\";\n if (($oDblSt = $oDbl->query($sQuery)) === false) {\n $sClauError = 'GestorCentro.lista';\n $_SESSION['oGestorErrores']->addErrorAppLastError($oDbl, $sClauError, __LINE__, __FILE__);\n return false;\n }\n return new web\\Desplegable('', $oDblSt, '', true);\n }", "public function getEmployees() {\n if ( is_null($this->_employees) ){\n $customers = $this->getTable()->getEmployees();\n $objects = new splObjectStorage();\n\n foreach ($customers AS $customer) {\n try {\n $ccust = new Yourdelivery_Model_Customer_Company($customer->customerId, $this->getId());\n if ($ccust->isDeleted()) {\n continue;\n }\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $objects->attach($ccust);\n }\n $this->_employees = $objects;\n }\n return $this->_employees;\n }", "public function getAdmins() {\n $a = new SplObjectStorage();\n $admins = $this->getTable()->getAdmins();\n foreach ($admins as $admin) {\n try {\n $customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId());\n $a->attach($customer);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n }\n return $a;\n }", "private function loadDistributors() {\n\t\t\n\t\t\t$sql = \"SELECT dst_id FROM dst_cmp WHERE cmp_id='$companyID'\";\n\t\t\t\n\t\t\t$rawResult = $gremlin->query($sql);\n\t\t\t\n\t\t\tforeach($rawResult as $newCont) {\n\t\t\t\n\t\t\t\t$newDist = new Company($newCont);\n\t\t\t\n\t\t\t\t$this->distributors[] = $newDist;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function get_company() \n {\n return $this->company;\n }", "public function competenceCenter() {\n return $this->belongsTo('App\\CompetenceCenter', 'competence_center_id', 'id');\n }", "protected function _getCieloCompanyInfo()\n {\n $xml =\n '<dados-ec>' .\n '<numero>' . $this->_getCompanyId() . '</numero>' .\n '<chave>' . $this->_getAccessKey() . '</chave>' .\n '</dados-ec>';\n return $xml;\n }", "public function getOperatingCentre()\n {\n return $this->operatingCentre;\n }", "public function index()\n {\n $allData = DispatchCenter::all();\n return view('dispatch_centers.index', compact('allData'));\n }", "public function getCustomerGroups();", "public function getClientCompanies(Iusuario $user, $requesting = null) {\n return $this->obtenerEmpresasCliente(null, $user);\n }", "public function cities_get()\n {\n $em = $this->doctrine->em;\n $citiesRepo = $em->getRepository('Entities\\City');\n $cities = $citiesRepo->findAll();\n foreach ($cities as $city) {\n $city->servicesCount = $city->getServices()->count();\n }\n $response[\"data\"] = $cities;\n $response[\"count\"] = count($cities);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }", "public function getCpnyToTable() {\n return $this->db->selectObjList('SELECT company_id, longname, shortname, status, date_create FROM company ORDER BY company_id DESC;', $array = array(), \"Company\");\n }", "public function getCompany()\n {\n return $this->company;\n }", "public function index()\n {\n $company = $this->repository->all();\n return $company;\n }", "public function companies()\n {\n return $this->belongsToMany(Company::class);\n }" ]
[ "0.6078663", "0.60649323", "0.6006163", "0.5973317", "0.597003", "0.5969973", "0.57983834", "0.5781345", "0.57776815", "0.57615197", "0.5721366", "0.56990105", "0.5654105", "0.56503934", "0.56401664", "0.5624275", "0.55778736", "0.55733246", "0.5542282", "0.5516759", "0.5501126", "0.5492277", "0.5448659", "0.5444308", "0.54324055", "0.5383851", "0.5377069", "0.5367695", "0.5360515", "0.5360515", "0.53531456", "0.5331773", "0.5331148", "0.5290292", "0.5284834", "0.52654135", "0.5255532", "0.52534795", "0.5237333", "0.52366996", "0.5217261", "0.5210814", "0.5209416", "0.5206215", "0.51887923", "0.5188436", "0.51797783", "0.51767296", "0.516592", "0.51604354", "0.5155379", "0.5153827", "0.514564", "0.5132289", "0.5132212", "0.512904", "0.51231205", "0.5118971", "0.51118404", "0.5108254", "0.50834984", "0.5067242", "0.5066761", "0.5064695", "0.50621325", "0.50609", "0.50609", "0.5050363", "0.504612", "0.5045628", "0.50377756", "0.5031876", "0.5020782", "0.5018248", "0.50180197", "0.5013585", "0.5012318", "0.5008266", "0.49853247", "0.49817118", "0.49760452", "0.49748054", "0.49743617", "0.49584928", "0.49568492", "0.49545556", "0.49535224", "0.49529195", "0.4946464", "0.49455553", "0.49403527", "0.4937368", "0.4926821", "0.4922416", "0.49190053", "0.491811", "0.49123114", "0.49116486", "0.49101698", "0.49087247" ]
0.73927546
0
get all project numbers
public function getProjectNumbers($getDeletedToo = true) { $numbers = $this->getTable()->getProjectNumbers($getDeletedToo); $pnums = new SplObjectStorage(); foreach ($numbers as $number) { try { $num = new Yourdelivery_Model_Projectnumbers($number['id']); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { continue; } $pnums->attach($num); } return $pnums; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProjects(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT count(actTab.uuid) AS recCount, project_list.project_id, project_list.project_name\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN space ON actTab.uuid = space.uuid\n\t\t JOIN project_list ON space.project_id = project_list.project_id\n\t\t GROUP BY space.project_id \n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$projects = array();\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $name = $row[\"project_name\"];\n\t\t\t\t\t $count = $row[\"recCount\"] + 0;\n\t\t\t\t\t $uuid = $row[\"project_id\"];\n\t\t\t\t\t $uri = self::projectBaseURI.$uuid;\n\t\t\t\t\t $projects[$uri] = array(\"name\" => $name, \"count\" => $count);\n\t\t\t\t}//end loop\n\t\t\t\t\n\t\t\t\t$projects = $this->orderURIs($projects);\n\t\t\t\t$this->projects = $projects;\n\t\t }//end case with results\n\t \n\t }", "public function get_project_all(){\n }", "function getProjects() {\n\n\tglobal $db;\n\treturn $db->getProjectsByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function getProjects();", "private function getAllProjects()\n {\n $url = $this->base_uri.'project?expand=description,lead,issueTypes,url,projectKeys';\n $projects = $this->request($url);\n return $projects;\n }", "public function getProjectList() { \n $q = Doctrine_Query::create()->from('Project')\n ->orderBy('id');\n \n return $q->execute(); \n }", "public function get_projects()\n\t{\n\t\t$query = $this->db->get('projects');\n\t\treturn $query->result();\n\t}", "public function get_projectlist($inc_global = 0, $gid = null, $num = 0, $start = 0)\n {\n $return = array();\n $q_r = '';\n $q_l = 'SELECT `id`, `title`, `uid` FROM '.$this->Tbl['cal_project'].' WHERE 1=1';\n if (!empty($gid)) {\n $q_l .= ' AND `gid`='.doubleval($gid);\n }\n $q_l .= ' AND `uid` '.($inc_global ? ' IN('.$this->uid.',0)' : '='.$this->uid);\n if ($num > 0) {\n $q_r .= ' LIMIT ' . doubleval($start) . ',' . doubleval($num);\n }\n $qid = $this->query($q_l . ' GROUP BY id ORDER BY `uid`, `title`' . $q_r);\n while ($line = $this->assoc($qid)) {\n $return[] = $line;\n }\n return $return;\n }", "function rp_get_related_projects($project, $number) {\n $crafts = rp_get_crafts($project);\n\n // Query deepest\n $projects = rp_get_projects_with_craft($crafts[0], $number, $project);\n // If not enough, query first level \n $foundProjects = count($projects);\n $numberOfCrafts = count($crafts);\n if ($numberOfCrafts > 1 && $foundProjects < $number) {\n $additionalProjects = rp_get_projects_with_craft($crafts[1], $number - $foundProjects, $project);\n $projects = array_merge($projects, $additionalProjects);\n }\n\n // Return result\n return $projects;\n}", "public function get_projects()\n {\n\n $this->db->select(\"*\");\n $this->db->from('pr_projects');\n $this->db->where('approved', 1);\n $this->db->order_by(\"id\", \"desc\");\n\n $query = $this->db->get();\n $result = $query->result();\n return $result;\n\n }", "public static function retrieveAllProjects() {\n return R::getAll('SELECT * FROM project');\n }", "function get_all_projects() {\n\t\t$this->db->select( '*,customers.company as customercompany,customers.namesurname as individual,customers.address as customeraddress,projects.status_id as status, projects.id as id ' );\n\t\t$this->db->join( 'customers', 'projects.customer_id = customers.id', 'left' );\n\t\t$this->db->order_by( 'projects.id', 'desc' );\n\t\treturn $this->db->get( 'projects' )->result_array();\n\t}", "public function getCountOf_Projects_get(){\n $result = $this->Post_project_model->getCountOf_Projects();\n \treturn $this->response($result);\n }", "public static function getAll() {\n self::checkConnection();\n $sql = \"SELECT p.*, (p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id GROUP BY p.id ORDER BY end_date DESC, rem DESC;\"; //coalesce similar with isnull;\n if(isset($_GET['_category'])) {\n $category_id = $_GET['_category'];\n settype($category_id, 'integer');\n $sql = sprintf(\"SELECT p.*,(p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id WHERE p.id IN (SELECT c.project_id FROM project_category c WHERE c.category_id = %d) GROUP BY p.id ORDER BY end_date DESC, rem DESC;\", $category_id);\n }\n $results = self::$connection->execute($sql);\n $projects = array();\n foreach ($results as $project_arr) {\n array_push($projects, new Project($project_arr));\n }\n return $projects;\n }", "function grabListProjectCount()\n{\n\tglobal $smcFunc;\n\n\t// As we requested that we might also need it...\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(id) AS project_count\n\t\tFROM {db_prefix}bugtracker_projects',\n\t\tarray()\n\t);\n\n\t// Countin' our way up.\n\tlist ($count) = $smcFunc['db_fetch_row']($request);\n\n\t// And give us some free space.\n\t$smcFunc['db_free_result']($request);\n\n\t// This is how many we have.\n\treturn $count;\n}", "public function get_projects() {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'projects',\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "public function getAll()\n {\n return $this->performQuery(\n $this->createUrl('project')\n );\n }", "public function getAllProjects()\n {\n $sql = \"SELECT pid, price, first_name, last_name \n FROM project natural join purchase_project \n natural join user\";\n $query = $this->db->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows, here in object-style because we defined this in\n // core/controller.php! If you prefer to get an associative array as the result, then do\n // $query->fetchAll(PDO::FETCH_ASSOC); or change core/controller.php's PDO options to\n // $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC ...\n return $query->fetchAll();\n }", "public function userProjects()\n {\n // Finding project for the user\n $projectsInvolved = ProjectMember::where('user_id', auth()->user()->id)->select('project_id')->get(); \n // Array to hold the project IDs\n $projectIDs = [];\n // Looping and storing priject Id's \n foreach ($projectsInvolved as $project) { \n array_push($projectIDs, $project->project_id);\n }\n return $projectIDs;\n }", "function VM_projects() { return bList::getListInstance(myOrg_ID,'bList_vm_projects'); }", "public function projects()\n {\n $query = 'project';\n return json_decode($this->client->request('GET', $query, $this->options)->getBody(), true);\n }", "public function getProjects()\n\t{\n\t\t$query = $this->db->getQuery(true);\n\t\t$query->select('id, name, alias')\n\t\t\t->from('#__monitor_projects');\n\n\t\t$this->countItems($query);\n\n\t\tif ($this->list !== null && isset($this->list['fullordering']) && in_array($this->list['fullordering'], $this->orderOptions))\n\t\t{\n\t\t\t$query->order($this->list['fullordering']);\n\t\t}\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "function Projects(){\n\t\t\t\treturn $this->projects;\n\t\t\t}", "public function getProjects()\n {\n }", "public function get_project_list_get()\n {\n \t$result = $this->Post_project_model->get_project_list();\n \treturn $this->response($result);\n }", "private function getProjects($contract) {\n $projects = array();\n\n $projList = $contract->getProjects();\n\n foreach ($projList as $projectid => $prj) {\n $projects[\"$projectid\"] = array ('name' => $prj->getName());\n }\n return $projects;\n }", "function getProjectList()\n\t{\n\t\t//Update Project List\n\t\t$this->Project_List = null;\n\t\t$assigned_projects_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Project');\n\t\tforeach($assigned_projects_rows as $assigned_project)\n\t\t\t$this->Project_List[] = new Projects( $assigned_project['ClientProjectTask'] );\n\t\treturn $this->Project_List;\n\t}", "public function projects()\n {\n $result = $this->get('projects');\n\n Validator::isArray($result);\n\n return array_map(function ($project) {\n return $this->fromMantisProject($project);\n }, $result['projects']);\n }", "function get_projects() {\n\t\tif (!isset($_SESSION['projects']))\n\t\t\tlgi_mysql_fetch_session(\"SELECT GROUP_CONCAT(`name`) AS `projects` FROM %t(userprojects) AS p, %t(usercerts) AS c WHERE p.`usercertid`=c.`id` AND c.`user`='%%'\", $this->userid);\n\t\treturn explode(',', $_SESSION['projects']);\t\n\t}", "public function projects()\n {\n return $this->request('get', 'api/teams/'.Helpers::config('team').'/projects');\n }", "public function getProjects(){\n $projects = Project::all()->sortBy('dead');\n return $projects;\n }", "public function index()\n\t{\n\t\treturn Project::all();\n\t}", "function getProjectList() {\n global $logger;\n\n $projects = Project::getProjects();\n if($projects != NULL) {\n $extproj_id = Config::getInstance()->getValue(Config::id_externalTasksProject);\n $smartyProjects = array();\n foreach($projects as $id => $name) {\n // exclude ExternalTasksProject\n if ($extproj_id == $id) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: ExternalTasksProject is excluded\\\");</script>\";\n continue;\n }\n\n // exclude SideTasksProjects\n try {\n $p = ProjectCache::getInstance()->getProject($id);\n if ($p->isSideTasksProject()) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: sideTaskProjects are excluded\\\");</script>\";\n continue;\n }\n } catch (Exception $e) {\n // could not determinate, so the project should be included in the list\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: Unknown type, project included anyway\\\");</script>\";\n // nothing to do.\n }\n $smartyProjects[$id] = $name;\n }\n return $smartyProjects;\n } else {\n return NULL;\n }\n}", "function get_all_rel_tasks_project($project_id)\n {\n $this->db->order_by('id', 'desc');\n $this->db->where('project_id', $project_id);\n return $this->db->get('rel_tasks_project')->result_array();\n }", "public function getBelongedNumProjects() {\n $sql = \"SELECT numPorject FROM category_numproject WHERE category_id = %d\";\n $sql = sprintf($sql, $this->id);\n $results = self::$connection->execute($sql);\n if (count($results) != 1) {\n return 0;\n } else {\n return $results[0]['numporject'];\n }\n }", "public static function projectList() {\n\t\tif(!Authenticate::isAuthorized()) {\n \t\t throw new NotifyException(\"You are not authorized for this method\", 1);\n \t}\n else {\n\t\t\t$api_end_point = \"project\";\n\t\t\t$request_data=[];\n\t\t\treturn Request::sendRequest($api_end_point, $request_data);\n\t\t}\n\t}", "public function get_data()\n\t{\n\t\t//get records\n\t\t$record_set = $this->connection->query\n\t\t(\"\n\t\t\tselect\n\t\t\t\tProjectID as ID,\n\t\t\t\tconcat ('Project ', ProjectNum, ': ', Title) as selection\n\t\t\tfrom Project\n\t\t\");\n\t\t$records = $record_set->fetchAll();\n\t\t$record_set->closeCursor();\n\n\t\t//return records\n\t\treturn $records;\n\n\t}", "public function getProjects()\n {\n return $this->projects;\n }", "function get_all($client_id) {\r\n $f3 = \\Base::instance();\r\n\r\n $project_short = $f3->get('PARAMS.project');\r\n $client_short = $f3->get('PARAMS.client');\r\n $projects_db=new DB\\SQL\\Mapper($f3->get('DB'),'projects');\r\n $projects=$projects_db->find(array('client_id=?',$client_id),array('order'=>'project_full'));\r\n\r\n $out = array();\r\n foreach($projects as $project)\r\n {\r\n //if($project->active == 0) continue;\r\n $out[] = array(\r\n \"project_id\"=>$project->project_id,\r\n \"client_id\"=>$project->client_id,\r\n \"project_short\"=>$project->project_short,\r\n \"project_full\"=>$project->project_full,\r\n \"description\"=> $projects->description,\r\n \"active\"=>$projects->active,\r\n \"drafts\"=>$projects->drafts,\r\n \"project_url\"=> $f3->get('site.url').$client_short.\"/\".$project->project_short\r\n );\r\n }\r\n\r\n return $out;\r\n }", "public function getProjectInformation() {\n $query = \"select * from projects\";\n $result = mysql_query($query);\n return $result;\n }", "public function listProjects()\n {\n\n\t\t$data = ProjectsRepository::findByUser($_SESSION[\"uuid\"]);\n\t\treturn array(\"data\" => $data);\n\n }", "public function getProjects() {\n\t\treturn $this->projects;\n\t}", "public function getProjectShortAwardNumbers($idproject){\n\t\t$connection=Database::getConnection();\n\t\t$query=\"SELECT shortawardnumber FROM project_shortawardnumber WHERE project_idproject = '\".$idproject.\"'\";\n\t\t$result_obj=\"\";\n\t\t$result_obj=$connection->query($query);\n\t\t$items=\"\";\n\t\ttry{\n\t\t\twhile($result = $result_obj->fetch_array(MYSQLI_ASSOC)){\n\t\t\t\t$items[]=$result;\n\t\t\t}\n\t\t\treturn($items);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\treturn false;\n\t\t}\n\t}", "public function Query() {\n return FactoryService::ProjectService()->GetList()->ToList();\n }", "public function index()\n {\n return Project::all();\n }", "public function index()\n {\n return Project::all();\n }", "public function getActiveProjectList() {\n\t\treturn $this->getProjectDao()->getActiveProjectList();\n\t}", "function get_all_projetos_count()\n {\n $this->db->from('projetos');\n return $this->db->count_all_results();\n }", "private function getAllModulesOfProject()\n {\n return $this->modulesRegistry->getModules();\n }", "function getProjects($pdo){\n\t\t$sectionsInUse = getSectionsInUse($pdo);\n\t\t$projects = [];\n\n\t\tforeach ($sectionsInUse as $section){\n\t\t\t$query = $pdo->prepare('SELECT * FROM sc_projects WHERE section_id = :section_id ORDER BY pos ASC');\n\t\t\t$query->bindParam(':section_id', $section['id']);\n\t\t\t$query->execute();\n\t\t\t$pros = $query->fetchAll();\n\t\t\tforeach ($pros as $project){\n\t\t\t\tarray_push($projects, $project);\n\t\t\t}\n\t\t}\n\n\t\t$query = $pdo->prepare('SELECT * FROM sc_projects WHERE section_id = 0 ORDER BY pos ASC');\n\t\t$query->execute();\n\t\t$pros = $query->fetchAll();\n\t\tforeach ($pros as $project){\n\t\t\tarray_push($projects, $project);\n\t\t}\n\n\t\treturn $projects;\n\t}", "public function fetchProjects(){\n \t\t$sql = 'SELECT P.dms_projects_id, P.dms_projects_name,PT.dms_projecttype_name,P.dms_projects_objectives, R.dms_releases_name, S.dms_sprints_name, S.dms_sprints_start_date, S.dms_sprints_end_date\n\t\t\t\t\tFROM `dms_projects` AS P\n\t\t\t\t\tINNER JOIN `dms_releases` AS R ON P.dms_projects_id = R.dms_releases_projects_id\n\t\t\t\t\tINNER JOIN `dms_sprints` AS S ON R.dms_releases_id = S.dms_sprints_releases_id\n\t\t\t\t\tINNER JOIN `dms_project_type` AS PT ON P.dms_projects_projecttype_id = PT.dms_projecttype_id\n\t\t\t\t\tWHERE\n\t\t\t\t\tnow( )\n\t\t\t\t\tBETWEEN S.dms_sprints_start_date\n\t\t\t\t\tAND S.dms_sprints_end_date';\n\t\t\treturn $this->fetchall($sql);\n\t\t\treturn $this->fetchall($sql);\n }", "public function getProjectModulePairs()\n {\n return $this->dao->select('t1.id,t1.name')->from(TABLE_CATEGORY)->alias('t1')\n ->leftJoin(TABLE_DOCLIB)->alias('t2')->on('t1.root = t2.id')\n ->andWhere('t1.type')->eq('doc')\n ->andWhere('t2.project')->ne('0')\n ->fetchPairs('id', 'name');\n }", "public function getMajorProjects()\n {\n $projects = Project::select('id','title','slug','description','state','project_type','image','company','length','completion_date')\n ->where('status','=',\\DB::raw(1))\n ->take(4)\n ->get();\n if($projects->count()) {\n return $projects;\n }\n\n return false;\n }", "public function getBelongedProjects() {\n $sql = \"SELECT * FROM project p WHERE p.id IN (SELECT pc.project_id FROM project_category WHERE category_id = %d);\";\n $sql = sprintf($sql, $this->id);\n $results = self::$connection->execute($sql);\n $projects = array();\n foreach ($results as $project_arr) {\n array_push($projects, new Project($project_arr));\n }\n return $projects;\n }", "public function getProjects()\n {\n return PortfolioProject::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "private function loadProjects() {\n $result = $this->database()->query('\n SELECT\n tracking_projects.project_id,\n tracking_projects.project_name,\n tracking_projects.project_path,\n tracking_projects.project_branch,\n tracking_projects.repository_ignore,\n (\n SELECT\n tracking_revisions.revision_sha\n FROM\n tracking_revisions\n WHERE\n tracking_revisions.project_id = tracking_projects.project_id\n ORDER BY\n tracking_revisions.revision_date DESC\n LIMIT\n 1\n ) AS revision_sha\n FROM\n tracking_projects\n WHERE\n project_path <> \"\"');\n\n if ($result === false) {\n Error('RepositoryTracker: Unable to retrieve a list of projects from the database.');\n return false;\n }\n\n $projects = array();\n while ($row = $result->fetch_assoc()) {\n $projects[] = array(\n 'id' => $row['project_id'],\n 'name' => $row['project_name'],\n 'path' => $row['project_path'],\n 'ignore' => $row['repository_ignore'],\n 'branch' => $row['project_branch'],\n 'rev' => $row['revision_sha'],\n );\n }\n\n if (!count($projects)) {\n Error('RepositoryTracker: No projects have been specified in the database.');\n return false;\n }\n\n return $projects;\n }", "function get_projects( $id ) {\n\t\t$this->db->select( '*,customers.id as customer_id, customers.company as customercompany,customers.namesurname as individual,customers.address as customeraddress,projects.status_id as status, projects.id as id ' );\n\t\t$this->db->join( 'customers', 'projects.customer_id = customers.id', 'left' );\n\t\treturn $this->db->get_where( 'projects', array( 'projects.id' => $id ) )->row_array();\n\t}", "public function getProjectsDetails()\n {\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('p.pid,n.name,c.clientName,pp.phaseName,p.lifeCycleStatus,'\n . 'p.billingStatus,pu.userName,pu.id,p.createDate,p.startDate,'\n . 'p.endDate,p.projectStatus');\n $qb->from('Vlreleases\\UserBundle\\Entity\\Projects', 'p');\n $qb->leftJoin('p.user', 'pu');\n $qb->leftJoin('p.projectName', 'n');\n $qb->leftJoin('p.client', 'c');\n $qb->leftJoin('p.phase', 'pp');\n $result = $qb->getQuery()->getResult();\n \n return $result;\n }", "private static function getProjectsWithQueuedRecords() \r\n\t{\r\n\t\t// Get projects with gueued records\r\n\t\t$project_mrid_list = array();\r\n\t\t$sql = \"select project_id, mr_id from redcap_ddp_records \r\n\t\t\t\twhere fetch_status = 'QUEUED' order by updated_at limit \" . self::FETCH_LIMIT_PER_BATCH;\r\n\t\t$q = db_query($sql);\r\n\t\twhile ($row = db_fetch_assoc($q)) {\r\n\t\t\t// Add project_id to array\r\n\t\t\t$project_mrid_list[$row['project_id']][] = $row['mr_id'];\r\n\t\t}\r\n\t\treturn $project_mrid_list;\r\n\t}", "public function getProjects()\n {\n return $this->projects;\n }", "public function index()\n\t{\n\t\t$db = DB::getInstance();\n\t\t$stmt = $db->prepare(\"SELECT * FROM project \");\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\n\t}", "public function fetchProjectID(): string;", "function all_projects(){\n /**\n * @var \\AWorDS\\App\\Models\\Project $project\n */\n $project = $this->set_model();\n $logged_in = $project->login_check();\n if($logged_in){\n $this->set('logged_in', $logged_in);\n $this->set('active_tab', 'projects');\n $this->set('projects', $project->getAll());\n }else $this->redirect();\n }", "public function index()\n {\n return Project::where('user', auth()->user()->id)->paginate(10);\n }", "function getProjectComponents($project_id)\n\t{\n\t\t\n\t\t$compArray = array();\n\t\t\n\t\tif($project_id <> '')\n\t\t{\n\t\t\t$sq_data = \"SELECT\n `mrfc_app_project_component`.`published`\n , `mrfc_app_project_component`.*\n , `mrfc_app_location`.`name` AS `location`\n , `mrfc_app_location`.`lon` AS `longitude`\n , `mrfc_app_location`.`lat` AS `latitude`\nFROM\n `mrfc_app_project_component`\n LEFT JOIN `mrfc_app_location` \n ON (`mrfc_app_project_component`.`location_id` = `mrfc_app_location`.`location_id`)\nWHERE (`mrfc_app_project_component`.`published` =1 AND `mrfc_app_project_component`.`project_id` = \".quote_smart($project_id).\"); \";\n\t\t//echo $sq_data;\n\t\t\t$rs_data = $this->dbQuery($sq_data);\n\t\t\tif($this->recordCount($rs_data)) \n\t\t\t{\n\t\t\t\twhile($cn_data = $this->fetchRow($rs_data, 'assoc'))\n\t\t\t\t{ $compArray[] = (object) array_map(\"clean_output\",$cn_data); }\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\treturn $compArray;\n\t}", "function get_all_projetos($params = array())\n {\n $this->db->order_by('id_projeto', 'desc');\n $this->db->join('clientes','projetos.cliente_id = clientes.id_cliente');\n $this->db->join('moedas','clientes.moeda_id = moedas.id_moeda');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('projetos')->result_array();\n }", "function get_activeprojectids($uid,$rolename){\n\tglobal $DB;\n\t$count = 0;\n\t$projectArray = array();\n\t$atalvariables = get_atalvariables();\n\t$projectcat = $atalvariables['project_categoryid'];\n\tif($rolename=='mentor'){\n\t\t$sql=\"SELECT c.id FROM {user} u JOIN {user_enrolments} ue ON u.id=ue.userid JOIN {enrol} e ON ue.enrolid=e.id \n\t\tJOIN {course} c ON e.courseid=c.id WHERE e.enrol='manual' AND u.id='\".$uid.\"' AND c.startdate>0 AND c.category=$projectcat AND ue.status=1\";\n\t\t$data = $DB->get_records_sql($sql);\n\t\tforeach($data as $key){\n\t\t\t$projectArray[] = $key->id;\n\t\t}\n\t} elseif($rolename=='student'){\n\t\t$sql=\"SELECT c.id FROM {user} u JOIN {user_enrolments} ue ON u.id=ue.userid JOIN {enrol} e ON ue.enrolid=e.id \n\t\tJOIN {course} c ON e.courseid=c.id WHERE e.enrol='manual' AND u.id='\".$uid.\"' AND c.startdate>0 AND c.category=$projectcat\";\n\t\t$data = $DB->get_records_sql($sql);\n\t\tforeach($data as $key){\n\t\t\t$projectArray[] = $key->id;\n\t\t}\n\t} else{\n\t\t//incharge\n\t\t$sql=\"SELECT c.id FROM {course} c JOIN (SELECT schoolid FROM {user_school} WHERE userid = \".$uid.\") as s ON c.idnumber=s.schoolid \n\t\tAND c.startdate>0 AND c.category=$projectcat\";\n\t\t$data = $DB->get_records_sql($sql);\n\t\tforeach($data as $key){\n\t\t\t$projectArray[] = $key->id;\n\t\t}\n\t}\n\treturn $projectArray;\n}", "public function getProjects()\n {\n $urlParts = array(\n 'format' => 'JSON',\n 'description' => '',\n 'type' => 'all',\n 'all' => '',\n 'tree' => '',\n );\n\n $url = $this->getBaseUrl() . 'projects/?' . http_build_query($urlParts);\n\n $response = $this->getConnector()->get($url);\n $response = $this->verifyResult($response, $url);\n\n $content = $this->transformJsonResponse($response->getContent());\n\n return $content;\n }", "public function getFirstProjects()\n {\n $this->db->query('SELECT * FROM projects WHERE projects.is_published = 1 ORDER BY projects.id DESC limit 4 ');\n\n $results = $this->db->resultSet();\n\n return $results;\n }", "public function getProjectsAction(){\n\n $projects = $this->getDoctrine()->getRepository(\"GithubProjectsBundle:Project\")->findAll();\n return array('projects' => $projects);\n }", "public function index()\n {\n return Project::orderBy('created_at', 'desc')->limit(6)->get();\n }", "static function getAllByMember($uid){\n\n\t\trequire_once 'DBO.class.php';\n\t\trequire_once 'Project.class.php';\n\n\t\t$db = DBO::getInstance();\n\n\t\t$statement = $db->prepare('SELECT *\n\t\t\t\tFROM projects\n\t\t\t\tWHERE id IN (\n\t\t\t\tSELECT id_proj\n\t\t\t\tFROM project_group\n\t\t\t\tWHERE id_usr = :uid)\n\t\t\t\tLIMIT 0 , 99999\n\t\t\t\t');\n\t\t$statement->execute(array(\n\t\t\t\t':uid' => $uid));\n\t\tif($statement->errorCode() != 0)\t{\n\t\t\t$error = $statement->errorInfo();\n\t\t\tthrow new Exception($error[2]);\n\t\t}\n\n\t\t$i = 0;\n\n\t\twhile($row = $statement->fetch())\t{\n\n\t\t\t$project = new Project(\n\t\t\t\t\t$row[id],\n\t\t\t\t\t$row[name],\n\t\t\t\t\t$row[description],\n\t\t\t\t\t$row[start_date],\n\t\t\t\t\t$row[deadline],\n\t\t\t\t\t$row[end_date],\n\t\t\t\t\t$row[owner]);\n\n\t\t\t$projects[$i++] = Project::serialize($project);\n\n\t\t}\n\n\t\treturn $projects;\n\n\t}", "public function getDefaultProject(){\n $sql = 'SELECT rowid FROM `llx_projet` ORDER BY rowid ASC LIMIT 1';\n $resql = $this->db->query($sql);\n $idproj = $resql->fetch_assoc()[\"rowid\"];\n return $idproj;\n }", "function GetProjectList()\n\t{\n\t\t$qry=$this->db->query(\"select DISTINCT rp_projects.projectKey,rp_projects.projectID,rp_projects.projectAddedDate,rp_projects.projectStatus,rp_user_plan_details.planTitle,rp_projects.projectKey,rp_project_details.projectName,rp_users.userEmail,rp_user_details.userFirstName,rp_user_types.userTypeStatus,rp_user_type_details.userTypeName from rp_dbho_user_plans_subdetail,rp_dbho_plan_mapping,rp_projects,rp_project_details,rp_users,rp_user_plan_details,rp_user_details,rp_user_to_type,rp_user_types,rp_user_type_details where rp_projects.projectID=rp_project_details.projectID and rp_projects.projectID=rp_dbho_plan_mapping.objectID and rp_dbho_plan_mapping.objectType='project' and rp_dbho_plan_mapping.planID=rp_dbho_user_plans_subdetail.planID and rp_dbho_user_plans_subdetail.listingType='Project' and rp_user_plan_details.planID=rp_dbho_plan_mapping.planID and rp_projects.userID=rp_users.userID and rp_users.userID=rp_user_details.userID and rp_projects.userID=rp_user_to_type.userID and rp_user_to_type.userTypeID =rp_user_types.userTypeID and rp_user_types.userTypeStatus='Active' and rp_user_types.userTypeID=rp_user_type_details.userTypeID and rp_projects.projectStatus!='Deleted' and rp_user_type_details.languageID=1 and rp_project_details.languageID=1 and rp_project_details.versionID=0 and rp_user_details.languageID=1 ORDER BY rp_projects.projectID DESC \"); \n\t\treturn $qry->result(); \n\t}", "public function get_data()\n\t{\n\t\t//get records\n\t\t$record_set = $this->connection->query\n\t\t(\"\n\t\t\tselect\n\t\t\t\tconcat ('Project ', ProjectNum, ': ', Title, ' . . . . . ', TotalRank)\n\t\t\t\t\tas selection\n\t\t\tfrom TotalRanking\n\t\t\");\n\t\t$records = $record_set->fetchAll();\n\n\t\t//return records\n\t\treturn $records;\n\n\t}", "public function getListItems()\n {\n return $this->getProjects();\n }", "function GetProjectStatuses()\n\t{\n\t\t$result = $this->sendRequest(\"GetProjectStatuses\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function index(){\n return Responser::ok('Projects available',Auth::user()->companies->reduce(function($carry,$company){\n $company->projects->each(function($project) use(&$carry){\n $project->load('company');\n $carry[] = $project;\n });\n\n return $carry;\n },[]));\n }", "function getProjectList($sector_id)\n\t{\n\t\t\n\t\t$projectArray = array();\n\t\t\n\t\tif($sector_id <> '')\n\t\t{\n\t\t\t$sq_data = \"SELECT `project_id`, `pname` as `project_name` FROM `mrfc_app_project` WHERE (`published`=1 and `sector_id` = \".quote_smart($sector_id).\"); \";\n\t\t//echo $sq_data;\n\t\t\t$rs_data = $this->dbQuery($sq_data);\n\t\t\tif($this->recordCount($rs_data)) \n\t\t\t{\n\t\t\t\twhile($cn_data = $this->fetchRow($rs_data))\n\t\t\t\t{\n\t\t\t\t\t$project_id \t= $cn_data[0];\n\t\t\t\t\t$project_name = clean_output($cn_data[1]);\n\t\t\t\t\t$projectArray[$project_id] = $project_name;\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn $projectArray;\n\t}", "function get_all_numberreturn()\n {\n return $this->db->order_by('openDateTime', 'desc')->get('numberreturn')->result_array();\n }", "public static function getAllId() {\n try {\n $database = Model::getInstance();\n $query = \"select numero from module\";\n $statement = $database->prepare($query);\n $statement->execute();\n $results = $statement->fetchAll(PDO::FETCH_COLUMN, 0);\n return $results;\n } catch (PDOException $e) {\n printf(\"%s - %s<p/>\\n\", $e->getCode(), $e->getMessage());\n return NULL;\n }\n }", "public function index()\n {\n $projects = new ProjectsResource(\n $this->project->with(['company:id,name,primary_contact'])\n ->orderByDesc('id')\n ->paginate(50)\n );\n return response($projects, Response::HTTP_OK);\n }", "function rawpheno_function_getproject($project_id) {\n $result = chado_query(\"SELECT name FROM {project} WHERE project_id = :project_id LIMIT 1\", array(\n ':project_id' => $project_id,\n ));\n\n return ($result) ? $result->fetchField() : 0;\n}", "public function listProjectsParents($params)\n {\n // Debe leer todos los proyectos que se encuentren en estaus 40 - Cotización\n $qry = \"SELECT pjt_id, pjt_name, pjt_number \n FROM ctt_projects \n WHERE pjt_status = '40' ORDER BY pjt_name ASC;\n \";\n return $this->db->query($qry);\n }", "public function getListOfProjectsAll()\n {\n $projectList = $this->project\n ->select('projects.id','customers.name AS customer_name','projects.project_name','projects.otl_project_code','projects.project_type',\n 'projects.activity_type','projects.project_status','projects.meta_activity','projects.region',\n 'projects.country','projects.technology','projects.description','projects.estimated_start_date','projects.estimated_end_date',\n 'projects.comments','projects.LoE_onshore','projects.LoE_nearshore',\n 'projects.LoE_offshore', 'projects.LoE_contractor', 'projects.gold_order_number', 'projects.product_code', 'projects.revenue', 'projects.win_ratio');\n $projectList->leftjoin('customers', 'projects.customer_id', '=', 'customers.id');\n\n $data = Datatables::of($projectList)->make(true);\n\n return $data;\n }", "function list_all_numbers()\n {\n $pdo = PDO2::getInstance();\n \n $query = $pdo->prepare(\"SELECT * FROM tbl_numbers\");\n $query->execute();\n \n $tbx=array();\n $i=0;\n while ($row = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT))\n {\n $tbx[$i]['number']=$row[0];\n $tbx[$i]['usr_id']=$row[1];\n $i=$i+1;\n }\n return $tbx;\n }", "protected function getprojects($userId)\n\t{\n\t\treturn Project::where('created_by', '=', $userId)\n\t\t\t->orderBy('id', 'DESC')\n\t\t\t->select(['id', 'website_url'])\n\t\t\t->limit(20)\n\t\t\t->get();\n\t}", "public function findTasksByProjectId(int $value)\n {\n return $this->createQueryBuilder('t')\n ->andWhere('t.project = :project')\n ->setParameter('project', $value)\n ->andWhere('t.deleted = :deleted')\n ->setParameter('deleted', 0)\n ->orderBy('t.id', 'ASC')\n ->setMaxResults((int)$this->limit)\n ->getQuery()\n ->getResult()\n ;\n }", "function &getTasksByGroupProjectName () {\n\t\treturn $this->getTasksFromSQLwithParams ('SELECT ptv.*,g.group_name,pgl.project_name\n\t\t\tFROM project_task_vw ptv,\n\t\t\t\tproject_assigned_to pat,\n\t\t\t\tgroups g,\n\t\t\t\tproject_group_list pgl\n\t\t\tWHERE ptv.project_task_id=pat.project_task_id\n\t\t\t\tAND pgl.group_id=g.group_id\n\t\t\t\tAND pgl.group_project_id=ptv.group_project_id\n\t\t\t\tAND ptv.status_id=1\n\t\t\t\tAND pat.assigned_to_id=$1\n\t\t\tORDER BY group_name,project_name',\n\t\t\t\t\t\t\t array ($this->User->getID())) ;\n\t}", "function GetProjectsBasedOnTag($tagId = 'All')\n {\n $ret = array();\n $sql = '';\n \n if($tagId == 'All')\n $sql = 'SELECT PROJECT_ID ' .\n ' FROM PROJECTS ';\n else\n $sql = 'SELECT PROJECT_ID ' .\n ' FROM PROJECT_TAGS ' .\n ' WHERE TAG_ID = ' . $tagId;\n \n $result = QueryDB($sql);\n \n while($result != null && $row = $result->fetch_array(MYSQLI_ASSOC))\n $ret[] = $row['PROJECT_ID'];\n \n return $ret;\n }", "public function projects()\n\t{\n\t\t$members = $this->hasMany('App\\Project_members', 'member_id', 'id')->get();\n\t\t$projects = new Collection();\n\n\t\tforeach ($members as $member) {\n\t\t\t$project = $member->project()->getResults();\n\n\t\t\tif ($project) {\n\t\t\t\t$projects->add ($project);\n\t\t\t}\n\t\t}\n\n\t\treturn $projects;\n\t}", "function fcollab_project_list(){\r\n\t$output = 'list project';\r\n\t\r\n\treturn $output;\r\n}", "function contactProjectList($sys, $sunetid) {\n\n list($pmon_pid, $pmon_event_id) = getMonitoringProjectID($sys);\n\n $filter = '[contact_sunetid] = \"' . $sunetid . '\"';\n $data = REDCap::getData($pmon_pid, 'array', null, array('project_id'), $pmon_event_id, null, null, null, null, $filter);\n $records = array();\n foreach ($data as $record_id => $record_info) {\n $records[$record_id] = $record_id;\n }\n\n return $records;\n}", "private function initProjects()\n\t{\n\t\t$this->priorities = Dao::readAll(Priority::class, [Dao::key('redmine_id')]);\n\t\t$this->projects = Dao::readAll(Project::class, [Dao::key('redmine_id')]);\n\t\t$this->statuses = Dao::readAll(Status::class, [Dao::key('redmine_id')]);\n\t}", "public function index() {\n\n return Auth::user()->projects()->paginate();\n }", "public static function get_projects()\n {\n \tif( UserRoleController::isStudent() )\n \t{\n \t\t$current_user = wp_get_current_user();\n \t\t$author = $current_user->ID ;\n \t}\n \telse\n \t{\n\t\t\t$author = null ;\n \t}\n\n \treturn get_posts( array(\n \t\t'author' => $author,\n \t\t'post_type' => ProjectCustomTypeCreator::CPT,\n \t\t'numberposts' => 100,\n \t\t'orderby' => 'date',\n \t\t'order' => 'DESC',\n \t\t'post_status' => 'any',\n \t\t//'category' => 0,\n \t\t//'include' => array(),\n \t\t//'exclude' => array(),\n \t\t//'meta_key' => '',\n \t\t//'meta_value' =>'',\n \t\t//'suppress_filters' => true\n \t));\n }", "function view_projects_info(){\n \t$details = array();\n\n \t$link = mysql_connect(DN_HOST, DB_USER, DB_PASS);\n \tmysql_select_db(DB_NAME, $link);\n \t$query = \"select `id`, name from healingcrystals_projects where completed_on is null order by starts_on desc\";\n \t$result = mysql_query($query);\n \twhile($project = mysql_fetch_assoc($result)){\n \t\t$details[] = array('project_name' => $project['name'],\n \t\t\t\t\t\t\t'project_url' => assemble_url('project_overview', array('project_id' => $project['id'])),\n\t\t\t \t\t\t\t\t'project_id' => $project['id']);\n\n\t\t\t$query_1 = \"select id, name from healingcrystals_project_objects\n\t\t\t\t\t\twhere type='Milestone' and\n\t\t\t\t\t\tproject_id='\" . $project['id'] . \"' and\n\t\t\t\t\t\tcompleted_on is null order by created_on desc\";\n\t\t\t$result_1 = mysql_query($query_1);\n\t\t\twhile($milestone = mysql_fetch_assoc($result_1)){\n\t\t\t\t$details[count($details)-1]['milestones'][] = array('milestone_id' => $milestone['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'milestone_url' => assemble_url('project_milestone', array('project_id' => $project['id'], 'milestone_id' => $milestone['id'])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'milestone_name' => $milestone['name']);\n\n\t\t\t\t$query_2 = \"select id, name, integer_field_1 from healingcrystals_project_objects\n\t\t\t\t\t\t\twhere type='Ticket' and\n\t\t\t\t\t\t\tproject_id='\" . $project['id'] . \"' and\n\t\t\t\t\t\t\tmilestone_id='\" . $milestone['id'] . \"' and\n\t\t\t\t\t\t\tcompleted_on is null order by created_on desc\";\n\t\t\t\t$result_2 = mysql_query($query_2);\n\t\t\t\twhile($ticket = mysql_fetch_assoc($result_2)){\n\t\t\t\t\t$index = count($details[count($details)-1]['milestones']) - 1;\n\t\t\t\t\t$details[count($details)-1]['milestones'][$index]['tickets'][] = array('ticket_id' => $ticket['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ticket_url' => assemble_url('project_ticket', array('project_id' => $project['id'], 'ticket_id' => $ticket['integer_field_1'])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ticket_name' => $ticket['name']);\n\n\t \t\t$query_3 = \"select id, body\n\t\t \t\t \t\t\t\tfrom healingcrystals_project_objects\n\t\t\t\t \t\t\t\twhere parent_id='\" . $ticket['id'] . \"' and\n\t\t\t\t\t\t\t\tparent_type = 'Ticket'\n\t\t\t\t\t\t\t\torder by created_on desc\";\n\t\t\t\t\t$result_3 = mysql_query($query_3);\n\t\t\t\t\twhile($task = mysql_fetch_assoc($result_3)){\n\t\t\t\t\t\t$index_1 = count($details[count($details)-1]['milestones'][$index]['tickets']) - 1;\n\t\t\t\t\t\t$details[count($details)-1]['milestones'][$index]['tickets'][$index_1]['tasks'][] = array('task_body' => $task['body'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'task_id' => $task['id']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t}\n\n \tmysql_close($link);\n\n \t$this->smarty->assign('details', $details);\n }", "public function getPeriodProject($params){\n $pjtId = $this->db->real_escape_string($params['pjtId']);\n $qry = \"SELECT \n date_format(pjt_date_start, '%Y%m%d') AS pjt_date_start, \n date_format(pjt_date_end, '%Y%m%d') AS pjt_date_end \n FROM ctt_projects \n WHERE pjt_id = $pjtId;\";\n return $this->db->query($qry);\n }", "function get_all($project_id,$order_by=\"date\") {\r\n $f3 = \\Base::instance();\r\n\r\n if($order_by==\"date\") $_order_by = array('order'=>'timestamp DESC');\r\n if($order_by==\"alpha\") $_order_by = array('order'=>'version_name ASC');\r\n\r\n $versions_db=new DB\\SQL\\Mapper($f3->get('DB'),'versions');\r\n $versions=$versions_db->find(array('project_id=?',$project_id),$_order_by);\r\n\r\n $out = array();\r\n foreach($versions as $version)\r\n {\r\n $out[] = $this->get(NULL,$version);\r\n }\r\n\r\n return $out;\r\n\r\n }", "function get_project()\n {\n return $this->find('all');\n }" ]
[ "0.72534406", "0.7005828", "0.69887793", "0.68986034", "0.6810523", "0.6789513", "0.66870666", "0.6680739", "0.6672632", "0.66302735", "0.6587107", "0.6546109", "0.6507422", "0.64815354", "0.64642733", "0.6448964", "0.64450204", "0.64448464", "0.6438722", "0.6350027", "0.6349873", "0.6348307", "0.6329506", "0.63006", "0.6299174", "0.6255491", "0.62542105", "0.6250374", "0.62480515", "0.621606", "0.6211442", "0.6202207", "0.6201959", "0.61813974", "0.61630446", "0.6146069", "0.6125609", "0.61220175", "0.6081938", "0.60429764", "0.60349", "0.6023396", "0.6016405", "0.6015991", "0.60134906", "0.60134906", "0.6010714", "0.60105956", "0.601011", "0.59937763", "0.5990061", "0.59869933", "0.5984727", "0.5981249", "0.5964733", "0.59511507", "0.59466743", "0.5944222", "0.5932846", "0.59136236", "0.5896067", "0.58960223", "0.5881079", "0.58786446", "0.5872896", "0.5869909", "0.58688253", "0.5856106", "0.58468777", "0.5845924", "0.5845111", "0.5826355", "0.58184415", "0.5805679", "0.5797081", "0.57913953", "0.5769497", "0.5765979", "0.5762093", "0.5745955", "0.5734912", "0.57330585", "0.5727295", "0.5726675", "0.5725359", "0.5725201", "0.5718941", "0.57182527", "0.57099545", "0.5701407", "0.57009387", "0.56955075", "0.56869805", "0.5682891", "0.567293", "0.5665641", "0.5663219", "0.5662682", "0.56569964", "0.5638411" ]
0.684595
4
Returns count of project numbers
public function getProjectNumbersCount($getDeletedToo = true) { return $this->getTable()->getProjectNumbersCount($getDeletedToo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grabListProjectCount()\n{\n\tglobal $smcFunc;\n\n\t// As we requested that we might also need it...\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(id) AS project_count\n\t\tFROM {db_prefix}bugtracker_projects',\n\t\tarray()\n\t);\n\n\t// Countin' our way up.\n\tlist ($count) = $smcFunc['db_fetch_row']($request);\n\n\t// And give us some free space.\n\t$smcFunc['db_free_result']($request);\n\n\t// This is how many we have.\n\treturn $count;\n}", "public function countProjects() {\n return count(ProjectManager::getProjects());\n }", "function get_all_projetos_count()\n {\n $this->db->from('projetos');\n return $this->db->count_all_results();\n }", "public function getCountOf_Projects_get(){\n $result = $this->Post_project_model->getCountOf_Projects();\n \treturn $this->response($result);\n }", "public function getBelongedNumProjects() {\n $sql = \"SELECT numPorject FROM category_numproject WHERE category_id = %d\";\n $sql = sprintf($sql, $this->id);\n $results = self::$connection->execute($sql);\n if (count($results) != 1) {\n return 0;\n } else {\n return $results[0]['numporject'];\n }\n }", "public function getProjectCount($activeOnly) {\n\t\treturn $this->projectDao->getProjectCount($activeOnly);\n\t}", "function getProjectPositionsCount($project_id)\n\t{\n\t\t$query='SELECT count(*) AS count\n\t\tFROM #__'.COM_SPORTSMANAGEMENT_TABLE.'_project_position AS pp\n\t\tJOIN #__'.COM_SPORTSMANAGEMENT_TABLE.'_project AS p on p.id = pp.project_id\n\t\tWHERE p.id='.$project_id;\n\t\t$this->_db->setQuery($query);\n\t\treturn $this->_db->loadResult();\n\t}", "public function totalPrimeRunClients($projectId)\n {\n $registry = Zend_Registry::getInstance();\n\t\t$DB = $registry['DB'];\n $sql = \" SELECT COUNT( DISTINCT client_id ) FROM tbl_prime_cc_calc WHERE project_id = $projectId \";\n \t\t$result = $DB->fetchCol($sql);\n\t\treturn $result;\n }", "public function CountProjectsAsTeamMember() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\treturn 0;\n\n\t\t\treturn Project::CountByPersonAsTeamMember($this->intId);\n\t\t}", "function rawpheno_function_project() {\n $sql = \"SELECT FROM pheno_project_cvterm\";\n $project_count = db_query($sql)\n ->rowCount();\n\n return ($project_count <= 0) ? 0 : 1;\n}", "private function getNumberOfTasksInProject($project_id='')\n {\n \tif(!empty($project_id))\n \t{\n\t $query = \"SELECT count(project_task_id) AS total FROM project_task WHERE project_id = '{$project_id}'\";\n\t $result = $this->db->query($query, true);\n\t if($result)\n\t {\n\t\t $row = $this->db->fetchByAssoc($result);\n\t\t if(!empty($row['total']))\n\t\t {\n\t\t return $row['total'];\n\t\t }\n\t }\n \t}\n return 0;\n }", "public function totalClientsCount($projectId)\n {\n $registry = Zend_Registry::getInstance();\n\t\t$DB = $registry['DB'];\n $sql = \"SELECT COUNT(proj_client_id) as cnt FROM tbl_clients WHERE project_id = $projectId AND deleted = 0 \";\n \t\t$result = $DB->fetchCol($sql);\n\t\treturn $result;\n }", "function getProjectedCounts() \n {\n return $this->m_projectedHeaderCounts;\n }", "public function updateProjectCounterCache() {\n\t\t$list = $this->Project->find('list');\n\t\t$projects = array_keys($list);\n\n\t\t$this->out('<warning>Updating ' . count($projects) . ' operation counts...</warning>', 0);\n\t\tif (!count($projects)) {\n\t\t\t$this->out('nothing to do.');\n\t\t\treturn;\n\t\t}\n\t\tif ($this->params['dry-run']) {\n\t\t\t$this->out('dry-run.. skipping.');\n\t\t\treturn;\n\t\t}\n\t\tforeach ($projects as $projectId) {\n\t\t\t$count = $this->Project->Operation->find('count', array('conditions' => array('Operation.project_id' => $projectId)));\n\t\t\t$project = array(\n\t\t\t\t'Project' => array(\n\t\t\t\t\t'id' => $projectId,\n\t\t\t\t\t'operation_count' => $count,\n\t\t\t\t\t'modified' => false,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif (!$this->Project->save($project)) {\n\t\t\t\t$this->out('<error>Error saving count.</error>');\n\t\t\t\tdie();\n\t\t\t} else {\n\t\t\t\t$this->out('.', 0);\n\t\t\t}\n\t\t\tunset($project);\n\t\t}\n\t\t$this->out('done.');\n\t}", "function getRoundsCount($project_id)\n\t{\n\t $option = JRequest::getCmd('option');\n\t\t$app = JFactory::getApplication();\n $db = sportsmanagementHelper::getDBConnection(TRUE, $app->getUserState( \"com_sportsmanagement.cfg_which_database\", FALSE ) );\n $query = $db->getQuery(true);\n\t // Select some fields\n $query->select('count(*) AS count');\n // From the table\n\t\t$query->from('#__sportsmanagement_round');\n $query->where('project_id = '.$project_id); \n\n\t\t$db->setQuery($query);\n\t\treturn $db->loadResult();\n\t}", "public static function getProjectsCountByStatus()\n {\n return self::join('projects', 'projects.status_id', '=', 'statuses.id')\n ->where(function ($q) {\n $q->where('projects.deleted_at', null);\n $user = Auth::user();\n if ($user->hasRole('client')) {\n $q->where('projects.client_id', $user->id);\n }\n })\n ->groupBy('statuses.id')\n ->get(\n ['statuses.id','statuses.title','statuses.slug', DB::raw('count(projects.id) as count')]\n );\n }", "public static function countUnitsInProject($projectID)\n {\n try {\n $project = ArmyDB::retrieveUnitsFromProject($projectID);\n\n //var_dump($project);\n\n $count = 0;\n foreach ($project as $unit) {\n //var_dump($unit);\n $count++;\n }\n\n return $count;\n }\n catch (Exception $e) {\n return 0;\n }\n }", "function calculate_tasks($tasksArr, $projectId) {\n $tasksCount = 0;\n foreach ($tasksArr as $task) {\n $tasksCount += ($task['project_id'] === $projectId) ? 1 : 0;\n }\n return $tasksCount;\n}", "function getProjectNumber($facultyId){\n\t\t$query = $this->db->where('faculty_id',$facultyId)\n\t\t\t\t\t\t\t->get('projects');\n\t\treturn $query->num_rows();\n\t}", "private function count()\n\t\t{\n\t\t\t$query = \"\tSELECT count(1) AS 'total'\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\t\n\t\t\treturn $row['total'];\t\t\n\t\t}", "public static function doCount($params=NULL) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->select(self::TABLE_NAME, self::COUNT_TABLE);\n\t\treturn (int) DbModel::doSelectOne($conn, new ProjectsListingsModel());\n\t}", "function news_get_count( $p_project_id, $p_sitewide=true ) {\r\n\t\t$c_project_id = db_prepare_int( $p_project_id );\r\n\r\n\t\t$t_news_table = config_get( 'mantis_news_table' );\r\n\t\t$t_project_where = helper_project_specific_where( $p_project_id );\r\n\r\n\t\t$query = \"SELECT COUNT(*)\r\n\t\t\t\t FROM $t_news_table\r\n\t\t\t\t WHERE $t_project_where\";\r\n\r\n\t\tif ( $p_sitewide ) {\r\n\t\t\t$query .= ' OR project_id=' . ALL_PROJECTS;\r\n\t\t}\r\n\r\n\t\t$result = db_query( $query );\r\n\r\n\t return db_result( $result, 0, 0 );\r\n\t}", "function findNumArchivedProjects($sunetid)\n{\n // Find the number of archived projects this person has\n $sql = \"select count(*) as num_archived\n from redcap_projects rp, redcap_user_rights ur\n where rp.status = 3\n and rp.project_id = ur.project_id\n and ur.username = '\" . $sunetid . \"'\n and ur.expiration is null\";\n $q = db_query($sql);\n while ($current_db_row = db_fetch_assoc($q)) {\n $num_archived = $current_db_row['num_archived'];\n }\n\n return $num_archived;\n}", "function getProjects(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT count(actTab.uuid) AS recCount, project_list.project_id, project_list.project_name\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN space ON actTab.uuid = space.uuid\n\t\t JOIN project_list ON space.project_id = project_list.project_id\n\t\t GROUP BY space.project_id \n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$projects = array();\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $name = $row[\"project_name\"];\n\t\t\t\t\t $count = $row[\"recCount\"] + 0;\n\t\t\t\t\t $uuid = $row[\"project_id\"];\n\t\t\t\t\t $uri = self::projectBaseURI.$uuid;\n\t\t\t\t\t $projects[$uri] = array(\"name\" => $name, \"count\" => $count);\n\t\t\t\t}//end loop\n\t\t\t\t\n\t\t\t\t$projects = $this->orderURIs($projects);\n\t\t\t\t$this->projects = $projects;\n\t\t }//end case with results\n\t \n\t }", "public function totalAceRunClients($projectId)\n {\n $registry = Zend_Registry::getInstance();\n\t\t$DB = $registry['DB'];\n $sql = \" SELECT COUNT( DISTINCT client_id ) FROM tbl_aces_calc WHERE project_id = $projectId \";\n \t\t$result = $DB->fetchCol($sql);\n\t\treturn $result;\n }", "public function taskCount(): int {}", "public function getOpenAssignedToMeCount() {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$openstatusTest = \"\";\r\n\t\t$openStatus = \"SELECT * FROM `status` WHERE isDone = 0 AND active != 0\";\r\n\t\t$openQuery = $db->query($openStatus);\r\n\t\twhile ($oneStatus = $openQuery->fetch_assoc()) {\r\n\t\t\tif ($openstatusTest == \"\") {\r\n\t\t\t\t$openstatusTest = $oneStatus[\"id\"];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$openstatusTest = $openstatusTest . \", \" . $oneStatus[\"id\"];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"SELECT count(task.id) AS id FROM task\r\n\t\t\t\t INNER JOIN project ON project.id = task.project_id\r\n\t\t\t\t INNER JOIN `status` ON `status`.id = task.status_id\r\n\t\t\t\tWHERE status_id IN ($openstatusTest) AND task.active !=0 AND assignee_id = \" . $_SESSION['nobug'.RANDOMKEY.'userId'] . \"\r\n\t\t\t\tLIMIT 10\";\r\n\t\treturn $db->query($sql)->fetch_assoc()[\"id\"];\r\n\t}", "function ProjetosPendentes() {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd3 = 1;\n }else{\n $qtd3 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd3);\n\n if($porcentagem!=100) {\n $count++;\n }\n }\n\n return $count;\n}", "public function getBuildCount()\n {\n return $this->count(self::BUILD);\n }", "public function getProjectsByUserIdCount(int $userId) : int;", "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "public function getTaskCount(){\n\n $sql = \"SELECT count(id) as approno \n\t FROM fs_workflow \n\t WHERE form_id = '$this->wf_id'\";\n\n $query = $this->conn->query($sql);\n \n if ($query) {\n $row = $query->fetch_assoc();\n return $row['approno'];\n }\n\n return 0;\n\n }", "function getUserNbParticipation(){\n try{\n $bdd = dbConnect();\n $stmt = $bdd->prepare(\"SELECT COUNT(*) FROM project_member WHERE user_id=:id\");\n $stmt->execute(array(\n 'id' => $_SESSION['id']\n ));\n $result = $stmt->fetch(PDO::FETCH_NUM);\n return $result;\n }\n catch(PDOException $e){\n echo \"<br>\" . $e->getMessage();\n }\n }", "public function actionCount()\n {\n Project::$showCanceled = true;\n PProjectJob::$showCanceled = true;\n\n $projectJobId = Yii::app()->request->getParam(\"projectJobId\");\n $userJobId = Yii::app()->request->getParam(\"userJobId\");\n $boxNumber = Yii::app()->request->getParam(\"boxNumber\");\n $status = Yii::app()->request->getParam(\"status\");\n\n if (!empty($userJobId))\n {\n $userJob = UserJob::model()->findByPk($userJobId);\n if (!$userJob instanceof UserJob) return false;\n $projectJobId = $userJob->job_id;\n }\n\n $projectJob = PProjectJob::model()->findByPk($projectJobId);\n if (!$projectJob instanceof PProjectJob) return false;\n\n $manager = new EditorFlagManager($projectJob);\n $criteria = $manager->getCriteria($boxNumber, $status);\n\n $this->sendResponse(200, $this->getObjectEncoded(array('count' => UserJobEditorFlag::model()->count($criteria))));\n }", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "public function getActiveProjectsByUserIdCount(int $userId) : int;", "public function CountProjectsAsManager() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\treturn 0;\n\n\t\t\treturn Project::CountByManagerPersonId($this->intId);\n\t\t}", "public function findCount()\n {\n return $this->getEntityManager()\n ->createQuery(\"SELECT t.number, COUNT(f.id) as cnt\n FROM GazMainBundle:Finance f\n LEFT JOIN f.terminal t\n LEFT JOIN f.clientSale cs\n\t\t\t\t\t\t\tLEFT JOIN f.clientBuy cb\n\t\t\t\t\t\t\tWHERE f.financeType = FALSE\n\t\t\t\t\t\t\tGROUP BY t.number\n\t\t\t\t\t\t\tORDER BY t.number ASC\n \")\n ->getResult();\n }", "public function getProjectActivityCount($includeDeleted = false) {\n return $this->getProjectDao()->getProjectActivityCount($includeDeleted); \n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function calcTotalPages($projectId)\n\t{\n\t\t// Calculate number of pages\n\t\t$cities = Config::get('acme.geo.citycount');\n\t\t$states = Config::get('acme.geo.statecount');\n\t\t$defpages = Config::get('acme.geo.defaultpages');\n\n\t\t$project = Project::with([\n\t\t\t'niche' => function($q) {\n\t\t\t\t$q->addSelect('id');\n\t\t\t},\n\t\t\t'niche.children' => function($q) {\n\t\t\t\t$q->addSelect('id', 'parent_id');\n\t\t\t},\n\t\t\t])->find($projectId);\n\n\t\t// First niche\n\t\t$niche_count = 1;\n\n\t\t// If Project has niche->children, then count them\n\t\tif(isset($project->niche->children))\n\t\t{\n\t\t\t$niche_count = $project->niche->children->count() + $niche_count;\n\t\t}\n\n\t\treturn (($cities * $niche_count) + $states + $defpages);\n\t}", "public function countParticipants($projectId)\n {\n return $this->createQueryBuilder('pc')\n ->select('COUNT(DISTINCT pc.user)')\n ->where('pc.project = :project')\n ->setParameter('project', $projectId)\n ->getQuery()\n ->getSingleScalarResult();\n }", "public function getActivitiesCount() : int;", "public static function count();", "public function count()\n {\n return count($this->plans);\n }", "public function getImportCount();", "public function countAll(): int;", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count(): int\n {\n return count($this->testCases);\n }", "function board_health($prj,$status=1){\n $query = \"select box.rname,count(box_cont.cid) from box join box_cont on box.id = box_cont.fkid and box.fbid = '\".$prj.\"' and box_cont.status = '\".$status.\"' group by box.id;\";\n $result = mysql_query($query);\n $the_count = null;\n while($row = mysql_fetch_array($result)){\n $the_count = $the_count + $row[1];\n }\n if($the_count==0){$the_count = 0;}\n return $the_count;\n}", "function get_all_pagina_web_count()\r\n {\r\n $pagina_web = $this->db->query(\"\r\n SELECT\r\n count(*) as count\r\n\r\n FROM\r\n `pagina_web`\r\n \")->row_array();\r\n\r\n return $pagina_web['count'];\r\n }", "public function getTeamCount()\n {\n return $this->count(self::_TEAM);\n }", "public function count()\n {\n return count($this->group);\n }", "function ProjetosRealizados() {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd1 = 1;\n }else{\n $qtd1 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd1);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}", "public function getNumberOfWorks()\n {\n return $this->createQueryBuilder('w')\n ->select('COUNT(w)')\n ->getQuery();\n }", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function countProjects(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collProjectsPartial && !$this->isNew();\n if (null === $this->collProjects || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collProjects) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getProjects());\n }\n $query = ProjectQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByYear($this)\n ->count($con);\n }\n\n return count($this->collProjects);\n }", "public function roomCountByLevel($projectId)\n {\n $this->db->select('id, COUNT(id) as room_count, level', false)\n ->from('project_rooms')\n ->where('project_id', $projectId)\n ->group_by('level');\n\n $query = $this->db->get();\n \n $result = $query->result_array();\n\n return $result;\n }", "public function totalCount();", "public function totalCount();", "final public static function count( ) {\n\t\treturn self::$intQueryCount;\n\t}", "public function _count();", "public function count(): int;", "public function count(): int;", "public function count(): int;" ]
[ "0.8287974", "0.7873941", "0.7744269", "0.75998634", "0.7558667", "0.7147381", "0.7009453", "0.69966817", "0.69641215", "0.69315237", "0.692668", "0.69045645", "0.68630147", "0.6757091", "0.6702161", "0.66974515", "0.6622034", "0.6583274", "0.65799963", "0.65557903", "0.6554118", "0.65538204", "0.6527908", "0.65228444", "0.6521615", "0.6483796", "0.6413479", "0.6412925", "0.64011216", "0.6398082", "0.635707", "0.6316165", "0.6246973", "0.62265444", "0.62133926", "0.6212464", "0.62101513", "0.61156905", "0.6113158", "0.61108536", "0.61108536", "0.61108536", "0.6099856", "0.609017", "0.6049468", "0.6045102", "0.60450673", "0.6041781", "0.6037666", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6026502", "0.6007382", "0.5990014", "0.59797794", "0.5975296", "0.59745556", "0.5973964", "0.59637153", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930927", "0.5930758", "0.5930758", "0.5915841", "0.59044844", "0.5902199", "0.5902199", "0.58899426", "0.58895904", "0.5887257", "0.5887257", "0.5887257" ]
0.6072863
44
check wether this company has a department or not
public function hasDepartments() { $deps = $this->getDepartments(); if ($deps->count() > 0) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasDepartment() {\n return $this->_has(2);\n }", "public static function isDepartment( $did ) {\n\t\t$db = JFactory::getDbo();\n\t\t$query = \"SELECT COUNT(*) FROM `#__obhelpdesk3_departments` WHERE id=\" . $did . \" AND published = 1\";\n\t\t$db->setQuery( $query );\n\t\tif ( $db->loadResult() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasDepartment($department) {\n\t\t$hasDepartment = ConstructionDepartmentQuery::create()->filterByConstruction($this)->filterByDepartment($department)->count();\n\t\tif ($hasDepartment > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getDepartment() { \n if(!$this->department || !$this->department->department)\n return false;\n\n return $this->department->department;\n }", "function verify_dept($dept) {\n if ($dept != \"Techie\" || $dept != \"IT\" || $dept != \"NOC\" || $dept != \"Marketing\") {\n return \"<span>*Invalid Department</span>\";\n } else {\n return $dept;\n }\n }", "private function verify_department(){\n $active_department_id = $request->session()->get('active_dept_id',1) ; \n $department = Department::find($active_department_id);\n }", "private function check_item_department_required($field, $value) {\n if( $field ) {\n if( $value == \"\" || empty($value) ) {\n return false;\n }\n }\n return true;\n }", "public function checkPersonnelDepartment($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkPersonnelDepartment($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "function get_department(){\n $this->_db2->where(\"DeleteFlag\",\"A\");\n return $this->_db2->get($this->_tblorg);\n }", "public function checkDesignDepartment($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkDesignDepartment($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function checkManageDepartment($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkManageDepartment($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function testGetDepartmentWithRestrictionCheck()\n\t{\n\t\t// manually set phonelistRestrict on if its off;\n\t\t/** @var SystemConfigRepository $systemConfigRepo */\n\t\t$systemConfigRepo = self::$em->getRepository(SystemConfig::class);\n\t\t$currentPhonelistRestrictState = self::$originalPhonelistRestrictState;\n\t\tif (!$currentPhonelistRestrictState) {\n\t\t\t/** @var SystemConfig $dorEmployeeRestrict */\n\t\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorEmployeeRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t}\n\n\t\t//The office to get departments from\n\t\t$officeId = 55;\n\n\t\t//The department to get details from\n\t\t$departmentId = 56;\n\n\t\t$headers = array(\n\t\t\t 'HTTP_AUTHORIZATION' => HttpHeader::BEARER.' '.self::$token,\n\t\t);\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\t Request::METHOD_GET,\n\t\t\t '/api/v1/offices/'.$officeId.'/departments'.'/'.$departmentId,\n\t\t\t array(),\n\t\t\t array(),\n\t\t\t $headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$department = json_decode($response->getContent(), true);\n\t\t$department = $department['data'];\n\n\t\t//Test that a office has at minimum the below values\n\t\t$this->assertArrayHasKey('id', $department);\n\t\t$this->assertArrayHasKey('name', $department);\n\t\t$this->assertArrayHasKey('children', $department);\n\n\t\t//Test that a child has at minimum the below values\n\t\t$children = $department['children'];\n\t\t$this->assertTrue(sizeof($children) > 0);\n\n\t\t//Test if exactly x departments are returned\n\t\t$this->assertTrue(2 === count($children));\n\n\t\tforeach ($children as $child) {\n\t\t\t$this->assertArrayHasKey('id', $child);\n\t\t\t$this->assertArrayHasKey('name', $child);\n\t\t\t$this->assertArrayHasKey('children', $child);\n\t\t}\n\n\t\t// manually set phonelistRestrict off if its on;\n\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t$dorEmployeeRestrict->setValue('no');\n\t\tself::$em->flush();\n\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t$currentPhonelistRestrictState = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT)->getNormalizedValue();\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_GET,\n\t\t\t'/api/v1/offices/'.$officeId.'/departments'.'/'.$departmentId,\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$department = json_decode($response->getContent(), true);\n\t\t$department = $department['data'];\n\n\t\t//Test that a office has at minimum the below values\n\t\t$this->assertArrayHasKey('id', $department);\n\t\t$this->assertArrayHasKey('name', $department);\n\t\t$this->assertArrayHasKey('children', $department);\n\n\t\t//Test that a child has at minimum the below values\n\t\t$children = $department['children'];\n\t\t$this->assertTrue(sizeof($children) > 0);\n\n\t\t//Test if exactly x departments are returned\n\t\t$this->assertTrue(3 === count($children));\n\n\t\tforeach ($children as $child) {\n\t\t\t$this->assertArrayHasKey('id', $child);\n\t\t\t$this->assertArrayHasKey('name', $child);\n\t\t\t$this->assertArrayHasKey('children', $child);\n\t\t}\n\n\t\t// return phonelist restrict to original state\n\t\tif ($currentPhonelistRestrictState !== self::$originalPhonelistRestrictState) {\n\t\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorEmployeeRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t}\n\t}", "function fndepartmentCount() {\n\t\t$this->db->select(\"count(*) as selectCount\");\n\t\t$vResult = $this->db->get(t_department)->result();\n\t\tif($vResult) {\n\t\t\treturn $vResult[0];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getCompany() {\n if(!$this->department || !$this->department->department || !$this->department->department->division || !$this->department->department->division->company)\n return false;\n\n return $this->department->department->division->company;\n }", "public function getDepartment(){\r\n\t return $this->_department;\r\n\t}", "public function existeDepartamento($dep) {\n $c=\"select * from departamentos where nom_dep=:n\";\n $stmt=parent::$conexion->prepare($c);\n try{\n $stmt->execute([\n ':n'=>$dep\n ]);\n }catch(PDOException $ex){\n die(\"Error al comprobar existencia del departamento: \". $ex->getMessage());\n }\n $fila=$stmt->fetch(PDO::FETCH_OBJ);\n return ($fila==null) ? false : true;\n }", "public function get_department() \n {\n return $this->department;\n }", "function getDepartment($code){\n\n\tglobal $DB;\n\t\n\tif($DB->query(\"SELECT code FROM department WHERE code = :code\", array(\n\t':code' => $code))){\n\t\treturn true;\n\t}\n\t\n\telse{\n\t\treturn false;\n\t}\n}", "private function isCompanyRequired()\n {\n return $this->eavConfig->getAttribute('customer_address', 'company')->getIsRequired();\n }", "public function dept_add_person_for_department(){\n $outputs = array();\n $empl_id = isset($_REQUEST['empl_id'])?$_REQUEST['empl_id']:null;\n $dept_id = isset($_REQUEST['dept_id'])?$_REQUEST['dept_id']:null;\n if(empty($empl_id) or empty($dept_id)){\n $outputs['code'] = 500;\n $outputs['msg'] = 'empty info';\n return $outputs;\n }\n //check exists\n $d_empl = D('TbHrCard')->findOneByEmplId($empl_id);\n $d_dept = D($this->name_dept)->gainSimpleOneDept($dept_id);\n if(empty($d_empl) or empty($d_dept)){\n $outputs['code'] = 500;\n $outputs['msg'] = 'not exists';\n return $outputs;\n }\n\n $status = D($this->name_dept)->addEmployeeToDepartment($empl_id,$dept_id);\n return $outputs;\n }", "public function getDepartment()\n {\n return $this->department;\n }", "public function hasCompanyInfo()\n {\n $result = false;\n if ($this->getField('company') != '' && $this->getField('companyzipcode') != '') {\n $result = true;\n }\n return $result;\n }", "private function dataHasDeposit()\n {\n return array_key_exists('deposit', $this->data);\n }", "public function checkIfDepartmentHODExist(Request $request)\n {\n\t\t$data = $request->post();\n\t\treturn new Response(User::where([['department','=',$data['department']],['designation','=',$data['designation']],['id','!=',$data['id']]])->count());\n }", "public function checkBusinessDepartment($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkBusinessDepartment($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public static function isExternalDepartment( $did ) {\n\t\t$db = JFactory::getDbo();\n\t\t$query = \"SELECT `external_link` FROM `#__obhelpdesk3_departments` WHERE id=\" . $did . \"\";\n\t\t$db->setQuery( $query );\n\t\tif ( $external_link = $db->loadResult() ) {\n\t\t\treturn $external_link;\n\t\t}\n\n\t\treturn false;\n\t}", "private function check_department_user(int $department_id, int $user_id): bool\n {\n // Dus in dit geval gebruik je straks ['count'] in PHP (in plaats van ['COUNT(*)'])\n $sql = 'SELECT COUNT(*) AS count\n FROM department_user\n WHERE department_id = :department_id\n AND user_id = :user_id';\n\n $statement = $this->statement_execute($sql, [\n 'department_id' => $department_id,\n 'user_id' => $user_id\n ]);\n\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n\n // Als de count meer dan 0 is (1 of meer, dus) komt de combinatie voor; dan moet hij true zijn!\n return $result['count'] > 0;\n }", "public function validateHasAppartements() {\n return $this->cart->items()->where( 'class', Appartement::class )->count() > 0;\n }", "public function getDepartmentId()\n {\n $id = $this->getData('department_id');\n $department = $this->departmentFactory->create()->load($id);\n if (!$department) {\n return false;\n }\n\n return $id;\n }", "private function hasValidDepartment($memberof)\n {\n foreach ($memberof as $group) {\n $matches = [];\n preg_match(\"/CN=([\\w\\s]+),/\", $group, $matches);\n if (array_key_exists(1, $matches) && array_key_exists($matches[1], $this->ldap_groups)) {\n return true;\n }\n }\n return false;\n }", "public function is_needed() {\n\t\treturn $this->context->site_represents === 'company';\n\t}", "public function department() {\n\t\treturn $this->has_many_and_belongs_to('Department', 'department_members');\n\t}", "public function getOrganizationDepartment()\n {\n return $this->organizationDepartment;\n }", "public function getDepartment()\n {\n return $this->hasOne(Departments::className(), ['ID' => 'DepartmentID']);\n }", "public function getIdDepartment()\n {\n return $this->id_department;\n }", "public function insertHospitalDepartment($globalUtil,$data){\n\t\t\t\n\t\t\t$data_dept_details=$data;\n\t\t\tif($globalUtil->sqlinsert($data_dept_details,TABLE_HOSPITAL_DEPARTMENT_INFORMATION)){\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function isEmployee(){\n if(isset($this->staffId)){\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "private function isDepartmentLimitExceeded($mix) {\n\t\tif ($this->recalc) {\n\t\t\t$equipment = $mix->getEquipment();\n\t\t\tif ($equipment && $equipment->isTrackedTowardsDepartment()) {\n\t\t\t\tif ($mix->getDepartment()->getMonthlyLimit() == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t//\tveeeeeeeeery slow =(\n\t\t\t\t//\t$totalDepartmentUsage = $mix->getDepartment()->getCurrentUsage();\n\n\t\t\t\t//\toptimized\n\t\t\t\t//\tget mix creation month\n\t\t\t\t//$mixDetails = $mix->getMixDetails($mix->getMixID());\n\t\t\t\t//$mixCreationMonth = substr($mixDetails['creationTime'],0,2);\n\t\t\t\t//$mixCreationYear = substr($mixDetails['creationTime'],-4);\n\t\t\t\t$mixCreationMonth = substr($mix->getCreationTime(),0,2);\n\t\t\t\t$mixCreationYear = substr($mix->getCreationTime(),-4);\n\n\t\t\t\t//$totalDepartmentUsage = $mix->getDepartment()->getCurrentUsageOptimized((int)$mixCreationMonth, (int)$mixCreationYear);\n\t\t\t\t$totalDepartmentUsage = $mix->getDepartment()->getAnnualUsage((int)$mixCreationYear, (int)$mixCreationMonth);\n\n\t\t\t\tif (!$mix->isAlreadyExist()) {\n\t\t\t\t\t$totalDepartmentUsage += $mix->getCurrentUsage();\n\t\t\t\t}\n\n\t\t\t\tif ((float)$totalDepartmentUsage > (float)$mix->getDepartment()->getMonthlyLimit()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn $mix->isDepartmentLimitExceeded();\n\t\t}\n\t}", "public function getDepartment()\n {\n return $this->hasOne(Department::className(), ['id' => 'department_id']);\n }", "public function getDepartment(): string;", "public function getDepartment(): ?string\n {\n return $this->Department;\n }", "private function isEdu() {\n return Config::get('dx.is_edu_modules', false);\n }", "public static function can_access(DepartmentInterface $department) {\n\n // check the role based permissions\n switch (Auth::user()->role) {\n\n \tcase User::PIVOT_ADMIN:\n \t // can do anything\n \t return true;\n\n \tcase User::SCHOOL_ADMIN;\n \t// can access anything in their school\n \treturn (Auth::user()->school_id == $department->school_id);\n\n \tcase User::DEPARTMENT_HEAD:\n \t // can access anything in their department\n \t return (Auth::user()->department_id == $department->id);\n\n \tcase User::TEACHER:\n \t // can access their own departments\n \t return $department->classes->filter(function($class) {\n \t return (Auth::user()->id == $class->teacher_id);\n \t })->count();\n }\n\n return false;\n }", "public function getDepartment()\n {\n return $this->hasOne(Department::className(), ['id' => 'departmentID']);\n }", "public function exists_in_database()\n {\n \t$value = $this->input->post('department_Name');\n $query = $this->db->get_where($this->table, array('department_Name'=> $value,'department_active !='=>'E' )); \n\n if ($query->num_rows() > 0 )\n {\n $this->form_validation->set_message('exists_in_database', 'Department Already Exist....');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n\n\n }", "function domain_exists($domain) {\n\tglobal $DB;\n\n\tif(!isset($domain) || empty($domain) || is_null($domain)) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"domain not set or empty\\n\";\n\t\t}\n\t\treturn true;\n\t}\n\t$domain = $DB->EscapeQueryStmt(strtolower($domain));\n\t$DB->Query(\"SELECT COUNT(*) AS TOT FROM Account WHERE Domain = '{$domain}' AND Del = 0\");\n\t$tot = $DB->GetRow();\n\treturn (isset($tot[\"TOT\"]) && intval($tot[\"TOT\"]) > 0);\n}", "public function isEmployee()\n {\n $roles = $this->roles->toArray();\n return !empty($roles);\n }", "public function getHospitalDepartment($globalUtil,$condition){\n\t\t$sql = \"SELECT * FROM \".TABLE_HOSPITAL_DEPARTMENT_INFORMATION.\" \".$condition;\n\t\t$HospitalDeptDetails = $globalUtil->sqlFetchRowsAssoc($sql,2);\t\n\t\treturn $HospitalDeptDetails;\n\t\t}", "public function isDefDomain(){\n return (boolean) $this->isActive() && ($this->getDomainName() == Yii::$app->params['domain_name']) && ($this->getDomainTopName() == 'ru');\n }", "public function getDepartment(): ?OrganizationInterface;", "public function delete(Administrator $user, Department $department): bool\n {\n return $user->can('delete-all-departments')\n || ($user->can('delete-departments')\n && $department->isAvailableForAdmin($user));\n }", "public function getDepartmentId()\n\t{\n\t\treturn $this->departmentId;\n\t}", "public function hasPaymentPlan()\n {\n $data = $this->getData();\n\n return isset($data->hire_purchase) && isset($data->hire_purchase[0]->instl_plan);\n }", "public function department()\n\t{\n\t\treturn $this->belongsTo('PanicHD\\PanicHD\\Models\\Department');\n\t}", "public function isDoctor() {\n return Roles::isDoctorRole($this->role_id);\n }", "public function testGetDepartmentsWithRestrictionCheck()\n\t{\n\t\t// manually set phonelistRestrict on if its off;\n\t\t/** @var SystemConfigRepository $systemConfigRepo */\n\t\t$systemConfigRepo = self::$em->getRepository(SystemConfig::class);\n\t\t$currentPhonelistRestrictState = self::$originalPhonelistRestrictState;\n\t\tif (!$currentPhonelistRestrictState) {\n\t\t\t/** @var SystemConfig $dorEmployeeRestrict */\n\t\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorEmployeeRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t}\n\n\t\t//The office to get departments from\n\t\t$officeId = 55;\n\n\t\t$headers = array(\n\t\t\t 'HTTP_AUTHORIZATION' => HttpHeader::BEARER.' '.self::$token,\n\t\t);\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\t Request::METHOD_GET,\n\t\t\t '/api/v1/offices/'.$officeId.'/departments',\n\t\t\t array(),\n\t\t\t array(),\n\t\t\t $headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$departments = json_decode($response->getContent(), true);\n\n\t\t//Test that the association array is not empty\n\t\t$this->assertTrue(sizeof($departments) > 0);\n\n\t\t//Test if exactly x departments are returned\n\t\t$this->assertTrue(2 === count($departments['data']));\n\n\t\t//Test that a department has at minimum the below values\n\t\tforeach ($departments['data'] as $department) {\n\t\t\t$this->assertArrayHasKey('id', $department);\n\t\t\t$this->assertArrayHasKey('name', $department);\n\t\t\t$this->assertArrayHasKey('children', $department);\n\n\t\t\t//Test that a child has at minimum the below values\n\t\t\t$children = $department['children'];\n\t\t\t$this->assertTrue(sizeof($children) > 0);\n\t\t\tforeach ($children as $child) {\n\t\t\t\t$this->assertArrayHasKey('id', $child);\n\t\t\t\t$this->assertArrayHasKey('name', $child);\n\t\t\t\t$this->assertArrayHasKey('children', $child);\n\t\t\t}\n\t\t}\n\n\t\t// manually set phonelistRestrict off if its on;\n\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t$dorEmployeeRestrict->setValue('no');\n\t\tself::$em->flush();\n\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t$currentPhonelistRestrictState = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT)->getNormalizedValue();\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_GET,\n\t\t\t'/api/v1/offices/'.$officeId.'/departments',\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$departments = json_decode($response->getContent(), true);\n\n\t\t//Test that the association array is not empty\n\t\t$this->assertTrue(sizeof($departments) > 0);\n\n\t\t//Test if exactly x departments are returned\n\t\t$this->assertTrue(3 === count($departments['data']));\n\n\t\t//Test that a department has at minimum the below values\n\t\tforeach ($departments['data'] as $department) {\n\t\t\t$this->assertArrayHasKey('id', $department);\n\t\t\t$this->assertArrayHasKey('name', $department);\n\t\t\t$this->assertArrayHasKey('children', $department);\n\n\t\t\t//Test that a child has at minimum the below values\n\t\t\t$children = $department['children'];\n\t\t\t$this->assertTrue(sizeof($children) > 0);\n\t\t\tforeach ($children as $child) {\n\t\t\t\t$this->assertArrayHasKey('id', $child);\n\t\t\t\t$this->assertArrayHasKey('name', $child);\n\t\t\t\t$this->assertArrayHasKey('children', $child);\n\t\t\t}\n\t\t}\n\n\t\t// return phonelist restrict to original state\n\t\tif ($currentPhonelistRestrictState !== self::$originalPhonelistRestrictState) {\n\t\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorEmployeeRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t}\n\t}", "public function checkCurrentDepartmentDesignOfStaff($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkCurrentDepartmentDesignOfWork($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function checkCurrentDepartmentManageOfStaff($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkCurrentDepartmentManageOfWork($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "protected function _checkIdDepartmentAuto($arr)\n\t{\n\t\tglobal $classEscape;\n\n\t\t$classCalcEntityDepartmentImport = &$arr['classCalcEntityDepartmentImport'];\n\n\t\tglobal $varsPluginAccountingAccount;\n\n\t\t$arrayNew = array();\n\t\t$arrayLog = $arr['arrayLog'];\n\t\tforeach ($arrayLog as $keyLog => $valueLog) {\n\t\t\t$array = &$arrayLog[$keyLog];\n\t\t\tforeach ($array as $key => $value) {\n\t\t\t\t$arrayStr = array('Debit', 'Credit');\n\t\t\t\tforeach ($arrayStr as $keyStr => $valueStr) {\n\t\t\t\t\tif ($value['idAccountTitle' . $valueStr] == '') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ($value['idDepartment' . $valueStr] != '') {\n\t\t\t\t\t\t$idDepartment = $arr['vars']['varsCheck']['arrDepartment'][$value['idDepartment' . $valueStr]];\n\t\t\t\t\t\tif (!$idDepartment) {\n\t\t\t\t\t\t\t$temp = $classEscape->toComma(array(\n\t\t\t\t\t\t\t\t'data' => $value['idDepartment' . $valueStr]\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t$temp = mb_substr($temp, 0, 100);\n\t\t\t\t\t\t\t$arrayNew[] = $temp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($arrayNew) {\n\t\t\t$arrayNew = array_unique($arrayNew);\n\t\t\t$arrayCheck = array();\n\t\t\t$array = $arrayNew;\n\t\t\tforeach ($array as $key => $value) {\n\t\t\t\t$flag = $classCalcEntityDepartmentImport->allot(array(\n\t\t\t\t\t'flagStatus' => 'check',\n\t\t\t\t\t'idEntity' => $varsPluginAccountingAccount['idEntityCurrent'],\n\t\t\t\t\t'strTitle' => $value,\n\t\t\t\t));\n\t\t\t\tif ($flag) {\n\t\t\t\t\t$arrayCheck[] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$arr['flagAuthority']) {\n\t\t\t\t$arrayCheck = '';\n\t\t\t\tunlink($arr['strUrl']);\n\t\t\t\t$this->_sendVars(array(\n\t\t\t\t\t'flagIframe' => 1,\n\t\t\t\t\t'flag' => 'strDepartment',\n\t\t\t\t\t'stamp' => $this->getStamp(),\n\t\t\t\t\t'numNews' => $this->getNumNews(),\n\t\t\t\t\t'vars' => $arrayCheck,\n\t\t\t\t));\n\n\t\t\t} else {\n\t\t\t\tif ($arrayCheck) {\n\t\t\t\t\tunlink($arr['strUrl']);\n\t\t\t\t\t$this->_sendVars(array(\n\t\t\t\t\t\t'flagIframe' => 1,\n\t\t\t\t\t\t'flag' => 'strTitleDepartment',\n\t\t\t\t\t\t'stamp' => $this->getStamp(),\n\t\t\t\t\t\t'numNews' => $this->getNumNews(),\n\t\t\t\t\t\t'vars' => $arrayCheck,\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $arrayNew;\n\t\t}\n\n\t\treturn array();\n\t}", "public function getDepartment()\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('department');\n\n\t\t$department = new Department($this->department_id);\t\t\t\t\n\n\t\treturn $department;\n\t}", "function erp_hr_count_departments() {\n\n return \\WeDevs\\ERP\\HRM\\Models\\Department::count();\n}", "public function checkCurrentDepartmentConstructionOfStaff($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkCurrentDepartmentConstructionOfWork($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function isEmployee()\n\t{\n\t\t$roles = $this->roles->toArray();\n\t\treturn !empty($roles);\n\t}", "public function testAssignmentDepartmentMethod()\n {\n $assignment = factory(NonCourseAssignment::class)->create();\n $department = factory(Department::class)->create();\n $assignment->department()->associate($department);\n $assignment->save();\n\n $this->assertDatabaseHas('non_course_assignments', [\n 'id' => $assignment->id,\n 'department_id' => $department->id,\n ]);\n }", "public function is_elex_dpd_enabled() {\n\t\treturn class_exists( 'Elex_dp_dynamic_pricing_plugin' );\n\t}", "protected function getIsOrganizationalAttribute()\n {\n return !empty($this->organization_goal_id);\n }", "public function checkCurrentDepartmentPersonnelOfStaff($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkCurrentDepartmentPersonnelOfWork($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function isEmployee()\n {\n $roles = $this->roles->toArray();\n return !empty($roles);\n }", "public function getIsDepositSufficient()\n {\n return $this->isDepositSufficient;\n }", "public function validateCompany()\n\t{\n\t\tif ($this->employed) {\n\t\t\t$validator = CValidator::createValidator('required', $this, 'company', array(\n\t\t\t\t'message' => 'This field depends on \"' .\n\t\t\t\t\t\t\t $this->getAttributeLabel('employed') .\n\t\t\t\t\t\t\t '\" and must not be empty.'\n\t\t\t));\n\t\t\t$validator->validate($this);\n\t\t\t$validator = CValidator::createValidator('length', $this, 'company', array('max'=>'25'));\n\t\t\t$validator->validate($this);\n\t\t} else {\n\t\t\t$this->company = null;\n\t\t}\n\t}", "public function getDivision() { \n if(!$this->department || !$this->department->department || !$this->department->department->division)\n return false;\n\n return $this->department->department->division;\n }", "public function ifEmployeeexiste($id_departement){\n\t\t\t\t\t$sql = \"SELECT * FROM employee WHERE id_departement='\".$id_departement.\"' \";\n\t\t\t\t\tif($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t if($this->db->query($sql)->fetch() != null)\n\t\t\t\t\t {\n\t\t\t\t\t return true;\n\t\t\t\t\t }\n\t\t\t\t\t } \n\t\t\t\t\treturn false;\n\t\t\t\t\t }", "public function onDepartment(){\n\t\t\t$sql = \"SELECT * FROM `department` WHERE `status` = 'ON' ORDER BY `id` ASC \";\n\t\t\t$query = $this->execute($sql);\n\t\t\tif($query){\n\t\t\t\treturn $query;\n\t\t\t}\n\t\t}", "public function testGetDepartmentNotFound()\n\t{\n\t\t//The office to get details from\n\t\t$officeId = 1;\n\n\t\t//The non-existing department\n\t\t$departmentId = 99999999;\n\n\t\t$headers = array(\n\t\t\t 'HTTP_AUTHORIZATION' => HttpHeader::BEARER.' '.self::$token,\n\t\t);\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\t Request::METHOD_GET,\n\t\t\t '/api/v1/offices/'.$officeId.'/departments/'.$departmentId,\n\t\t\t array(),\n\t\t\t array(),\n\t\t\t $headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_NOT_FOUND, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$result = json_decode($response->getContent(), true);\n\n\t\t//Test that the status is error\n\t\t$this->assertEquals('error', $result['status']);\n\t\t//Test that the message is Not found\n\t\t$this->assertEquals('Not found', $result['message']);\n\t}", "function getDepartments(){ // Return department codes and names from database.\n\n\tglobal $DB;\n\t\n\tif($DB->query(\"SELECT code, name FROM department ORDER BY code\")){\n\t\treturn $DB->results();\n\t}\n\t\n\telse{\n\t\treturn false;\n\t}\n}", "public function addDepartment()\n {\n $facultyId = $_SESSION['facultyId'];\n\n $json = file_get_contents('php://input');\n $obj = json_decode($json);\n\n $fct = array();\n if (property_exists($obj, 'name')) $fct['name'] = $obj->name;\n if (property_exists($obj, 'type')) $fct['type'] = $obj->type;\n if (property_exists($obj, 'address')) $fct['address'] = $obj->office;\n if (property_exists($obj, 'phone')) $fct['phone'] = $obj->phone;\n if (property_exists($obj, 'website')) $fct['website'] = $obj->website;\n $department = new Department($fct);\n\n if (!isset($fct['name']) || $fct['name'] == null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames[\"departmentName\"]) . Constant::isRequiredText\n ));\n return;\n } elseif (!isset($fct['type']) || $fct['type'] == null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => \"Loại \" . Constant::objectNames[\"department\"] . Constant::isRequiredText\n ));\n return;\n } else {\n if($fct['type'] == 4){\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::objectNames[\"facultyOfficer\"]) . Constant::isExistedText\n ));\n return;\n }\n\n foreach ($fct as $key => $value) {\n $action = 'check' . ucfirst($key);\n if (!$department->$action()) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames[$key]) . Constant::invalidText\n ));\n return;\n }\n }\n }\n\n /* if (isset($fct['deanId'])) {\n $deanFacultyId = OfficerTable::getFacultyIdOf($fct['deanId']);\n\n if ($deanFacultyId == null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => 'Dean is not existed'\n ));\n return;\n } elseif ($deanFacultyId != $facultyId) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => 'Dean is officer of other faculty'\n ));\n return;\n\n }\n } */\n\n // Valid now, add department\n $department->setFacultyId($facultyId);\n $result = DepartmentTable::addDepartment($department);\n\n if ($result === false) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => \"Tạo mới \" . Constant::objectNames['department'] . Constant::failed\n ));\n return;\n } else {\n http_response_code(201);\n echo json_encode(array(\n 'id' => $result\n ));\n }\n }", "function getDepartmentsByUsername(){\n if(Current_User::isDeity()){\n $db = &new PHPWS_DB('sysinventory_department');\n $db->addColumn('description');\n $db->addColumn('id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n return $list;\n // otherwise return a list of departments of which they're an admin \n }else if(Current_User::allow('sysinventory','admin')){\n $db = new PHPWS_DB('sysinventory_admin');\n $db->addWhere('username',Current_User::getUsername(),'ILIKE');\n $db->addJoin('left outer','sysinventory_admin','sysinventory_department','department_id','id');\n $db->addColumn('sysinventory_department.description');\n $db->addColumn('sysinventory_department.id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n \n return $list;\n }else{\n return NULL;\n }\n \n }", "function getDepartmentsByUsername(){\n if(Current_User::isDeity()){\n $db = &new PHPWS_DB('sysinventory_department');\n $db->addColumn('description');\n $db->addColumn('id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n return $list;\n // otherwise return a list of departments of which they're an admin \n }else if(Current_User::allow('sysinventory','admin')){\n $db = new PHPWS_DB('sysinventory_admin');\n $db->addWhere('username',Current_User::getUsername(),'ILIKE');\n $db->addJoin('left outer','sysinventory_admin','sysinventory_department','department_id','id');\n $db->addColumn('sysinventory_department.description');\n $db->addColumn('sysinventory_department.id');\n $list = $db->select();\n\n if (PEAR::isError($list)){\n PHPWS_Error::log($list);\n }\n \n return $list;\n }else{\n return NULL;\n }\n \n }", "public function department() {\n return $this->belongsTo(Department::class);\n }", "public function checkCurrentDepartmentAccountantOfStaff($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkCurrentDepartmentAccountantOfWork($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function getDepartment() {\n return response()->json([\n 'success' => true,\n 'statusCode' => 200,\n 'message' => 'Successfully retrieved clearances departments',\n 'data' => Department::all()]);\n }", "public function testSetDepartment()\n {\n\n // new entity\n $team = new Team();\n\n // dummy entity\n $department = new Department();\n $department->setName('NTNU');\n\n // Use the setDepartment method\n $team->setDepartment($department);\n\n // Assert the result\n $this->assertEquals($department, $team->getDepartment());\n }", "abstract function is_agency();", "public function department()\n {\n return $this->belongsTo(Department::class);\n }", "public function department()\n {\n return $this->belongsTo(Department::class);\n }", "public function department()\n {\n return $this->belongsTo(Department::class);\n }", "public function department()\n {\n return $this->belongsTo('App\\Models\\core\\Department', 'department_id');\n }", "public function checkTreasureDepartment($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkCurrentDepartmentTreasureOfWork($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function hasFunding() {\r\n return $this->funding->hasFunding();\r\n }", "public function getAllDepartmentInfo(){\n $LOG = Logger::getLogger(__CLASS__ . '.' . __FUNCTION__);\n\n $dao = new LabInspectionSummaryReportDAO();\n $min_year = $this->getMinimumReportYear();\n $departments = $dao->getDepartmentDetails(null, $min_year);\n\n return $departments;\n }", "public function checkConstructionDepartmentAndManageRank($staffId)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n $result = $this->infoActivityOfStaff($staffId);\n $resultStatus = false;\n if ($hFunction->checkCount($result)) {\n if ($modelStaffWorkDepartment->checkConstructionDepartmentAndManageRank($result->workId())) $resultStatus = true;\n }\n return $resultStatus;\n }", "public function dependencyExist(): bool\n {\n if ($this->dependencyExist !== null) {\n return $this->dependencyExist;\n }\n\n $this->dependencyExist = (bool)$this->getPqrForm()->getRow('sys_dependencia');\n\n return $this->dependencyExist;\n }", "public function hasDropDown() {}", "public function hasDropDown() {}", "public function hasDropDown() {}", "public function hasDropDown() {}", "public function hasDropDown() {}", "public function hasDropDown() {}", "public function hasDropDown() {}", "public function hasDropDown() {}" ]
[ "0.8229404", "0.71779704", "0.7162054", "0.68531704", "0.6614436", "0.6569807", "0.6490656", "0.622401", "0.619329", "0.61737955", "0.6143337", "0.61390656", "0.6112664", "0.6096192", "0.60876095", "0.6084", "0.60730517", "0.6058022", "0.5984729", "0.5965847", "0.59422064", "0.59324074", "0.5922408", "0.5907738", "0.59016836", "0.5886684", "0.58678424", "0.58608305", "0.58428776", "0.58071315", "0.57910633", "0.57829076", "0.57702875", "0.5760629", "0.57527107", "0.5745438", "0.5717514", "0.5706853", "0.56981045", "0.56919646", "0.5683441", "0.5675309", "0.56747687", "0.56663966", "0.5654018", "0.564078", "0.56352574", "0.56331426", "0.56285655", "0.56093925", "0.5608807", "0.5593213", "0.558253", "0.5573849", "0.5570847", "0.55707896", "0.5563126", "0.5529264", "0.55123794", "0.55095655", "0.5507809", "0.5492411", "0.54878473", "0.54877317", "0.5465932", "0.5453822", "0.5450924", "0.54433435", "0.5442166", "0.5427815", "0.54266167", "0.5423222", "0.5422758", "0.5407278", "0.5400564", "0.5398475", "0.5393941", "0.5393941", "0.5381345", "0.53670347", "0.53662366", "0.53619146", "0.5361329", "0.53548837", "0.53548837", "0.53548837", "0.5343555", "0.5333941", "0.5329426", "0.5319799", "0.5313815", "0.5312743", "0.53045315", "0.53045315", "0.53045315", "0.53045315", "0.53045046", "0.53045046", "0.53045046", "0.53038067" ]
0.74014276
1
get customized billing data
public function getBillingCustomized() { $customized = new Yourdelivery_Model_Billing_Customized(); $cid = $this->getTable()->getBillingCustomized(); if ($cid === false) { $customized->setMode('comp'); } else { $customized->load($cid['id']); } $customized->setCompany($this); $customized->setRefId($this->getId()); return $customized; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBilling();", "public function getBillingData(): array\n {\n return [\n 'billing.street1' => 'Wilaya center, Avenue Ali Yaeta, étage 3, n 31, Tétouan',\n 'billing.city' => 'TETOUAN',\n 'billing.state' => 'TETOUAN',\n 'billing.country' => 'MA',\n 'billing.postcode' => '35000',\n ];\n }", "public function getBillingDetails()\n {\n return $this->_billing;\n }", "public function getBillingProfile();", "public function getBilling()\n {\n return $this->billing;\n }", "public function getBilling()\n {\n return $this->billing;\n }", "public function getBillingFields() {\n\t\treturn $this->billingDetails;\n\t}", "public function getBillingAddress();", "public function getBillingAddress();", "public function getBillingFields()\n {\n $attributes = $this->getCollection()\n ->addFieldToFilter(\n 'is_used_for_onestepcheckout', array(\n 'neq' => '',\n )\n )\n ->addFieldToFilter(\n 'is_billing', array(\n 'eq' => 1,\n )\n );\n $attributes->setOrder('position', Varien_Data_Collection::SORT_ORDER_ASC);\n\n return $attributes;\n }", "public function getBilling()\n {\n return isset($this->billing) ? $this->billing : null;\n }", "public function billingInfos() {\n return new BillingInfo($this);\n }", "public function getBillingName(){\n return $this->_getData(self::BILLING_NAME);\n }", "public function getBillingAction() \n\t{\n\t\t$this->_ajaxValidation();\t\t\n\t\t$response['content']=$this->_getBillingHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}", "function add_billing_data($billObj) {\n\n $item = new stdClass();\n $item->trans_id = $billObj->transId;\n $item->cardholder = $billObj->billTo->firstName . ' ' . $billObj->billTo->lastName;\n $item->type = 'a';\n $item->address = $billObj->billTo->address;\n $item->state = $billObj->billTo->state;\n $item->city = $billObj->billTo->city;\n $item->zip = $billObj->billTo->zip;\n $item->pdate = time();\n\n $exists = $this->is_billing_data_exists($item->trans_id);\n if ($exists == 0) {\n $query = \"insert into mdl_billing_data \"\n . \"(transaction_id,\"\n . \"cardholder,\"\n . \"type,\"\n . \"address,\"\n . \"state,\"\n . \"city,\"\n . \"zip,\"\n . \"pdate) \"\n . \"values ('$item->trans_id',\"\n . \"'\" . addslashes($item->cardholder) . \"',\"\n . \"'$item->type',\"\n . \"'\" . addslashes($item->address) . \"',\"\n . \"'$item->state',\"\n . \"'\" . addslashes($item->city) . \"',\"\n . \"'$item->zip',\"\n . \"'$item->pdate')\";\n $this->db->query($query);\n } // end if $exists == 0\n }", "public function getBillingAddress(){\n return $this->_getData(self::BILLING_ADDRESS);\n }", "public function getCustomerBillingAddress() {\n\n if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\n $customerID = $customerData->getId();\n }\n\n $visitorData = Mage::getModel('customer/customer')->load($customerID);\n $billingaddress = Mage::getModel('customer/address')->load($visitorData->default_billing);\n $addressdata = $billingaddress->getData();\n\n return $addressdata;\n }", "private function generateDefaultBilling() {\n return new Billing('Postpaid');\n }", "function get_gateway_data( ){\n\t\t\n\t\t$authorize_login_id \t\t= \t\tget_option( 'ec_option_authorize_login_id' );\n\t\t$authorize_trans_key \t\t= \t\tget_option( 'ec_option_authorize_trans_key' );\n\t\t$authorize_test_mode \t\t= \t\tget_option( 'ec_option_authorize_test_mode' );\n\t\t$authorize_currency_code \t= \t\tget_option( 'ec_option_authorize_currency_code' );\n\t\t\n\t\t$transaction_type = \"AUTH_CAPTURE\";\n\t\t$expiration_date = $this->credit_card->expiration_month . '/' . $this->credit_card->get_expiration_year( 4 );\n\t\t\n\t\t/*\n\t\t$line_items = \"\";\n\t\tfor( $i=0; $i<count($this->cart->cart); $i++ ){\n\t\t\t\n\t\t\tif( $i != 0)\n\t\t\t\t$line_items .= \"&\";\n\t\t\t\t\n\t\t\t$line_items .= \t$this->cart->cart[$i]->product_id . \"<|>\" . \n\t\t\t\t\t\t\t$this->cart->cart[$i]->title . \"<|><|>\" . \n\t\t\t\t\t\t\t$this->cart->cart[$i]->quantity . \"<|>\" . \n\t\t\t\t\t\t\t$this->cart->cart[$i]->unit_price . \"<|>\" . \n\t\t\t\t\t\t\t$this->cart->cart[$i]->is_taxable; \t\n\t\t}\n\t\t*/\n\t\t\n\t\t$authorize_values = array(\n\t\t \"x_login\"\t\t\t\t\t\t\t=> $authorize_login_id,\n\t\t \"x_test_request\" \t\t\t\t\t=> $authorize_test_mode,\n\t\t \"x_tran_key\"\t\t\t\t\t\t=> $authorize_trans_key,\n\t\t \"x_type\"\t\t\t\t\t\t\t=> $transaction_type,\n\t\t \"x_amount\"\t\t\t\t\t\t=> $this->order_totals->grand_total,\n\t\t \"x_card_num\"\t\t\t\t\t\t=> $this->credit_card->card_number,\n\t\t \"x_exp_date\"\t\t\t\t\t\t=> $expiration_date,\n\t\t \"x_card_code\"\t\t\t\t\t\t=> $this->credit_card->security_code,\n\t\t \"x_invoice_num\"\t\t\t\t\t=> $this->order_id,\n\t\t \"x_relay_response\"\t\t\t\t=> \"FALSE\",\n\t\t \"x_delim_data\"\t\t\t\t\t=> \"TRUE\",\n\t\t \"x_version\"\t\t\t\t\t\t=> \"3.1\",\n\t\t \"x_delim_char\"\t\t\t\t\t=> \",\",\n\t\t \"x_method\"\t\t\t\t\t\t=> \"CC\",\n\t\t \"x_tax\"\t\t\t\t\t\t\t=> $this->order_totals->tax_total,\n\t\t \"x_duty\"\t\t\t\t\t\t\t=> $this->order_totals->duty_total,\n\t\t \"x_freight\"\t\t\t\t\t\t=> $this->order_totals->shipping_total,\n\t\t \"x_first_name\"\t\t\t\t\t=> $this->user->billing->first_name,\n\t\t \"x_last_name\"\t\t\t\t\t\t=> $this->user->billing->last_name,\n\t\t \"x_address\"\t\t\t\t\t\t=> $this->user->billing->address_line_1,\n\t\t \"x_city\"\t\t\t\t\t\t\t=> $this->user->billing->city,\n\t\t \"x_state\"\t\t\t\t\t\t\t=> $this->user->billing->state,\n\t\t \"x_zip\"\t\t\t\t\t\t\t=> $this->user->billing->zip,\n\t\t \"x_country\"\t\t\t\t\t\t=> $this->user->billing->country,\n\t\t \"x_phone\"\t\t\t\t\t\t\t=> $this->user->billing->phone,\n\t\t \"x_email\"\t\t\t\t\t\t\t=> $this->user->email,\n\t\t \"x_cust_id\"\t\t\t\t\t\t=> $this->user->user_id,\n\t\t \"x_customer_ip\"\t\t\t\t\t=> $_SERVER['REMOTE_ADDR'],\n\t\t \"x_ship_to_first_name\"\t\t\t=> $this->user->shipping->first_name,\n\t\t \"x_ship_to_last_name\"\t\t\t\t=> $this->user->shipping->last_name,\n\t\t \"x_ship_to_address\"\t\t\t\t=> $this->user->shipping->address_line_1,\n\t\t \"x_ship_to_city\"\t\t\t\t\t=> $this->user->shipping->city,\n\t\t \"x_ship_to_state\"\t\t\t\t\t=> $this->user->shipping->state,\n\t\t \"x_ship_to_zip\"\t\t\t\t\t=> $this->user->shipping->zip,\n\t\t \"x_ship_to_country\"\t\t\t\t=> $this->user->shipping->country,\n\t\t \"x_ship_to_phone\"\t\t\t\t\t=> $this->user->shipping->phone//,\n\t\t // \"x_line_item\"\t\t\t\t\t\t=> $line_items\n\t\t);\n\t\t\n\t\treturn $authorize_values;\n\t}", "function ywccp_get_all_custom_fields(){\r\n\t\t\r\n\t\t$fields = array();\r\n\t\t// get billing\r\n\t\t$fields['billing'] = ywccp_get_custom_fields('billing');\r\n\t\t// get shipping\r\n\t\t$fields['shipping'] = ywccp_get_custom_fields('shipping');\r\n\t\t// get additional\r\n\t\t$fields['additional'] = ywccp_get_custom_fields('additional');\r\n\t\t\r\n\t\treturn $fields;\r\n\t}", "public function getData()\n {\n $data = $this->only(['status', 'object', 'customer_id', 'product_id', 'plan_id', 'plan_amount', 'plan_interval', 'plan_interval_count', 'trial_period_days', 'created', 'canceled_at', 'current_period_start', 'current_period_end']);\n\n return $data;\n }", "public function billing()\n\t{\n\t\t\n\t\t$this->templateFileName = 'billing.tpl';\n\t\t\n\t\t// Tracks if there was an error in the process\n\t\t$errors = [];\n\t\t\n\t\t\n\t\t// Get list of payment methods to output\n\t\t$paymentMethodSQL = <<<EOT\n\t\t\t\t SELECT\n\t\t\t\t\tpayment_id,\n\t\t\t\t\tpayment_type,\n\t\t\t\t\tcredit_card_type,\n\t\t\t\t\tpayment_name,\n\t\t\t\t\tRIGHT(account_number, 4) AS account_number_last_4,\n\t\t\t\t\tLPAD(RIGHT(account_number, 4), LENGTH(account_number), 'X') AS account_number,\n\t\t\t\t\tcard_expiration_month,\n\t\t\t\t\tcard_expiration_year,\n\t\t\t\t\trp.description AS payment_type_description,\n\t\t\t\t\trc.description AS credit_card_type_description\n\t\t\t\t FROM\n\t\t\t\t\tb_payment\n\t\t\t\t\tINNER JOIN b_reference rp ON rp.data_member = 'PAYMENT_TYPE' AND rp.data_value = payment_type\n\t\t\t\t\tLEFT OUTER JOIN b_reference rc ON rc.data_member = 'CREDIT_CARD_TYPE' AND rc.data_value = credit_card_type\n\t\t\t\t WHERE \n\t\t\t\t\trecord_status = 'A'\n\t\t\t\t\tAND user_id = ?\nEOT;\n\t\t$paymentMethods = $this->dbConnection->prepareRecordSet( $paymentMethodSQL, $this->session->userID );\n\t\t\n\t\t// Get list of addresses to output\n\t\t$addresses = $this->getAddresses();\n\t\t\n\t\t\n\t\t// Get list of payment types from reference table\n\t\t$paymentTypes = $this->dbConnection->recordSet(\"SELECT * FROM b_reference WHERE data_member = 'PAYMENT_TYPE' ORDER BY description\");\n\t\t\n\t\t// Get list of credit card types\n\t\t$creditCardTypes = $this->dbConnection->recordSet(\"SELECT * FROM b_reference WHERE data_member = 'CREDIT_CARD_TYPE' ORDER BY description\");\n\t\t\n\t\t// Set output\n\t\t$this->set('payment_methods', $paymentMethods);\n\t\t$this->set('addresses', $addresses);\n\t\t$this->set('payment_types', $paymentTypes);\n\t\t$this->set('credit_card_types', $creditCardTypes);\n\t\t\n\t\t\n\t\t\n\t\t// Handle form input, if submitted\n\t\tif (count($_POST) > 0 && isset($_POST['billingSubmit']))\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t// Did the user select a billing address?\n\t\t\tif (!isset($_POST['addressSelect']) || empty($_POST['addressSelect']))\n\t\t\t\t$errors[] = 'Please select a billing address.';\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The user selected a billing address, determine what to do based on selection.\n\t\t\t\tif($_POST['addressSelect'] == 'new')\n\t\t\t\t{\n\t\t\t\t\t// The user selected to enter a new billing address\n\t\t\t\t\t// Do form validation\n\n\t\t\t\t\t\n\t\t\t\t\t$formComplete = true;\n\t\t\t\t\t$addressFieldErrors = [];\n\t\t\t\t\t\n\t\t\t\t\tif ( ! isset($_POST['address_name']) || empty($_POST['address_name']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$addressFieldErrors['address_name'] = 'Address Name is required';\n\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! isset($_POST['address_1']) || empty($_POST['address_1']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$addressFieldErrors['address_1'] = 'Address Line 1 is required';\n\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! isset($_POST['city']) || empty($_POST['city']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$addressFieldErrors['city'] = 'City is required';\n\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! isset($_POST['state']) || empty($_POST['state']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$addressFieldErrors['state'] = 'State is required';\n\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! isset($_POST['zip']) || empty($_POST['zip']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$addressFieldErrors['zip'] = 'Zip is required';\n\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sanitized_zip = preg_replace('/\\D/', '', (string)$_POST['zip']);\n\t\t\t\t\t\t$zip_length = strlen($sanitized_zip);\n\t\t\t\t\t\tif ( $zip_length != 5 && $zip_length != 9 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t$fieldErrors['zip'] = 'Zip must be 5 or 9 digits.';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($zip_length == 9)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_POST['zip'] = substr($sanitized_zip, 0, 5) . '-' . substr($sanitized_zip, 5, 4);\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$_POST['zip'] = $sanitized_zip;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($formComplete)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// The form is complete, so create the record\n\t\t\t\t\t\t$insertSQL = \"INSERT INTO b_user_address (user_id, address_name, address_1, address_2, city, state, zip, record_status) \"\n\t\t\t\t\t\t . \"VALUES(?, ?, ?, ?, ?, ?, ?, 'A')\";\n\t\t\t\t\t\tif ( ! $this->dbConnection->prepareCommand($insertSQL, $this->session->userID, $_POST['address_name'], $_POST['address_1'], $_POST['address_2'], $_POST['city'], $_POST['state'], $_POST['zip']) )\n\t\t\t\t\t\t\t$errors[] = 'Error creating record. Please try again.';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The record was successfully created, so set the shipping address ID and move on to the next step\n\t\t\t\t\t\t\t$this->session->billingAddressID = $this->dbConnection->insert_id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$errors[] = 'Billing Address is incomplete.';\n\t\t\t\t\t\t$this->set('addressFieldErrors', $addressFieldErrors);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The user selected an existing billing address\n\t\t\t\t\t// Do validation on the selected address\n\t\t\t\t\t$address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $_POST['addressSelect']);\n\t\t\t\t\tif (!$address)\n\t\t\t\t\t\t$errors[] = 'Error selecting address. This address does not exist.';\n\t\t\t\t\telseif ( $address['user_id'] != $this->session->userID )\n\t\t\t\t\t\t$errors[] = 'Error: The selected address is for a different user.';\n\t\t\t\t\telseif ( $address['record_status'] != 'A')\n\t\t\t\t\t\t$errors[] = 'Error: The selected address is not active.';\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// The address is valid, so use it.\n\t\t\t\t\t\t// set the shipping address and move on to the next step\n\t\t\t\t\t\t$this->session->billingAddressID = $_POST['addressSelect'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Did the user select a payment method?\n\t\t\tif (!isset($_POST['paymentSelect']) || empty($_POST['paymentSelect']))\n\t\t\t\t$errors[] = 'Please select a payment method';\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The usre selected a payment method, determine what to do based on selection\n\t\t\t\tif ($_POST['paymentSelect'] == 'new')\n\t\t\t\t{\n\t\t\t\t\t// The user selected to enter a new payment method\n\t\t\t\t\t// Do form validation\n\t\t\t\t\t$formComplete = true;\n\t\t\t\t\t$validValues = true;\n\t\t\t\t\t$paymentFieldErrors = [];\n\n\t\t\t\t\tif ( ! isset($_POST['payment_type']) || empty($_POST['payment_type']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$paymentFieldErrors['payment_type'] = 'Payment Type is required';\n\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Depending on the payment type, different fields are required\n\t\t\t\t\tswitch($_POST['payment_type'])\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\t// Credit card\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_card_type']) || empty($_POST['payment_card_type']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_card_type'] = 'Credit Card Type is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_name']) || empty($_POST['payment_name']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_name'] = 'Card Name is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_account_number']) || empty($_POST['payment_account_number']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_account_number'] = 'Account Number is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( !ctype_digit($_POST['payment_account_number']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_account_number'] = 'Payment Account Number must be a whole number';\n\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_expiration_month']) || empty($_POST['payment_expiration_month']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_month'] = 'Expiration Month is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_expiration_year']) || empty($_POST['payment_expiration_year']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Expiration Year is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif (!ctype_digit($_POST['payment_expiration_year']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Expiration Year must be a whole number';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! (empty($_POST['payment_expiration_month']) || empty($_POST['payment_expiration_year']) ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Check if the card is expired\n\t\t\t\t\t\t\t\t$current_month = date(\"n\");\n\t\t\t\t\t\t\t\t$current_year4 = date(\"Y\");\n\t\t\t\t\t\t\t\t$cardDate = new \\DateTime();\n\n\t\t\t\t\t\t\t\tif ( strlen($_POST['payment_expiration_year']) != 4 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Credit Card Expiration Year must be a 4 digit year.';\n\t\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif ( !ctype_digit($_POST['payment_expiration_year']) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Credit Card Expiration Year must be a whole number';\n\t\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif ( $current_year4 > $_POST['payment_expiration_year']\n\t\t\t\t\t\t\t\t\t\t\t|| $current_year4 == $_POST['payment_expiration_year'] && $current_month > $_POST['payment_expiration_month'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Credit card has expired.';\n\t\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Validate the card expiration date\n\t\t\t\t\t\t\t\tif (!checkdate( (int)$_POST['payment_expiration_month'], 1, (int)$_POST['payment_expiration_year']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Credit Card Expiration Date is not valid.';\n\t\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif ( $cardDate->setDate($_POST['payment_expiration_year'], $_['payment_expiration_month'], 1) === false )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_expiration_year'] = 'Credit Card Expiration Date is not valid.';\n\t\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_security_code']) || empty($_POST['payment_security_code']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_security_code'] = 'Security Code is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif (!ctype_digit($_POST['payment_security_code']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_security_code'] = 'Credit Card Security Code must be a whole number.';\n\t\t\t\t\t\t\t\t$validValues = false;\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\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'P':\n\t\t\t\t\t\n\t\t\t\t\t\t\tif ( ! isset($_POST['payment_name']) || empty($_POST['payment_name']) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_name'] = 'Paypal Account Email Address is required';\n\t\t\t\t\t\t\t\t$formComplete = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( !filter_var($_POST['payment_name'], FILTER_VALIDATE_EMAIL) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// The email address is not a valid format\n\t\t\t\t\t\t\t\t$paymentFieldErrors['payment_name'] = \"The email address {$_POST['payment_name']} is an incorrect format.\";\n\t\t\t\t\t\t\t\t$validValues = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ($formComplete && $validValues)\n\t\t\t\t\t{\n\t\t\t\t\t\t// The form is complete, so create the record\n\t\t\t\t\t\t$insertSQL = \"INSERT INTO b_payment (user_id, payment_type, credit_card_type, payment_name, account_number, card_expiration_month, card_expiration_year, card_security_code, record_status) \"\n\t\t\t\t\t\t . \"VALUES(?, ?, ?, ?, ?, ?, ?, ?, 'A')\";\n\t\t\t\t\t\tif ( ! $this->dbConnection->prepareCommand($insertSQL, $this->session->userID, $_POST['payment_type'], $_POST['payment_card_type'], $_POST['payment_name'], $_POST['payment_account_number'], $_POST['payment_expiration_month'], $_POST['payment_expiration_year'], $_POST['payment_security_code']) )\n\t\t\t\t\t\t\t$errors[] = 'Error creating record. Please try again.';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The record was successfully created, so set the shipping address ID and move on to the next step\n\t\t\t\t\t\t\t$this->session->paymentMethodID = $this->dbConnection->insert_id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// The form is incomplete, so issue an error\n\t\t\t\t\t\tif (!$formComplete)\n\t\t\t\t\t\t\t$errors[] = 'Payment Type is incomplete';\n\t\t\t\t\t\tif (!$validValues)\n\t\t\t\t\t\t\t$errors[] = 'Some fields have invalid values';\n\t\t\t\t\t\t$this->set('paymentFieldErrors', $paymentFieldErrors);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The user selected an existing payment method\n\t\t\t\t\t// Do validation on the selected payment method\n\t\t\t\t\t$payment = $this->dbConnection->prepareRecord(\"SELECT * FROM b_payment WHERE payment_id = ?\", $_POST['paymentSelect']);\n\t\t\t\t\tif (!$payment)\n\t\t\t\t\t\t$errors[] = 'Error selecting payment method. This payment method does not exist.';\n\t\t\t\t\telseif ( $payment['user_id'] != $this->session->userID )\n\t\t\t\t\t\t$errors[] = 'Error: The selected payment method is for a different user.';\n\t\t\t\t\telseif ( $address['record_status'] != 'A')\n\t\t\t\t\t\t$errors[] = 'Error: The selected payment method is not active.';\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// The address is valid, so use it.\n\t\t\t\t\t\t// set the shipping address and move on to the next step\n\t\t\t\t\t\t$this->session->paymentMethodID = $_POST['paymentSelect'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// If no errors, then move on to next screen\n\t\t\tif (count($errors) == 0)\n\t\t\t{\n\t\t\t\t// There were no errors, process the form and move on to the next screen\n\t\t\t\t$this->__default();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\n\t\t$this->set('errors', $errors);\n\t\t\n\t\t\t\n\t\t// Set the selection fields if there are already values selected\n\t\tif ($this->session->billingAddressID)\n\t\t\t$this->set('addressSelect', $this->session->billingAddressID);\n\t\tif ($this->session->paymentMethodID)\n\t\t\t$this->set('paymentSelect', $this->session->paymentMethodID);\n\n\t\t// Set all of the view data for post data so the form will be reloaded\n\t\tforeach ($_POST as $id => $val)\n\t\t{\n\t\t\t$this->set($id, $val);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Get the list of state codes to output\n\t\t$states = $this->dbConnection->recordSet(\"SELECT short_description AS code, long_description AS name FROM b_value WHERE data_member = 'STATE' ORDER BY short_description\");\n\t\t$this->set('states', $states);\n\t\t\n\t\t\n\t\t\t\n\t}", "function billing_detail($id=0){\n\t\t \n\t\t$user_packages=array();\n\t\t$user_transactions=$this->UserModel->get_user_transactions(array('user_id'=>$this->session->userdata('member_id'),'transaction_id'=>$id),0);\n\t\tif($user_transactions[0]['package_recurring_interval'] == 'credit'){\n\t\t\t$userCredit['credit_id'] = $user_transactions[0]['payment_table_id'];\n\t\t\t$getCreditDetail = $this->UserModel->getCreditPackage($userCredit);\n\t\t\t$user_transactions[0]['credit_count'] = $getCreditDetail[0]['credit_count'];\n\t\t}\n\t\t /*echo \"<pre>\";\n\t\tprint_R($user_transactions);\n\t\tdie; */\n\t\t$previous_page_url=base_url().\"account/index\";\n\t\t$this->load->view('user/billing_detail',array('user_transactions'=>$user_transactions[0]));\n\t}", "public function getItemizedBillEntry()\n {\n //Each value has a fix number of characters to get a nice format\n $itemizedBillEntry = str_pad($this['date'],21)\n .str_pad($this['duration'],12)\n .str_pad($this['destination'],25)\n .str_pad($this['charges'],14)\n .str_pad($this['Rates']['name'],18);\n \n return $itemizedBillEntry;\n }", "public function getBillingmethod()\n {\n return $this->billingmethod;\n }", "public function getBillingAddress() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->billingAddress;\r\n\t}", "public function getCustomerDob();", "function getBillingData($name, $lang) {\n\tglobal $dbconn, $config, $tinymce;\n\tinclude_once \"../tinymce/tinymce.php\";\t\n\t\t$rs = $dbconn->Execute(\"Select p.name, p.used, bs.information from \".BILLING_PAYSYSTEMS_TABLE.\" p INNER JOIN \".BILLING_SYS_.$name.\" bs ON p.name = bs.name and p.name='\".$name.\"'\");\n\t\t$data[\"use\"] = $rs->fields[1];\n\t\t$data[\"value\"] = $rs->fields[2];\n\t\t\n\t\tif ($data[\"use\"]) $checked = \"checked\"; else $checked=\"\";\n\t\t$data[\"table_options\"] =\n\t\t \"$tinymce<tr>\".\n \"<td>\".$lang['pays'][$name.'_information'].\":&nbsp;</td>\".\n \"<td><textarea rows='4' id='content' name='value' style='width:400px; height:200px;'>\".$data['value'].\"</textarea></td>\".\n \"<td><input type='checkbox' class='checkbox' name='use' value=1 \".$checked.\"></td><td>\".$lang['pays']['use'].\"</td></tr>\";\n\t\treturn $data;\n}", "function getCostPersonalBusinessCard(){\n\treturn campo('config_system','id','1','cost_personal_bc');\n}", "function getCostPersonalBusinessCard(){\n\treturn campo('config_system','id','1','cost_personal_bc');\n}", "public function getAddressBilling()\n {\n return $this->addressBilling;\n }", "public static function getBillingAddress($_oID, $_cID) {\n global $lC_Database;\n\n $QorderBilling = $lC_Database->query('select billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state_code, billing_country, billing_address_format from :table_orders where orders_id = :orders_id');\n $QorderBilling->bindTable(':table_orders', TABLE_ORDERS);\n $QorderBilling->bindInt(':orders_id', $_oID);\n $QorderBilling->execute();\n \n $billing_data = array('firstname' => self::getFirstName($_cID),\n 'lastname' => self::getLastName($_cID),\n 'company' => $QorderBilling->value('billing_company'),\n 'street_address' => $QorderBilling->value('billing_street_address'),\n 'suburb' => $QorderBilling->value('billing_suburb'),\n 'city' => $QorderBilling->value('billing_city'),\n 'postcode' => $QorderBilling->value('billing_postcode'),\n 'zone_code' => $QorderBilling->value('billing_state_code'),\n 'country_title' => $QorderBilling->value('billing_country'),\n 'format' => $QorderBilling->value('billing_address_format'));\n\n $QorderBilling->freeResult();\n \n return $billing_data;\n }", "public function getBillingType()\n {\n return $this->billingType;\n }", "public function getBillingType()\n {\n return $this->billingType;\n }", "public function getBillingPhone();", "public function getBillingReference()\n {\n return $this->billingReference;\n }", "public function getBillingReference()\n {\n return $this->billingReference;\n }", "public function getBillingAddress() : Address;", "public function getFormFields()\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : getFormFields --- \");\n\n\t\t$aOBFields = array();\n\t\t$billing = $this->getOrder()->getBillingAddress();\n\t\t$shipping = $this->getOrder()->getShippingAddress();\n\t\t$items = $this->getOrder()->getAllItems();\n\n\t\t// customer info\n\t\t$aOBFields['customer[merchant_customer_id]'] = $this->getOrder()->getCustomerId();\n\t\t$aOBFields['customer[email]'] = $this->getOrder()->getCustomerEmail();\n\t\t$aOBFields['customer[first_name]'] = $billing->getFirstname();\n\t\t$aOBFields['customer[last_name]'] = $billing->getLastname();\n\t\t$aOBFields['customer[phone]'] = $billing->getTelephone();\n\n\t\t// order header\n\t\t$aOBFields['order[merchant_order_id]'] = $this->getOrder()->getRealOrderId();\n\t\t$aOBFields['order[total_subtotal]'] = self::_currencyAmount($this->getOrder()->getSubtotal());\n\t\t$aOBFields['order[total_discount]'] = self::_currencyAmount(abs($this->getOrder()->getDiscountAmount()));\n\t\t$aOBFields['order[total_shipping]'] = self::_currencyAmount($this->getOrder()->getShippingAmount());\n\t\t$aOBFields['order[total_tax]'] = self::_currencyAmount($this->getOrder()->getTaxAmount());\n\t\t$aOBFields['order[total]'] = self::_currencyAmount($this->getOrder()->getBaseGrandTotal());\n\t\t//$aOBFields['order[ship_method]'] = '';\n\n\t\t// billing fields\n\t\t$aOBFields['order[billto_company]'] = $billing->getCompany();\n\t\t$aOBFields['order[billto_first_name]'] = $billing->getFirstname();\n\t\t$aOBFields['order[billto_last_name]'] = $billing->getLastname();\n\t\t$aOBFields['order[billto_address1]'] = $billing->getStreet1();\n\t\t$aOBFields['order[billto_address2]'] = $billing->getStreet2();\n\t\t$aOBFields['order[billto_city]'] = $billing->getCity();\n\t\t$aOBFields['order[billto_state]'] = $billing->getRegionCode();\n\t\t$aOBFields['order[billto_country]'] = $billing->getCountry();\n\t\t$aOBFields['order[billto_zipcode]'] = $billing->getPostcode();\n\n\t\t// shipping fields\n\t\tif(!empty($shipping))\n\t\t{\n\t\t\t$aOBFields['order[shipto_company]'] = $shipping->getCompany();\n\t\t\t$aOBFields['order[shipto_first_name]'] = $shipping->getFirstname();\n\t\t\t$aOBFields['order[shipto_last_name]'] = $shipping->getLastname();\n\t\t\t$aOBFields['order[shipto_address1]'] = $shipping->getStreet1();\n\t\t\t$aOBFields['order[shipto_address2]'] = $shipping->getStreet2();\n\t\t\t$aOBFields['order[shipto_city]'] = $shipping->getCity();\n\t\t\t$aOBFields['order[shipto_state]'] = $shipping->getRegionCode();\n\t\t\t$aOBFields['order[shipto_country]'] = $shipping->getCountry();\n\t\t\t$aOBFields['order[shipto_zipcode]'] = $shipping->getPostcode();\n\t\t}\n\n\t\t// items\n\t\tif (!empty($items))\n\t\t{\n\t\t\tfor($nCount=0; $nCount<count($items); $nCount++)\n\t\t\t{\n\t\t\t\t$aOBFields['order_item['.$nCount.'][sku]'] = $items[$nCount]->getSku();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][name]'] = $items[$nCount]->getName();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][price]'] = self::_currencyAmount($items[$nCount]->getPrice());\n\t\t\t\t$aOBFields['order_item['.$nCount.'][qty]'] = $items[$nCount]->getQtyOrdered();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][description]'] = $items[$nCount]->getDescription();\n\t\t\t\t$aOBFields['order_item['.$nCount.'][tax]'] = self::_currencyAmount($items[$nCount]->getTaxAmount());\n\t\t\t}\n\t\t}\n\n\t\t// return URLs\n\t\t$aOBFields['return_url'] = Mage::getUrl('hostedpayments/standard/success', array('_secure' => true));\n\t\t$aOBFields['cancel_url'] = Mage::getUrl('hostedpayments/standard/cancel', array('_secure' => true));\n\n\t\t// check to see if the aheadWorks SARP module is being used and is enabled. if it is then we need to\n\t\t// add additional fields to the post fields array\n\t\tif($this->_isUsingSARP() === true)\n\t\t{\n\t\t\tMage::log(\"is using SARP \");\n\n\t\t\t$aSubscriptionIDs = array();\n\t\t\t$aSubscriptionIDs = $this->_getSubscriptionByOrderID($this->getOrder()->getId());\n\n\t\t\t/*\n\t\t\tforeach($aSubscriptionIDs as $nID)\n\t\t\t{\n\t\t\t\t$oSubscription = Mage::getSingleton('sarp/subscription')->load($nID);\n\t\t\t}\n\t\t\t*/\n\n\t\t\tif(!empty($aSubscriptionIDs))\n\t\t\t{\n\t\t\t\t$oSubscription = Mage::getSingleton('sarp/subscription')->load($aSubscriptionIDs[0]);\n\t\t\t\t$dStartDate = new Zend_Date($oSubscription->getNextSubscriptionEventDate($oSubscription->getDateStart()), Zend_Date::DATE_LONG);\n\t\t\t\t$nTotalOccurrences = 0;\n\n\t\t\t\tif($oSubscription->isInfinite())\n\t\t\t\t\t$nTotalOccurrences = 9999;\n\t\t\t\telse\n\t\t\t\t\t$nTotalOccurrences = Mage::getModel('sarp/sequence')->getCollection()->addSubscriptionFilter($oSubscription)->count();\n\n\t\t\t\t//Mage::log(\"Subscription ID: \" . $aSubscriptionIDs[0]);\n\t\t\t\t//Mage::log(\"Subscription Inerval: \" . $oSubscription->getPeriod()->getPeriodType().\"s\");\n\t\t\t\t//Mage::log(\"Subscription Occurences: \" . $nTotalOccurrences);\n\n\t\t\t\t$aOBFields['sub[auto_process]'] = 0;\n\t\t\t\t$aOBFields['sub[start_date]'] = $dStartDate;\n\t\t\t\t$aOBFields['sub[interval_length]'] = $oSubscription->getPeriod()->getPeriodValue();\n\t\t\t\t$aOBFields['sub[interval_unit]'] = $oSubscription->getPeriod()->getPeriodType().\"s\";\n\t\t\t\t$aOBFields['sub[total_occurrences]'] = $nTotalOccurrences;\n\n\t\t\t\t$aOBFields['sub[trial_occurrences]'] = '';\n\t\t\t\t$aOBFields['sub[trial_amount]'] = 0.00;\n\n\t\t\t\t// order header\n\t\t\t\t$aOBFields['sub[merchant_subscription_id]'] = $this->getOrder()->getRealOrderId();\n\t\t\t\t//$aOBFields['sub[total_subtotal]'] = self::_currencyAmount($this->getOrder()->getSubtotal());\n\n\t\t\t\t// grand total should be the normal price not the first period price\n\n\t\t\t\t$aOBFields['sub[total_discount]'] = self::_currencyAmount(abs($this->getOrder()->getDiscountAmount()));\n\t\t\t\t$aOBFields['sub[total_tax]'] = self::_currencyAmount($this->getOrder()->getTaxAmount());\n\t\t\t\t$aOBFields['sub[ship_method]'] = '';\n\t\t\t\t$aOBFields['sub[total]'] = self::_currencyAmount($this->getOrder()->getBaseGrandTotal());\n\n\t\t\t\t// billing fields\n\t\t\t\t$aOBFields['sub[billto_company]'] = $billing->getCompany();\n\t\t\t\t$aOBFields['sub[billto_first_name]'] = $billing->getFirstname();\n\t\t\t\t$aOBFields['sub[billto_last_name]'] = $billing->getLastname();\n\t\t\t\t$aOBFields['sub[billto_address1]'] = $billing->getStreet1();\n\t\t\t\t$aOBFields['sub[billto_address2]'] = $billing->getStreet2();\n\t\t\t\t$aOBFields['sub[billto_city]'] = $billing->getCity();\n\t\t\t\t$aOBFields['sub[billto_state]'] = $billing->getRegionCode();\n\t\t\t\t$aOBFields['sub[billto_country]'] = $billing->getCountry();\n\t\t\t\t$aOBFields['sub[billto_zipcode]'] = $billing->getPostcode();\n\n\t\t\t\t// shipping fields\n\t\t\t\tif(!empty($shipping))\n\t\t\t\t{\n\t\t\t\t\t$aOBFields['sub[shipto_company]'] = $shipping->getCompany();\n\t\t\t\t\t$aOBFields['sub[shipto_first_name]'] = $shipping->getFirstname();\n\t\t\t\t\t$aOBFields['sub[shipto_last_name]'] = $shipping->getLastname();\n\t\t\t\t\t$aOBFields['sub[shipto_address1]'] = $shipping->getStreet1();\n\t\t\t\t\t$aOBFields['sub[shipto_address2]'] = $shipping->getStreet2();\n\t\t\t\t\t$aOBFields['sub[shipto_city]'] = $shipping->getCity();\n\t\t\t\t\t$aOBFields['sub[shipto_state]'] = $shipping->getRegionCode();\n\t\t\t\t\t$aOBFields['sub[shipto_country]'] = $shipping->getCountry();\n\t\t\t\t\t$aOBFields['sub[shipto_zipcode]'] = $shipping->getPostcode();\n\t\t\t\t}\n\n\t\t\t\t$items = $this->getOrder()->getAllItems();\n\t\t\t\t$nCount = 0;\n\t\t\t\t$nSubCount = 0;\n\t\t\t\t$aOBFields['sub[total_subtotal]'] = 0;\n\t\t\t\t$aOBFields['sub[total]'] = 0;\n\n\t\t\t\t// items\n\t\t\t\tif (!empty($items))\n\t\t\t\t{\n\t\t\t\t\tfor($nCount=0; $nCount<count($items); $nCount++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$oItem = $items[$nCount];\n\n\t\t\t\t\t\tif(Mage::helper('sarp')->isSubscriptionType($items[$nCount]) == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$productId = $oItem->getProductId();\n\t\t\t\t\t\t\t$oProduct = Mage::getModel('catalog/product')->load($productId);\n\t\t\t\t\t\t\t$nFirstPeriodPrice = self::_currencyAmount($oProduct->getAwSarpFirstPeriodPrice());\n\t\t\t\t\t\t\t$nNormalPrice = self::_currencyAmount((!empty($nFirstPeriodPrice) ? $oProduct->getAwSarpSubscriptionPrice() : $items[$nCount]->getPrice()));\n\n\t\t\t\t\t\t\tMage::log(\"Normal Price:\" . $nNormalPrice);\n\t\t\t\t\t\t\tMage::log(\"First Period Price:\" . $nFirstPeriodPrice);\n\n\t\t\t\t\t\t\tif ($oItem->canInvoice()) $qtys[$oItem->getId()] = $oItem->getQtyToInvoice();\n\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][sku]'] = $items[$nCount]->getSku();\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][name]'] = $items[$nCount]->getName();\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][price]'] = $nNormalPrice;\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][qty]'] = $items[$nCount]->getQtyOrdered();\n\t\t\t\t\t\t\t$aOBFields['sub_item[' . $nSubCount . '][description]'] = $items[$nCount]->getDescription();\n\t\t\t\t\t\t\t//$aOBFields['sub_item[' . $nSubCount . '][details]'] = '';\n\n\t\t\t\t\t\t\tif ($oItem->getIsVirtual())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$aOBFields['sub[total_shipping]'] = 0.00;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$aOBFields['sub[total_shipping]'] = self::_currencyAmount($this->getOrder()->getShippingAmount());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$aOBFields['sub[trial_amount]'] = $nFirstPeriodPrice;\n\t\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t\t$aOBFields['sub[total_subtotal]'] += $aOBFields['sub_item[' . $nSubCount . '][price]'];\n\t\t\t\t\t\t\t$aOBFields['sub[total]'] += $aOBFields['sub_item[' . $nSubCount . '][price]'];\n\n\t\t\t\t\t\t\t$nSubCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tMage::log(\"Not a subscription item: \" . $items[$nCount]->getName());\n\t\t\t\t\t}\n\t\t\t\t\tMage::log(\"Sub. Sub Total: \" . $aOBFields['sub[total_subtotal]']);\n\t\t\t\t\tMage::log(\"Sub. Total: \" . $aOBFields['sub[total]']);\n\t\t\t\t}\n\n\t\t\t\t$aOBFields['sub[total]'] = $aOBFields['sub[total]'] + $aOBFields['sub[total_shipping]'];\n\t\t\t}\n\t\t}\n\n\t\t// generate the MAC and add it as the final param\n\t\t$aOBFields['mac'] = $this->getFormFieldsMAC($aOBFields);\n\n\t\tMage::log(print_r($aOBFields, true));\n\n\t\treturn $aOBFields;\n\t}", "public function getBillingFieldsConfig()\n {\n if (!isset($this->arrCache['billingFieldsConfig'])) {\n\n $this->arrCache['billingFieldsConfig'] = array();\n $arrFields = deserialize($this->address_fields);\n\n if (is_array($arrFields)) {\n foreach ($arrFields as $arrField) {\n\n $this->arrCache['billingFieldsConfig'][] = array(\n 'value' => $arrField['name'],\n 'enabled' => ($arrField['billing'] != 'disabled'),\n 'mandatory' => ($arrField['billing'] == 'mandatory'),\n );\n }\n }\n }\n\n return $this->arrCache['billingFieldsConfig'];\n }", "function getCostCompanyBusinessCard(){\n\treturn campo('config_system','id','1','cost_company_bc');\n}", "function getCostCompanyBusinessCard(){\n\treturn campo('config_system','id','1','cost_company_bc');\n}", "public function getData()\n {\n $this->validate('contact', 'quotation_data', 'gst_registered', 'gst_inclusive');\n\n $this->issetParam('Date', 'date');\n $this->issetParam('Number', 'quotation_number');\n $this->issetParam('Subtotal', 'subtotal');\n $this->issetParam('TotalAmount', 'total');\n $this->issetParam('TotalTax', 'total_tax');\n\n if ($this->getStatus()) {\n $this->data['Status'] = $this->parseStatus($this->getStatus());\n }\n\n if ($this->getExpiryDate()) {\n if ($this->getDate()) {\n $currentDateMonth = $this->getDate()->month;\n $dueDateMonth = $this->getExpiryDate()->month;\n if ($dueDateMonth > $currentDateMonth) {\n $this->data['Terms']['PaymentIsDue'] = 'DayOfMonthAfterEOM';\n } else {\n $this->data['Terms']['PaymentIsDue'] = 'OnADayOfTheMonth';\n }\n }\n\n $this->data['Terms']['DueDate'] = $this->getExpiryDate();\n $this->data['Terms']['BalanceDueDate'] = $this->getExpiryDate()->day;\n }\n\n if ($this->getQuotationData() !== null && $this->getGSTRegistered() !== null) {\n $gst = $this->getGSTRegistered();\n $this->data = $this->parseLines($this->getQuotationData(),$gst, $this->data);\n }\n if ($this->getContact() !== null) {\n $this->data['Customer'] = [];\n $this->data['Customer']['UID'] = $this->getContact();\n }\n\n if ($this->getGSTInclusive()) {\n if ($this->getGSTInclusive() === 'INCLUSIVE') {\n $this->data['IsTaxInclusive'] = true;\n } else if ($this->getGSTInclusive() === 'EXCLUSIVE') {\n $this->data['IsTaxInclusive'] = false;\n } else {\n $this->data['IsTaxInclusive'] = true;\n }\n }\n\n return $this->data;\n }", "private function getPurchasePageData(){\n\t\t$this->template->imgurl = $this->getParam('imgurl');\n\t\tif ($this->isError()) {\n\t\t\treturn;\n\t\t}\n\t\t$this->getItem();\n\t\tif ($this->isError()) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t// TODO Add 'name' to productdata\n\t\t$itemView = $this->template->item;\n\t\t$name = substr($itemView->description, 0, 35);\n\t\t$itemView->name = $name . '...';\n\n\t\t// Build shippng costs (including insurance)\n\t\t$shippingbase = shop_shipping_fee;\n\t\t$optionShipping = array();\n\t\t$options = $itemView->options;\n\t\tfor ($i = 0; $i < sizeof($options); $i++) {\n\t\t\t$option = $options[$i];\n\t\t\tif ($option->price < 100) {\n\t\t\t\t$ship = $shippingbase + 4;\n\t\t\t} else {\n\t\t\t\t$ship = $shippingbase + 8;\n\t\t\t}\n\t\t\t$optionShipping[$option->seq] = $ship;\n\t\t}\n\t\t$this->template->optionShipping = $optionShipping;\n\t\t\n\t\tLogger::info('Purchase page view ['.$this->template->item->id.']['.$this->template->item->code.']');\n\t}", "function storms_wc_checkout_fields_order_billing_fields() {\n\t\t$fields = [\n\t\t\t'first_name' \t\t=> 10,\n\t\t\t'last_name' \t\t=> 20,\n\t\t\t'email' \t\t\t=> 30,\n\n\t\t\t'phone' \t\t\t=> 40,\n\t\t\t'cellphone' \t\t=> 50,\t// ecfb plugin\n\t\t\t'birthdate' \t\t=> 60,\t// ecfb plugin\n\t\t\t'sex' \t\t\t\t=> 70,\t// ecfb plugin\n\n\t\t\t'persontype' \t\t=> 80,\t// ecfb plugin\n\n\t\t\t'cpf' \t\t\t\t=> 90,\t// ecfb plugin\n\t\t\t'rg'\t\t\t\t=> 100,\t// ecfb plugin\n\n\t\t\t'company' \t\t\t=> 110,\n\t\t\t'cnpj' \t\t\t\t=> 120,\t// ecfb plugin\n\t\t\t'ie' \t\t\t\t=> 130,\t// ecfb plugin\n\n\t\t\t'country' \t\t\t=> 160,\n\t\t\t'postcode' \t\t\t=> 170,\n\t\t\t'address_1' \t\t=> 180,\n\t\t\t'number' \t\t\t=> 190,\t// ecfb plugin\n\t\t\t'address_2' \t\t=> 200,\n\t\t\t'neighborhood' \t\t=> 210,\t// ecfb plugin\n\t\t\t'city' \t\t\t\t=> 220,\n\t\t\t'state' \t\t\t=> 230,\n\t\t];\n\n\t\treturn $fields;\n\t}", "public function billing_card_info_details() {\n\n $option = [\n 'projection' => [\n '_id' => 1,\n 'cardnumber' => 1,\n 'cvv' => 1,\n 'expiry_month' => 1,\n 'expiry_year' => 1,\n 'firstname' => 1,\n 'lastname' => 1,\n 'email'=>1,\n 'customer_id'=>1,\n 'address' => 1,\n 'city' => 1,\n 'state' => 1,\n 'country' => 1,\n 'postal_code' => 1,\n 'subscription_id'=>1,\n 'customer_id'=>1\n ]\n ];\n $result = $this->mongo_db->find(MDB_BILLING_REG_INFO, array('_id' => 1), $option);\n return (!empty($result)) ? $result : '';\n }", "public function getData()\n {\n $this->validate('transactionReference', 'amount');\n\n $data = $this->getBaseData();\n $data['METHOD'] = 'DoCapture';\n $data['AMT'] = $this->amount;\n $data['CURRENCYCODE'] = $this->currency;\n $data['AUTHORIZATIONID'] = $this->transactionReference;\n $data['COMPLETETYPE'] = 'Complete';\n\n return $data;\n }", "public function getPurchaseDetails()\n {\n if (request()->ajax()) {\n $start = request()->start;\n $end = request()->end;\n $business_id = request()->session()->get('user.business_id');\n\n $purchase_details = $this->transactionUtil->getPurchaseTotals($business_id, $start, $end);\n\n return $purchase_details;\n }\n }", "public function getFormFields() {\r\r\n\r\r\n $billing = $this->getOrder()->getBillingAddress();\r\r\n $shipping = $this->getOrder()->getShippingAddress();\r\r\n $addr_entity_id = $shipping->getCustomerAddressId();\r\r\n $shippingaddress = Mage::getModel('sales/order_address');\r\r\n $shippingaddress->load($addr_entity_id);\r\r\n $shipaddgetdat = $shippingaddress->getData();\r\r\n\r\r\n\r\r\n\r\r\n $biladdr_entity_id = $billing->getCustomerAddressId();\r\r\n ;\r\r\n $billingaddress = Mage::getModel('sales/order_address');\r\r\n $billingaddress->load($biladdr_entity_id);\r\r\n $billaddgetdat = $billingaddress->getData();\r\r\n\r\r\n $coFields = array();\r\r\n $items = $this->getQuote()->getAllItems();\r\r\n\r\r\n if ($items) {\r\r\n $i = 1;\r\r\n foreach ($items as $item) {\r\r\n if ($item->getParentItem()) {\r\r\n continue;\r\r\n }\r\r\n $coFields['c_prod_' . $i] = $this->cleanString($item->getSku());\r\r\n $coFields['c_name_' . $i] = $this->cleanString($item->getName());\r\r\n $coFields['c_description_' . $i] = $this->cleanString($item->getDescription());\r\r\n $coFields['c_price_' . $i] = number_format($item->getPrice(), 2, '.', '');\r\r\n $i++;\r\r\n }\r\r\n }\r\r\n\r\r\n $request = '';\r\r\n foreach ($coFields as $k => $v) {\r\r\n $request .= '<' . $k . '>' . $v . '</' . $k . '>';\r\r\n }\r\r\n\r\r\n\r\r\n $key = Mage::getStoreConfig('payment/payucheckout_shared/key');\r\r\n $salt = Mage::getStoreConfig('payment/payucheckout_shared/salt');\r\r\n $debug_mode = Mage::getStoreConfig('payment/payucheckout_shared/debug_mode');\r\r\n\r\r\n $orderid = $this->getOrder()->getRealOrderId();\r\r\n $orderInfo = $this->getOrder();\r\r\n $order = Mage::getModel('sales/order')->loadByIncrementId($orderid);\r\r\n// get order total value\r\r\n $orderValue = number_format($order->getGrandTotal(), 2, '.', $thousands_sep = '');\r\r\n// get order item collection\r\r\n $orderItems = $order->getItemsCollection();\r\r\n $productInfo = array();\r\r\n $productInfo2 = array();\r\r\n \r\r\n \r\r\n foreach ($orderItems as $item) {\r\r\n \r\r\n $item->getName();\r\r\n $product_id = $item->product_id;\r\r\n $product_sku = $item->sku;\r\r\n $product_name = $item->getName();\r\r\n $_product = Mage::getModel('catalog/product')->load($product_id);\r\r\n $cats = $_product->getCategoryIds();\r\r\n $category_id = $cats[0]; // just grab the first id\r\r\n $category = Mage::getModel('catalog/category')->load($category_id);\r\r\n $category_name = $category->getName();\r\r\n\r\r\n $productInfo['name'] = $this->cleanString($item->getName());\r\r\n $productInfo['description'] = $this->cleanString(substr($_product->getDescription(),0,100));\r\r\n $productInfo['value'] = $orderValue;\r\r\n $productInfo['isRequired'] = true;\r\r\n $productInfo['settlementEvent'] = \"EmailConfirmation\";\r\r\n $productInfo2[] = $productInfo;\r\r\n }\r\r\n $productIndoFilterData['paymentParts'] = $productInfo2;\r\r\n $jsonProductInfo = json_encode($productIndoFilterData);\r\r\n\r\r\n $txnid = $orderid;\r\r\n\r\r\n $coFields['key'] = $key;\r\r\n $coFields['txnid'] = $txnid;\r\r\n $coFields['udf2'] = $txnid;\r\r\n $coFields['amount'] = number_format($this->getOrder()->getBaseGrandTotal(), 0, '', '');\r\r\n $coFields['productinfo'] = $jsonProductInfo;\r\r\n $coFields['address'] = $billaddgetdat['street'];\r\r\n $coFields['firstname'] = $billing->getFirstname();\r\r\n $coFields['Lastname'] = $billing->getLastname();\r\r\n $coFields['City'] = $billing->getCity();\r\r\n $coFields['State'] = $billing->getRegion();\r\r\n $coFields['Country'] = $billing->getCountry();\r\r\n $coFields['Zipcode'] = $billing->getPostcode();\r\r\n $coFields['email'] = $this->getOrder()->getCustomerEmail();\r\r\n $coFields['phone'] = $billing->getTelephone();\r\r\n\r\r\n $coFields['ship_name'] = $shipping->getFirstname() . \" \" . $shipping->getLastname();\r\r\n $coFields['ship_address'] = $shipaddgetdat['street'];\r\r\n $coFields['ship_zipcode'] = $shipping->getPostcode();\r\r\n $coFields['ship_city'] = $shipping->getCity();\r\r\n $coFields['ship_state'] = $shipping->getRegion();\r\r\n $coFields['ship_country'] = $shipping->getCountry();\r\r\n $coFields['ship_phone'] = $shipping->getTelephone();\r\r\n $coFields['website'] = Mage::getBaseUrl();\r\r\n $coFields['surl'] = Mage::getBaseUrl() . 'payucheckout/shared/success/';\r\r\n $coFields['furl'] = Mage::getBaseUrl() . 'payucheckout/shared/failure/';\r\r\n $coFields['curl'] = Mage::getBaseUrl() . 'payucheckout/shared/canceled/id/' . $this->getOrder()->getRealOrderId();\r\r\n $coFields['Pg'] = $billing->getpg();\r\r\n $coFields['bankcode'] = $billing->getbankcode();\r\r\n $coFields['ccnum'] = $billing->getccnum();\r\r\n $coFields['ccvv'] = $billing->getccvv();\r\r\n $coFields['ccexpmon'] = $billing->getccexpmon();\r\r\n $coFields['ccexpyr'] = $billing->getccexpyr();\r\r\n $coFields['ccname'] = $billing->getccname();\r\r\n $coFields['service_provider'] = 'payu_paisa';\r\r\n\r\r\n $debugId = '';\r\r\n \r\r\n\r\r\n if ($debug_mode == 1) {\r\r\n\r\r\n $requestInfo = $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '|' . $debugId . '||||||||||' . $salt;\r\r\n $debug = Mage::getModel('payucheckout/api_debug')\r\r\n ->setRequestBody($requestInfo)\r\r\n ->save();\r\r\n\r\r\n $debugId = $debug->getId();\r\r\n\r\r\n $coFields['udf1'] = $debugId;\r\r\n $coFields['Hash'] = hash('sha512', $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '|' . $debugId . '|' . $coFields['udf2'] . '|||||||||' . $salt);\r\r\n } else {\r\r\n $coFields['Hash'] = strtolower(hash('sha512', $key . '|' . $coFields['txnid'] . '|' . $coFields['amount'] . '|' .\r\r\n $jsonProductInfo . '|' . $coFields['firstname'] . '|' . $coFields['email'] . '||' . $coFields['udf2'] . '|||||||||' . $salt));\r\r\n }\r\r\n return $coFields;\r\r\n }", "public function dataForInvoice() {\n\t\t\t\n\t\t\t$data = [\n\t\t\t 'booking_reference' => $this->reference,\n\t\t\t 'booking_date' => Utility::dateTimeLocale($this->updated_at, false),\n\t\t\t 'user_booking_fullname' => $this->user_booking_fullname,\n\t\t\t 'user_booking_address' => $this->user_booking_address,\n\t\t\t 'user_booking_locality' => $this->user_booking_full_locality,\n\t\t\t 'user_booking_email' => $this->user_booking_email,\n\t\t\t 'user_booking_tax_code' => $this->user->customer->taxCode,\n\t\t\t 'apartment_owner_fullname' => $this->apartment_owner_fullname,\n\t\t\t 'apartment_owner_tax_code' => $this->apartmentOwner->customer->taxCode,\n\t\t\t 'apartment_owner_address' => $this->apartment_owner_address,\n\t\t\t 'apartment_owner_locality' => $this->apartment_owner_full_locality,\n\t\t\t 'apartment_owner_email' => $this->apartment_owner_email,\n\t\t\t 'apartment_title' => $this->apartment_title,\n\t\t\t 'apartment_price_per_night' => $this->apartment_price_per_night,\n\t\t\t 'check_in' => Utility::dateTimeLocale($this->check_in, false),\n\t\t\t 'check_out' => Utility::dateTimeLocale($this->check_out, false),\n\t\t\t 'nights_count' => Utility::diffInDays($this->check_in, $this->check_out),\n\t\t\t 'total_amount' => $this->bookingAmount(),\n\t\t\t 'has_upgrades' => $this->bookedServices()->exists(),\n\t\t\t];\n\t\t\tif ($data['has_upgrades']) {\n\t\t\t\t$data['upgrades'] = [];\n\t\t\t\tforeach ($this->bookedServices()->get() as $bookedService) {\n\t\t\t\t\t$data['upgrades'][] =\n\t\t\t\t\t [\n\t\t\t\t\t\t'name' => $bookedService->name,\n\t\t\t\t\t\t'price_per_night' => $bookedService->price_per_night,\n\t\t\t\t\t ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "public function getBillingFields()\n {\n if (!isset($this->arrCache['billingFields'])) {\n\n $this->arrCache['billingFields'] = array_filter(array_map(\n function($field) {\n return $field['enabled'] ? $field['value'] : null;\n },\n $this->getBillingFieldsConfig()\n ));\n\n }\n\n return $this->arrCache['billingFields'];\n }", "public function get_data() {\n\n\t\t$data = array();\n\t\t$i = 0;\n\t\t// Payment query.\n\t\t$payments = give_get_payments( $this->get_donation_argument() );\n\n\t\tif ( $payments ) {\n\n\t\t\tforeach ( $payments as $payment ) {\n\n\t\t\t\t$columns = $this->csv_cols();\n\t\t\t\t$payment = new Give_Payment( $payment->ID );\n\t\t\t\t$payment_meta = $payment->payment_meta;\n\t\t\t\t$address = $payment->address;\n\n\t\t\t\t// Set columns.\n\t\t\t\tif ( ! empty( $columns['donation_id'] ) ) {\n\t\t\t\t\t$data[ $i ]['donation_id'] = $payment->ID;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['seq_id'] ) ) {\n\t\t\t\t\t$data[ $i ]['seq_id'] = Give()->seq_donation_number->get_serial_code( $payment->ID );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['title_prefix'] ) ) {\n\t\t\t\t\t$data[ $i ]['title_prefix'] = ! empty( $payment->title_prefix ) ? $payment->title_prefix : '';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['first_name'] ) ) {\n\t\t\t\t\t$data[ $i ]['first_name'] = isset( $payment->first_name ) ? $payment->first_name : '';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['last_name'] ) ) {\n\t\t\t\t\t$data[ $i ]['last_name'] = isset( $payment->last_name ) ? $payment->last_name : '';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['email'] ) ) {\n\t\t\t\t\t$data[ $i ]['email'] = $payment->email;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['company'] ) ) {\n\t\t\t\t\t$data[ $i ]['company'] = empty( $payment_meta['_give_donation_company'] ) ? '' : str_replace( \"\\'\", \"'\", $payment_meta['_give_donation_company'] );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['address_line1'] ) ) {\n\t\t\t\t\t$data[ $i ]['address_line1'] = isset( $address['line1'] ) ? $address['line1'] : '';\n\t\t\t\t\t$data[ $i ]['address_line2'] = isset( $address['line2'] ) ? $address['line2'] : '';\n\t\t\t\t\t$data[ $i ]['address_city'] = isset( $address['city'] ) ? $address['city'] : '';\n\t\t\t\t\t$data[ $i ]['address_state'] = isset( $address['state'] ) ? $address['state'] : '';\n\t\t\t\t\t$data[ $i ]['address_zip'] = isset( $address['zip'] ) ? $address['zip'] : '';\n\t\t\t\t\t$data[ $i ]['address_country'] = isset( $address['country'] ) ? $address['country'] : '';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['comment'] ) ) {\n\t\t\t\t\t$comment = give_get_donor_donation_comment( $payment->ID, $payment->donor_id );\n\t\t\t\t\t$data[ $i ]['comment'] = ! empty( $comment ) ? $comment->comment_content : '';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donation_total'] ) ) {\n\t\t\t\t\t$data[ $i ]['donation_total'] = give_format_amount( give_donation_amount( $payment->ID ) );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['currency_code'] ) ) {\n\t\t\t\t\t$data[ $i ]['currency_code'] = empty( $payment_meta['_give_payment_currency'] ) ? give_get_currency() : $payment_meta['_give_payment_currency'];\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['currency_symbol'] ) ) {\n\t\t\t\t\t$currency_code = $data[ $i ]['currency_code'];\n\t\t\t\t\t$data[ $i ]['currency_symbol'] = give_currency_symbol( $currency_code, true );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donation_status'] ) ) {\n\t\t\t\t\t$data[ $i ]['donation_status'] = give_get_payment_status( $payment, true );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['payment_gateway'] ) ) {\n\t\t\t\t\t$data[ $i ]['payment_gateway'] = $payment->gateway;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['payment_mode'] ) ) {\n\t\t\t\t\t$data[ $i ]['payment_mode'] = $payment->mode;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['form_id'] ) ) {\n\t\t\t\t\t$data[ $i ]['form_id'] = $payment->form_id;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['form_title'] ) ) {\n\t\t\t\t\t$data[ $i ]['form_title'] = get_the_title( $payment->form_id );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['form_level_id'] ) ) {\n\t\t\t\t\t$data[ $i ]['form_level_id'] = $payment->price_id;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['form_level_title'] ) ) {\n\t\t\t\t\t$var_prices = give_has_variable_prices( $payment->form_id );\n\t\t\t\t\tif ( empty( $var_prices ) ) {\n\t\t\t\t\t\t$data[ $i ]['form_level_title'] = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( 'custom' === $payment->price_id ) {\n\t\t\t\t\t\t\t$custom_amount_text = give_get_meta( $payment->form_id, '_give_custom_amount_text', true );\n\n\t\t\t\t\t\t\tif ( empty( $custom_amount_text ) ) {\n\t\t\t\t\t\t\t\t$custom_amount_text = esc_html__( 'Custom', 'give' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$data[ $i ]['form_level_title'] = $custom_amount_text;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data[ $i ]['form_level_title'] = give_get_price_option_name( $payment->form_id, $payment->price_id );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donation_date'] ) ) {\n\t\t\t\t\t$payment_date = strtotime( $payment->date );\n\t\t\t\t\t$data[ $i ]['donation_date'] = date( give_date_format(), $payment_date );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donation_time'] ) ) {\n\t\t\t\t\t$payment_date = strtotime( $payment->date );\n\t\t\t\t\t$data[ $i ]['donation_time'] = date_i18n( 'H', $payment_date ) . ':' . date( 'i', $payment_date );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['userid'] ) ) {\n\t\t\t\t\t$data[ $i ]['userid'] = $payment->user_id;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donorid'] ) ) {\n\t\t\t\t\t$data[ $i ]['donorid'] = $payment->customer_id;\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donor_ip'] ) ) {\n\t\t\t\t\t$data[ $i ]['donor_ip'] = give_get_payment_user_ip( $payment->ID );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donation_note_private'] ) ) {\n\t\t\t\t\t$comments = Give()->comment->db->get_comments( array(\n\t\t\t\t\t\t'comment_parent' => $payment->ID,\n\t\t\t\t\t\t'comment_type' => 'donation',\n\t\t\t\t\t\t'meta_query' => array(\n\t\t\t\t\t\t\t'relation' => 'OR',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => 'note_type',\n\t\t\t\t\t\t\t\t'compare' => 'NOT EXISTS',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => 'note_type',\n\t\t\t\t\t\t\t\t'value' => 'donor',\n\t\t\t\t\t\t\t\t'compare' => '!=',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t) );\n\n\t\t\t\t\t$comment_html = array();\n\n\t\t\t\t\tif ( ! empty( $comments ) ) {\n\t\t\t\t\t\tforeach ( $comments as $comment ) {\n\t\t\t\t\t\t\t$comment_html[] = sprintf(\n\t\t\t\t\t\t\t\t'%s - %s',\n\t\t\t\t\t\t\t\tdate( 'Y-m-d', strtotime( $comment->comment_date ) ),\n\t\t\t\t\t\t\t\t$comment->comment_content\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$data[ $i ]['donation_note_private'] = implode( \"\\n\", $comment_html );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['donation_note_to_donor'] ) ) {\n\t\t\t\t\t$comments = Give()->comment->db->get_comments( array(\n\t\t\t\t\t\t'comment_parent' => $payment->ID,\n\t\t\t\t\t\t'comment_type' => 'donation',\n\t\t\t\t\t\t'meta_query' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => 'note_type',\n\t\t\t\t\t\t\t\t'value' => 'donor',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t) );\n\n\t\t\t\t\t$comment_html = array();\n\n\t\t\t\t\tif ( ! empty( $comments ) ) {\n\t\t\t\t\t\tforeach ( $comments as $comment ) {\n\t\t\t\t\t\t\t$comment_html[] = sprintf(\n\t\t\t\t\t\t\t\t'%s - %s',\n\t\t\t\t\t\t\t\tdate( 'Y-m-d', strtotime( $comment->comment_date ) ),\n\t\t\t\t\t\t\t\t$comment->comment_content\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$data[ $i ]['donation_note_to_donor'] = implode( \"\\n\", $comment_html );\n\t\t\t\t}\n\n\t\t\t\t// Add custom field data.\n\t\t\t\t// First we remove the standard included keys from above.\n\t\t\t\t$remove_keys = array(\n\t\t\t\t\t'donation_id',\n\t\t\t\t\t'seq_id',\n\t\t\t\t\t'first_name',\n\t\t\t\t\t'last_name',\n\t\t\t\t\t'email',\n\t\t\t\t\t'address_line1',\n\t\t\t\t\t'address_line2',\n\t\t\t\t\t'address_city',\n\t\t\t\t\t'address_state',\n\t\t\t\t\t'address_zip',\n\t\t\t\t\t'address_country',\n\t\t\t\t\t'donation_total',\n\t\t\t\t\t'payment_gateway',\n\t\t\t\t\t'payment_mode',\n\t\t\t\t\t'form_id',\n\t\t\t\t\t'form_title',\n\t\t\t\t\t'form_level_id',\n\t\t\t\t\t'form_level_title',\n\t\t\t\t\t'donation_date',\n\t\t\t\t\t'donation_time',\n\t\t\t\t\t'userid',\n\t\t\t\t\t'donorid',\n\t\t\t\t\t'donor_ip',\n\t\t\t\t);\n\n\t\t\t\t// Removing above keys...\n\t\t\t\tforeach ( $remove_keys as $key ) {\n\t\t\t\t\tunset( $columns[ $key ] );\n\t\t\t\t}\n\n\t\t\t\t// Now loop through remaining meta fields.\n\t\t\t\tforeach ( $columns as $col ) {\n\t\t\t\t\t$field_data = get_post_meta( $payment->ID, $col, true );\n\t\t\t\t\t$data[ $i ][ $col ] = $field_data;\n\t\t\t\t\tunset( $columns[ $col ] );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Filter to modify Donation CSV data when exporting donation\n\t\t\t\t *\n\t\t\t\t * @since 2.1\n\t\t\t\t *\n\t\t\t\t * @param array Donation data\n\t\t\t\t * @param Give_Payment $payment Instance of Give_Payment\n\t\t\t\t * @param array $columns Donation data $columns that are not being merge\n\t\t\t\t * @param Give_Export_Donations_CSV $this Instance of Give_Export_Donations_CSV\n\t\t\t\t *\n\t\t\t\t * @return array Donation data\n\t\t\t\t */\n\t\t\t\t$data[ $i ] = apply_filters( 'give_export_donation_data', $data[ $i ], $payment, $columns, $this );\n\n\t\t\t\t$new_data = array();\n\t\t\t\t$old_data = $data[ $i ];\n\n\t\t\t\t// sorting the columns bas on row\n\t\t\t\tforeach ( $this->csv_cols() as $key => $value ) {\n\t\t\t\t\tif ( array_key_exists( $key, $old_data ) ) {\n\t\t\t\t\t\t$new_data[ $key ] = $old_data[ $key ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$data[ $i ] = $new_data;\n\n\t\t\t\t// Increment iterator.\n\t\t\t\t$i ++;\n\n\t\t\t}\n\n\t\t\t$data = apply_filters( 'give_export_get_data', $data );\n\t\t\t$data = apply_filters( \"give_export_get_data_{$this->export_type}\", $data );\n\n\t\t\treturn $data;\n\n\t\t}\n\n\t\treturn array();\n\n\t}", "public function getBillings($filter = null) {\n $billingTable = new Yourdelivery_Model_DbTable_Billing();\n $all = $billingTable->fetchAll('mode=\"company\" AND refId=\"' . $this->getId() . '\"');\n $storage = new splObjectStorage();\n foreach ($all AS $bill) {\n try {\n $bill = new Yourdelivery_Model_Billing($bill->id);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $storage->attach($bill);\n }\n return $storage;\n }", "public function billing_address() {\n if(is_null($this->billing_address)){\n $this->billing_address = new Address($this->billing_address_id);\n }\n return $this->billing_address;\n }", "public function display_billing()\n\t{\n\t\t$this->call_member('display_billing_'.g::$pages[$this->page_index + 2], 'display_billing_hist');\n\t}", "private function generateDefaultBillingWithReservation() {\n return new Billing();\n }", "public function setBilling($billing);", "public function pay_bill_get(){\r\n if (!$this->pronet_model->pay_bill(1, '882332411098', '4999999999999999', '4521','12','2022')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function getData()\n {\n $data = $this->only(['allocation_id','name','email','mobile','address','education','remark']);\n return $data;\n }", "public function getApiProps()\n {\n $this->normalizeData();\n\n $data = [\n 'ShopItemId' => $this->ShopItemId,\n 'ClientReferenceCode' => ''.$this->ClientReferenceCode,\n \"Address\" => [\n \"CompanyName\" => $this->escapeTextData($this->CompanyName),\n 'Name' => $this->escapeTextData($this->Name),\n 'Streetname1' => $this->escapeTextData($this->Streetname1),\n 'Streetname2' => $this->escapeTextData($this->Streetname2),\n 'HouseNumber' => $this->HouseNumber,\n 'NumberExtension' => $this->NumberExtension,\n 'PostalCode' => $this->PostalCode,\n 'City' => $this->escapeTextData($this->City),\n 'State' => $this->State && strlen($this->State) > 1 ? $this->escapeTextData($this->State) : '',\n 'Country' => $this->Country,\n 'Phone' => $this->Phone && strlen($this->Phone) > 2 ? $this->Phone : '',\n 'Email' => trim($this->Email),\n 'BTW' => trim($this->BTW),\n 'Neighborhood' =>$this->Neighborhood ? $this->escapeTextData(trim($this->Neighborhood)) : ''\n ],\n \"Customs\" => [\n 'CustomsType' => $this->CustomsType,\n 'Description' => trim($this->Description) ? $this->escapeTextData($this->Description) : 'could not find a description for this order, please input manually and send a printscreen of the original order to support',\n 'HSCode' => $this->HSCode,\n 'Type' => 4,\n 'Value' => $this->Value ? number_format($this->Value, 2, '.', '') : '' , // API assumes a max of 2 decimal places\n ],\n\n ];\n\n if ($this->ShippingMethodId) {\n $data['ShippingMethodId'] = $this->ShippingMethodId;\n }\n\n if ($this->ShippingMethodName) {\n $data['ShippingMethodName'] = $this->ShippingMethodName; \n }\n\n if ($this->Transporter) {\n $data['Carrier'] = [\n \"Id\"=> $this->Transporter,\n ];\n }\n\n if ($this->Weight != '') {\n $data['Weight'] = $this->Weight; //in grams\n }\n\n if ($this->Length || $this->Width || $this->Height) {\n $data['Dimensions'] = [\n 'Width' => $this->Width,\n 'Length' => $this->Length,\n 'Height' => $this->Height,\n ];\n }\n\n if ($this->PointId) {\n $data[\"PickupPoint\"] = [\n \"PointId\" => $this->PointId,\n ];\n\n if ($this->ExtendedInfo) {\n $data[\"PickupPoint\"][\"ExtendedInfo\"] = $this->ExtendedInfo;\n }\n }\n\n if ($this->OptionList) {\n $data['OptionList'] = $this->OptionList;\n }\n\n if (!empty($this->ShipmentItems)) {\n $data['ShipmentItems'] = $this->ShipmentItems;\n }\n\n return (object) $data;\n }", "function get_cost() {\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"Calulating bill for cr $this->id\", \"\", \"\", 0, 0, 0);\n\t\t$cr_appliance_id = $this->appliance_id;\n\t\t$app_id_arr = explode(\",\", $cr_appliance_id);\n\t\t$cr_costs_final = 0;\n\t\tforeach ($app_id_arr as $app_id) {\n\t\t\t$cloud_app = new cloudappliance();\n\t\t\t$cloud_app->get_instance_by_appliance_id($app_id);\n\t\t\t// check state, only bill if active\n\t\t\tif ($cloud_app->state == 1) {\n\t\t\t\t// basic cost\n\t\t\t\t$cr_costs = 0;\n\t\t\t\t// + per cpu\n\t\t\t\t$cr_costs = $cr_costs + $this->cpu_req;\n\t\t\t\t// + per nic\n\t\t\t\t$cr_costs = $cr_costs + $this->network_req;\n\t\t\t\t// ha cost double\n\t\t\t\tif (!strcmp($this->ha_req, '1')) {\n\t\t\t\t\t$cr_costs = $cr_costs * 2;\n\t\t\t\t}\n\t\t\t\t// TODO : disk costs\n\t\t\t\t// TODO : network-traffic costs\n\n\t\t\t\t// sum\n\t\t\t\t$cr_costs_final = $cr_costs_final + $cr_costs;\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Billing active appliance $app_id (cr $this->id) = $cr_costs CC-units\", \"\", \"\", 0, 0, 0);\n\t\t\t} else {\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Not billing paused appliance $app_id (cr $this->id)\", \"\", \"\", 0, 0, 0);\n\t\t\t}\n\t\t}\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Final bill for cr $this->id = $cr_costs_final CC-units\", \"\", \"\", 0, 0, 0);\n\t\treturn $cr_costs_final;\n\t}", "protected function _getApi()\n {\n if (!is_null($this->_api)) {\n return $this->_api;\n }\n $helper = Mage::helper('dpg');\n // Change to using the DataCash Direct Api\n $this->_api = Mage::getSingleton($this->_apiType);\n $config = $this->_getDpgConfig();\n $this->_api->setMerchantId($config->getApiMerchantId($this->getCode()));\n $this->_api->setMerchantPassword($config->getApiPassword($this->getCode()));\n // Set the sandboxed state\n $this->_api->setIsSandboxed($config->isMethodSandboxed($this->getCode()));\n \n $request = Mage::app()->getRequest();\n $this->_api->setBaseUrl(Mage::getBaseUrl())\n ->setPurchaseDescription('Purchase from ' . Mage::app()->getStore()->getGroup()->getName())\n ->setPurchaseDateTime(date('Y-m-d H:i:s'))\n ->setBrowserData(\n array(\n 'device_category' => $helper->getDeviceType($request->getHeader('USER_AGENT')),\n 'accept_headers' => $request->getHeader('ACCEPT'),\n 'user_agent' => $request->getHeader('USER_AGENT')\n )\n );\n\n $this->_api->setUseFraudScreening($this->getUseFraudScreening());\n $this->_api->setFraudScreeningPolicy($this->getFraudScreeningPolicy());\n\n return $this->_api;\n }", "private function getPaymentInfo()\n {\n $baseUrl = 'http://embeddables.eastus2.cloudapp.azure.com/payment/';\n\n return json_decode(\n file_get_contents(\n $baseUrl . 'payment.json'\n )\n );\n }", "public function getData()\n {\n $this->validate('amount', 'card', 'transactionId');\n $this->getCard()->validate();\n\n $data = array(\n 'apiOperation' => 'PAY',\n 'sourceOfFunds' => array(\n 'type' => 'CARD',\n 'provided' => array(\n 'card' => array(\n 'number' => $this->getCard()->getNumber(),\n 'expiry' => array(\n 'month' => $this->getCard()->getExpiryDate('m'),\n 'year' => $this->getCard()->getExpiryDate('y'),\n ),\n 'securityCode' => $this->getCard()->getCVV(),\n ),\n ),\n ),\n 'transaction' => array(\n 'amount' => $this->getAmount(),\n 'currency' => $this->getCurrency(),\n 'reference' => $this->getTransactionId(),\n ),\n 'order' => array(\n 'reference' => $this->getTransactionId(),\n ),\n 'customer' => array(\n 'ipAddress' => $_SERVER['REMOTE_ADDR'],\n ),\n );\n\n return $data;\n }", "public function getCustomData()\n {\n return $this->get(self::_CUSTOM_DATA);\n }", "function getShipping()\n {\n return array('name'=>'test','cost'=>4.5);\n }", "function getPaypalBillingAddress()\n {\n return $this->getPaypalAddress('billing');\n }", "public function getData()\n {\n $this->validate('amount', 'customerId', 'numberLastFour', 'brand');\n\n return [\n 'amount' => $this->getAmount(),\n 'customer_id' => $this->getCustomerId(),\n 'transaction_type' => 'sale',\n 'card_last_four' => $this->getNumberLastFour(),\n 'card_brand' => $this->getBrand(),\n 'card_token' => $this->getToken()\n ];\n }", "protected function getAdditionalData() {\n $this->fillTableData($this->getTableName('sales/order_payment'), 'parent_id', array(\n 'method' => 'payment_method',\n ));\n }", "protected function _getBillingAgreement()\n {\n return Mage::registry('current_billing_agreement');\n }", "public function getBillingFirstName();", "public function UserBilling(){\n\n $billings = Billing::with('user')\n ->where('distributor_id', Auth::user()->id)\n ->paginate(4);\n return view('users.billing', ['data' => $billings]);\n\n }", "public function fields() {\n $ID = $this->order['id'];\n $BUYCODE = $this->order['code'];\n $url = (mswSSL() == 'yes' ? str_replace('http://', 'https://', BASE_HREF) : BASE_HREF);\n $order = $this->getsale($ID, $BUYCODE);\n $params = $this->params();\n $timestamp = time();\n $name = $this->firstLastName($order->name);\n $country = $this->country($_POST['country']);\n $amount = $this->saletotal($order);\n $arr = array(\n 'x_login' => $params['login-id'],\n 'x_amount' => $amount,\n 'x_description' => $this->stripchars($this->lang[2]),\n 'x_invoice_num' => $ID,\n 'x_fp_sequence' => $ID,\n 'x_fp_timestamp' => $timestamp,\n 'x_fp_hash' => mmGateway::submissionhash($timestamp, $params, $ID, $amount),\n 'x_test_request' => ($this->settings->paymode == 'live' ? 'false' : 'true'),\n 'x_show_form' => 'PAYMENT_FORM',\n 'x_type' => 'AUTH_CAPTURE',\n 'x_first_name' => $this->stripchars($name['first-name']),\n 'x_last_name' => $this->stripchars($name['last-name']),\n 'x_address' => $this->stripchars($_POST['address1'] . ($_POST['address2'] ? ', ' . $_POST['address2'] : '')),\n 'x_email' => $this->stripchars($order->email),\n 'x_city' => $this->stripchars($_POST['city']),\n 'x_state' => $this->stripchars($_POST['county']),\n 'x_zip' => $this->stripchars($_POST['postcode']),\n 'x_country' => $this->stripchars($country->name),\n 'x_ship_to_first_name' => $this->stripchars($name['first-name']),\n 'x_ship_to_last_name' => $this->stripchars($name['last-name']),\n 'x_ship_to_address' => $this->stripchars($_POST['address1'] . ($_POST['address2'] ? ', ' . $_POST['address2'] : '')),\n 'x_ship_to_city' => $this->stripchars($_POST['city']),\n 'x_ship_to_state' => $this->stripchars($_POST['county']),\n 'x_ship_to_zip' => $this->stripchars($_POST['postcode']),\n 'x_ship_to_country' => $this->stripchars($country->name),\n 'x_relay_response' => 'false',\n 'x_cancel_url' => $url . $this->seo->url('cancel', array(), 'yes'),\n 'x_receipt_method' => 'POST',\n 'x_receipt_link_text' => $this->stripchars(str_replace('{store}', $this->settings->website, $this->lang[5])),\n 'x_receipt_link_url' => $url . 'index.php?gw=' . $ID . '-' . $BUYCODE\n );\n // Only include currency code for live server..\n // Seems to throw errors for test server..\n // If this throws (99) errors on live, uncomment..\n if ($this->settings->paymode == 'live') {\n $arr['x_currency_code'] = (in_array($this->settings->currency, array(\n 'USD',\n 'GBP',\n 'CAD',\n 'EUR'\n )) ? $this->settings->currency : 'USD');\n }\n return $arr;\n }", "function getServiceDetail(){\n $serviceData = DB::table('servicing')\n ->get();\n return $serviceData;\n }", "public function getBankData()\n {\n $bankdata = null;\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n (!$quote->getCustomerIsGuest()) ? $customerId = $quote->getCustomer()->getId() : $customerId = '';\n $piEncryption = new Pi_Util_Encryption_MagentoEncryption();\n if (!$quote->getCustomerIsGuest() && $piEncryption->isBankdataSetForUser($customerId)) {\n $bankdata = $piEncryption->loadBankdata($customerId);\n } else {\n $bankdata = array (\n 'owner' => Mage::getSingleton('core/session')->getAccountHolder()\n );\n\n if(Mage::getSingleton('core/session')->getIban()) {\n $bankdata['iban'] = Mage::getSingleton('core/session')->getIban();\n } else {\n $bankdata['accountnumber'] = Mage::getSingleton('core/session')->getAccountNumber();\n $bankdata['bankcode'] = Mage::getSingleton('core/session')->getBankCodeNumber();\n }\n }\n return $bankdata;\n }", "public function getCustomer();", "public function getInvoiceData()\n {\n return Mage::getSingleton('core/session')->getData(\"invoice\");\n }", "public function getCustomerConfig();", "public function billing()\n {\n\n //this is a good time to calc shippable items as the nbext screen will be for a shipping address\n $this->count_shippable_items();\n\n\n //customer is stil step 0\n $this->is_step(1) OR redirect( NC_ROUTE.'/checkout/');\n\n $this->load->helper('nitrocart/nitrocart_zone');\n $this->load->model('nitrocart/addresses_m');\n $data = new ViewObject();\n\n $this->form_validation->set_rules('useragreement', 'User Agreement', 'required|numeric|trim');\n\n\n // Initi the data\n foreach ($this->addresses_m->address_validation AS $rule)\n {\n $data->{$rule['field']} = $this->input->post($rule['field']);\n }\n\n $data->addresses = [];\n\n // if logged in get some fields from our profile\n if ($this->current_user)\n {\n $data = $this->get_existing_address('billing');\n }\n\n\n\n // Existing Adress\n if($this->input->post('selection') == 'existing')\n {\n $this->form_validation->set_rules('address_id', 'Address', 'required|numeric|trim');\n \n if ($this->form_validation->run())\n {\n\n $this->session->set_userdata('billing', $this->input->post('address_id'));\n\n if ($this->input->post('sameforshipping'))\n {\n\n $address_id = $this->input->post('address_id');\n\n if($this->validate_country_list_by_address_id( $address_id ))\n {\n //update this row to allow for shipping\n $this->addresses_m->doShippingAlso( $this->input->post('address_id') );\n //$this->session->set_userdata('shipping', $this->input->post('address_id'));\n $this->set_shipping_address_id( $address_id );\n $this->set_step(3); //+2\n redirect( NC_ROUTE. '/checkout/shipment');\n }\n else\n {\n $this->session->set_flashdata(JSONStatus::Error,'This product can not be shipped to your location.');\n redirect( NC_ROUTE.'/cart');\n }\n\n\n }\n\n $this->set_step(2); \n redirect( NC_ROUTE.'/checkout/shipping');\n }\n }\n\n\n\n // New Adress\n if($this->input->post('selection') == 'new')\n {\n\n $this->form_validation->set_rules( $this->addresses_m->address_validation );\n $this->form_validation->set_rules('state', 'State', 'callback_country_state_check');\n\n if ($this->form_validation->run())\n {\n $input = $this->input->post();\n $input['user_id'] = $this->session->userdata('user_id');\n\n $same_for_shipping = ($this->input->post('sameforshipping'))?1:0;\n //add the new address, note this is for billing\n $address_id = $this->addresses_m->create($input, 1, $same_for_shipping );\n\n $this->session->set_userdata('billing', $address_id);\n\n if ($same_for_shipping)\n {\n\n if($this->validate_country_list_by_address_id( $address_id ))\n { \n //$this->session->set_userdata('shipping', $address_id);\n $this->set_shipping_address_id( $address_id );\n\n $this->set_step(3); //+2\n redirect( NC_ROUTE.'/checkout/shipment');\n }\n else\n {\n $this->session->set_flashdata(JSONStatus::Error,'This product can not be shipped to your location.');\n redirect( NC_ROUTE.'/cart'); \n }\n }\n else\n {\n $this->set_step(2); \n redirect(NC_ROUTE.'/checkout/shipping'); \n }\n }\n else\n {\n //recall info that was entered\n foreach ($this->addresses_m->address_validation AS $rule)\n {\n $data->{$rule['field']} = $this->input->post($rule['field']);\n } \n }\n }\n\n $this->set_step(1);\n\n $this->template\n ->title(Settings::get('shop_name'),'billing') \n ->set_breadcrumb('User Account',NC_ROUTE.'/checkout')\n ->set_breadcrumb('Billing')\n ->build($this->theme_layout_path .'address_billing', $data);\n }", "public function getPaymentRequestData( $order_id ) {\n $order = new WC_Order( $order_id );\n $params = array(\n 'transaction_details' => array(\n 'order_id' => $order_id,\n 'gross_amount' => 0,\n ));\n\n $customer_details = array();\n $customer_details['first_name'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_first_name');\n $customer_details['first_name'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_first_name');\n $customer_details['last_name'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_last_name');\n $customer_details['email'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_email');\n $customer_details['phone'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_phone');\n\n $billing_address = array();\n $billing_address['first_name'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_first_name');\n $billing_address['last_name'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_last_name');\n $billing_address['address'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_address_1');\n $billing_address['city'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_city');\n $billing_address['postal_code'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_postcode');\n $billing_address['phone'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_phone');\n $converted_country_code = WC_Midtrans_Utils::convert_country_code(WC_Midtrans_Utils::getOrderProperty($order,'billing_country'));\n $billing_address['country_code'] = (strlen($converted_country_code) != 3 ) ? 'IDN' : $converted_country_code ;\n\n $customer_details['billing_address'] = $billing_address;\n $customer_details['shipping_address'] = $billing_address;\n\n if ( isset ( $_POST['ship_to_different_address'] ) ) {\n $shipping_address = array();\n $shipping_address['first_name'] = WC_Midtrans_Utils::getOrderProperty($order,'shipping_first_name');\n $shipping_address['last_name'] = WC_Midtrans_Utils::getOrderProperty($order,'shipping_last_name');\n $shipping_address['address'] = WC_Midtrans_Utils::getOrderProperty($order,'shipping_address_1');\n $shipping_address['city'] = WC_Midtrans_Utils::getOrderProperty($order,'shipping_city');\n $shipping_address['postal_code'] = WC_Midtrans_Utils::getOrderProperty($order,'shipping_postcode');\n $shipping_address['phone'] = WC_Midtrans_Utils::getOrderProperty($order,'billing_phone');\n $converted_country_code = WC_Midtrans_Utils::convert_country_code(WC_Midtrans_Utils::getOrderProperty($order,'shipping_country'));\n $shipping_address['country_code'] = (strlen($converted_country_code) != 3 ) ? 'IDN' : $converted_country_code;\n $customer_details['shipping_address'] = $shipping_address;\n }\n \n $params['customer_details'] = $customer_details;\n $items = array();\n // Build item_details API params from $Order items\n if( sizeof( $order->get_items() ) > 0 ) {\n foreach( $order->get_items() as $item ) {\n if ( $item['qty'] ) {\n // $product = $order->get_product_from_item( $item );\n $midtrans_item = array();\n $midtrans_item['id'] = $item['product_id'];\n $midtrans_item['price'] = ceil($order->get_item_subtotal( $item, false ));\n $midtrans_item['quantity'] = $item['qty'];\n $midtrans_item['name'] = $item['name'];\n $items[] = $midtrans_item;\n }\n }\n }\n\n // Shipping fee as item_details\n if( $order->get_total_shipping() > 0 ) {\n $items[] = array(\n 'id' => 'shippingfee',\n 'price' => ceil($order->get_total_shipping()),\n 'quantity' => 1,\n 'name' => 'Shipping Fee',\n );\n }\n\n // Tax as item_details\n if( $order->get_total_tax() > 0 ) {\n $items[] = array(\n 'id' => 'taxfee',\n 'price' => ceil($order->get_total_tax()),\n 'quantity' => 1,\n 'name' => 'Tax',\n );\n }\n\n // Discount as item_details\n if ( $order->get_total_discount() > 0) {\n $items[] = array(\n 'id' => 'totaldiscount',\n 'price' => ceil($order->get_total_discount()) * -1,\n 'quantity' => 1,\n 'name' => 'Total Discount'\n );\n }\n\n // Fees as item_details\n if ( sizeof( $order->get_fees() ) > 0 ) {\n $fees = $order->get_fees();\n $i = 0;\n foreach( $fees as $item ) {\n $items[] = array(\n 'id' => 'itemfee' . $i,\n 'price' => ceil($item['line_total']),\n 'quantity' => 1,\n 'name' => $item['name'],\n );\n $i++;\n }\n }\n\n // Iterate through the entire item to ensure that currency conversion is applied\n if (get_woocommerce_currency() != 'IDR'){\n foreach ($items as &$item) {\n $item['price'] = $item['price'] * $this->to_idr_rate;\n $item['price'] = intval($item['price']);\n }\n unset($item);\n $params['transaction_details']['gross_amount'] *= $this->to_idr_rate;\n }\n\n $total_amount=0;\n // error_log('print r items[]' . print_r($items,true)); //debugan\n // Sum item details prices as gross_amount\n foreach ($items as $item) {\n $total_amount+=($item['price']*$item['quantity']);\n }\n $params['transaction_details']['gross_amount'] = $total_amount;\n $params['item_details'] = $items;\n $params['credit_card']['secure'] = ($this->enable_3d_secure == 'yes') ? true : false;\n\n // add custom `expiry` API params\n $custom_expiry_params = explode(\" \",$this->custom_expiry);\n if ( !empty($custom_expiry_params[1]) && !empty($custom_expiry_params[0]) ){\n $time = time();\n $time += 30; // add 30 seconds to allow margin of error\n $params['expiry'] = array(\n 'start_time' => date(\"Y-m-d H:i:s O\",$time), \n 'unit' => $custom_expiry_params[1], \n 'duration' => (int)$custom_expiry_params[0],\n );\n }\n // add custom_fields API params\n $custom_fields_params = explode(\",\",$this->custom_fields);\n if ( !empty($custom_fields_params[0]) ){\n $params['custom_field1'] = $custom_fields_params[0];\n $params['custom_field2'] = !empty($custom_fields_params[1]) ? $custom_fields_params[1] : null;\n $params['custom_field3'] = !empty($custom_fields_params[2]) ? $custom_fields_params[2] : null;\n }\n // add savecard API params\n if ($this->enable_savecard =='yes' && is_user_logged_in()){\n $params['user_id'] = crypt( $customer_details['email'].$customer_details['phone'] , $this->server_key );\n $params['credit_card']['save_card'] = true;\n }\n // add Snap API metadata, identifier for request coming via this plugin\n try {\n $params['metadata'] = array(\n 'x_midtrans_wc_plu' => array(\n 'version' => MIDTRANS_PLUGIN_VERSION,\n 'wc' => WC_VERSION,\n 'php' => phpversion()\n )\n );\n } catch (Exception $e) { }\n\n return $params;\n }", "public function getBillingTo()\n {\n return $this->billing_to;\n }", "public function billingCustomer()\n {\n $customer = new Customer();\n $this->setBilling($customer);\n\n return $customer;\n }", "public function getCharges();", "private function updateBilling($data)\n {\n $customer = new Customer();\n\n if ($customer->isGuest()){\n $customer->setEmail(trim($data['email']));\n }\n\n $customer->setValue(\"billing_first_name\",trim($data['fName']));\n Session::set('billing_first_name',trim($data['fName']));\n $customer->setValue(\"billing_last_name\",trim($data['lName']));\n Session::set('billing_last_name',trim($data['lName']));\n $customer->setValue(\"billing_phone\",trim($data['phone']));\n Session::set('billing_phone',trim($data['phone']));\n $address = array(\n \"address1\"=>trim($data['addr1']),\n \"address2\"=>trim($data['addr2']),\n \"city\"=>trim($data['city']),\n \"state_province\"=>trim($data['state']),\n \"postal_code\"=>trim($data['postal']),\n \"country\"=>trim($data['count']),\n );\n $customer->setValue(\"billing_address\",$address);\n Session::set('billing_address',$address);\n }", "function Bill_Adr() {\n\n global $conn;\n\n $stmt = $conn->prepare(\"SELECT Addressln1, Addressln2, Bill_id, Customer_id, Name, Postcode\n FROM Bill_Adr WHERE Customer_id = ?\");\n $stmt->execute([$this->Customer_id]);\n $stmt->setFetchMode(PDO::FETCH_CLASS, 'Bill_Adr');\n return $stmt->fetch();\n }", "protected function dataSource()\n {\n $range = $this->sibling(\"PaymentDateRange\")->value();\n\n //Apply to query\n return AutoMaker::table(\"payments\")\n ->join(\"customers\",\"customers.customerNumber\",\"=\",\"payments.customerNumber\")\n ->whereBetween(\"paymentDate\",$range)\n ->select(\"customerName\",\"paymentDate\",\"checkNumber\",\"amount\");\n }", "protected function _getBillingHtml()\n\t{\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onestep_billing');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$output = $layout->getOutput();\n\t\tMage::getSingleton('core/translate_inline')->processResponseBody($output);\n\t\treturn $output;\n\t}", "public function payment_fields() {\n \n\t\t\n \n\t\t}", "public function getGatewayPurchaseArray()\n {\n $metaData = ($this->metaData ? json_decode($this->metaData, true) : []);\n\n return [\n 'amount' => number_format(($this->amount / 100), 2, '.', ''),\n 'currency' => $this->currency,\n 'token' => $this->token,\n 'description' => $this->description,\n 'metadata' => array_merge_recursive(\n $metaData,\n ['paymentId' => $this->id, 'userEmail' => $this->userEmail]\n ),\n ];\n }", "public function inquire_bill_get(){\r\n// if (!$this->pronet_model->inquire_bill(1, '002', '0000000',0, null, 'E004', 3)) {\r\n if (!$this->pronet_model->inquire_bill(1, '101', '999999999999',0, null, 'E007', 10)) {//test for financial services using genesis\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function getBillingAgreementDetails($requestParameters = array());", "public function getPaymentDescription();", "function cb_order_meta_general( $order ) {\n\tif ($order->get_payment_method() == 'coinbase') {\n\t\t?>\n\n\t\t<br class=\"clear\"/>\n\t\t<h3>Coinbase Commerce Data</h3>\n\t\t<div class=\"\">\n\t\t\t<p>Coinbase Commerce Reference # <?php echo esc_html($order->get_meta('_coinbase_charge_id')); ?></p>\n\t\t</div>\n\n\t\t<?php\n\t}\n}", "protected function transformBilling($notification)\n {\n $billing = [];\n\n if ($notification->billing) {\n $billing['message'] = $this->translator->trans('notifications.billing', [':commission' => $notification->value]);\n $billing['type'] = 'billing';\n }\n\n return $billing;\n }", "public function getWalletDetailsData()\n {\n $walletProductId = $this->_helper->getWalletProductId();\n $customerId = $this->_helper->getCustomerId();\n $customerName = $this->_customerModel\n ->create()\n ->load($customerId)\n ->getName();\n $currencySymbol = $this->_helper->getCurrencySymbol(\n $this->_helper->getCurrentCurrencyCode()\n );\n $currentWalletamount = $this->_helper->getWalletTotalAmount($customerId);\n $currentWalletamount = $this->convertAmountToCurrent($currentWalletamount);\n $returnDataArray = [\n 'customer_name' => $customerName,\n 'wallet_amount' => $currentWalletamount,\n 'walletProductId' => $walletProductId,\n 'currencySymbol' => $currencySymbol\n ];\n return $returnDataArray;\n }", "public function getAddress()\n {\n return $this->billingAddress;\n }", "public function getShippingDetails();", "public function getQuoteData()\n {\n $quote= Mage::getSingleton('checkout/session')->getQuote();\n $data = array();\n if ($quote) {\n $data['checkoutId'] = $quote->getId();\n $data['currency'] = $quote->getQuoteCurrencyCode();\n $data['total'] = Mage::helper('affirm/util')->formatCents($quote->getGrandTotal());\n }\n return $data;\n\n }", "public function getBillingAddressModel()\n {\n if (is_null($this->_billingAddressModel)) {\n $object = Mage::getModel('customer/address');\n $this->_billingAddressModel = Mage::objects()->save($object);\n }\n return Mage::objects()->load($this->_billingAddressModel);\n }", "public function display_account_billing_information( ){\n\t\tif( $this->is_page_visible( \"billing_information\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_billing_information.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_billing_information.php' );\n\t\t\telse\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_billing_information.php' );\n\t\t}\n\t}" ]
[ "0.80275697", "0.7286389", "0.7026287", "0.69344825", "0.6810263", "0.6810263", "0.6588841", "0.645642", "0.645642", "0.64080983", "0.63735473", "0.6356069", "0.6265209", "0.62060267", "0.6179529", "0.6175078", "0.6150075", "0.6115563", "0.6092513", "0.6040887", "0.6018261", "0.60031027", "0.5984879", "0.5956402", "0.59438497", "0.59265804", "0.5917736", "0.5910639", "0.59058416", "0.59058416", "0.59038794", "0.5889534", "0.58695877", "0.58695877", "0.5861454", "0.5857899", "0.5857899", "0.58560497", "0.5855676", "0.58517027", "0.58430487", "0.58430487", "0.58239454", "0.579933", "0.57961166", "0.5796072", "0.5790879", "0.577494", "0.5771613", "0.5769156", "0.57512844", "0.5746201", "0.57449406", "0.5743267", "0.57323825", "0.57296926", "0.5729652", "0.57250905", "0.5724928", "0.5715889", "0.5709612", "0.5707519", "0.5685375", "0.5669477", "0.56495655", "0.5647651", "0.56344664", "0.56294656", "0.56281626", "0.5622687", "0.5621997", "0.5614976", "0.5610288", "0.5610207", "0.56085974", "0.56002605", "0.5594919", "0.5592621", "0.557679", "0.55667055", "0.5552899", "0.55479383", "0.5547821", "0.55449694", "0.5542333", "0.5538594", "0.5534751", "0.5529911", "0.5529705", "0.55289", "0.5528656", "0.5526498", "0.55255234", "0.5525169", "0.55203265", "0.55004627", "0.5498713", "0.5497495", "0.54881066", "0.5479767" ]
0.7084479
2
get next bill of this company
public function getNextBill($from = 0, $until=0, $test = 0) { $mode = $this->getBillMode(); return new Yourdelivery_Model_Billing_Company($this, $from, $until, $mode, $test); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetch_next_bill() {\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '=', $this->monthrefdate)\n ->where('monthseqnumber', '>', $this->monthseqnumber)\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n if ($next_bill != null) {\n return $next_bill;\n }\n\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '>', $this->monthrefdate)\n ->orderBy('monthrefdate', 'asc')\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n return $next_bill;\n}", "public function get_next_bill_date( $context = 'view' ) {\n\t\treturn $this->get_prop( 'next_bill_date', $context ) ;\n\t}", "public function getNext() {}", "public function getNext() {}", "public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n // instead of the hardcoded date, we introduced the parameter\n return $this->getNextProgressiveNumberByDate($currentDate);\n }", "public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n foreach ($this->invoiceDates as $number => $date) {\n if ($date > $currentDate) {\n $nextNumber = $number;\n break;\n }\n }\n if (!isset($nextNumber)) {\n $nextNumber = count($this->invoiceDates) + 1;\n }\n return $nextNumber;\n }", "public function getNext();", "public function getNext();", "public function generateNextBill(Request $request) {\n try {\n $param = $request->all();\n if (!isset($param[\"OID\"]) || !$param[\"OID\"]) {\n return response()->json(['error' => trans('messages.requestError')], 412);\n }\n\n $rental = Rental::find($param[\"OID\"]);\n if (!$rental || $rental->IsReservation != \"0\") {\n //Khong ton tai Rental hoac Rental khong hop le\n return response()->json(['error' => trans('messages.rentalError')], 413);\n }\n\n $nextDate = date('Y-m-01', strtotime('+1 month'));\n\n //Tao contract thi tao rentalBill\n $rentalBill = new RentalBill();\n $rentalBill->RentalOID = $rental->OID;\n $rentalBill->CustomerOID = $rental->CustomerOID;\n $rentalBill->BillDate = $nextDate;\n $rentalBill->CurrCd = $rental->CurrCd;\n $rentalBill->CurrRate = $rental->CurrRate;\n $rentalBill->Amount = $rental->MonthFee;\n\n //Tinh AmountB\n if ($rental->CurrRate) {\n if (strcasecmp(Config::get('constants.USD'), $rentalBill->CurrCd) == 0) {\n //Neu la USD\n $rentalBill->AmountB = round((float) $rental->MonthFee * $rental->CurrRate, 2);\n// $rentalBill->AmountB = round((float) $rental->MonthFeeB / $rental->CurrRate, 2);\n } else {\n $rentalBill->AmountB = $rental->MonthFee;\n }\n }\n\n// $rentalBill->PaidDate = $rental->OID;\n// $rentalBill->PaidAmount = $rental->OID;\n// $rentalBill->PaidAmountB = $rental->OID;\n $rentalBill->Note = $rental->Note;\n $rentalBill->save();\n\n return response()->json(compact('rentalBill'));\n } catch (Exception $ex) {\n Log::error($ex);\n return response()->json(['error' => trans('messages.systemError')], 411);\n }\n }", "public static function getLastInvoice() {\r\n \t\r\n \t// Check if a year is passed\r\n \tself::checkSettings();\r\n \t\r\n $record = Doctrine_Query::create ()\r\n ->select ( 'next_number' )\r\n ->from ( 'InvoicesSettings is' )\r\n ->where('is.year = ?', date('Y'))\r\n\t\t\t\t->andWhere('is.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n ->limit ( 1 )\r\n\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\r\n if (count ( $record ) > 0) {\r\n return $record[0] ['next_number'];\r\n } else {\r\n return 1;\r\n }\r\n }", "public function next()\n {\n $this->incrIndex();\n\n return $this->getCurrent();\n }", "public static function next()\n {\n\n \t$oTask = Task::where('processFrom', '<', Carbon::now())->first();\n\n \treturn $oTask;\n }", "public function getNext()\n {\n return self::find()->where(['>', 'id', $this->id])->limit(1)->one();\n }", "public function getNextBunch()\n {\n return $this->_dataSourceModel->getNextBunch();\n }", "function getNext();", "function jpid_next_customer_id() {\n\treturn JPID()->db_customers->get_next_id();\n}", "public function getNextProcess() {\n\t\t$bean = $this->unbox();\n\t\t$processes = $bean->with(' AND `status` = \"Queued\" ORDER BY `id` ASC LIMIT 1 ')->ownProcess;\n\t\treturn end($processes);\n\t}", "public function getNextDueExecution() {}", "public function getNext()\n {\n return $this->next;\n }", "public function getDashBoard1NextOrderById($bid)\r\n {\r\n $currentOrder = (int) $_SESSION[\"current_order\"];\r\n $totalOrder = (int) $_SESSION[\"total_order\"];\r\n\r\n if ($totalOrder == CommonDefinition::NO_RESULT) {\r\n // No order existed, return with no change\r\n $result[\"status\"] = CommonDefinition::SUCCESS_NO_RESULT;\r\n return $result;\r\n }\r\n\r\n if ($currentOrder >= $totalOrder) {\r\n // Reach the first one already, return with no change\r\n $result[\"status\"] = CommonDefinition::SUCCESS_NO_RESULT;\r\n return $result;\r\n }\r\n // Get the previous order\r\n $currentOrder = $currentOrder + 1;\r\n\r\n $result = $this->getDashBoard1OrderById($bid, $currentOrder);\r\n\r\n if (is_bool($result)) {\r\n $result[\"status\"] = CommonDefinition::SUCCESS_NO_RESULT;\r\n return $result;\r\n } else {\r\n $result[\"status\"] = CommonDefinition::SUCCESS;\r\n // Save the current order index to session\r\n session_start();\r\n $_SESSION[\"current_order\"] = $currentOrder;\r\n $_SESSION[\"total_order\"] = $result[\"totalOrder\"];\r\n return $result;\r\n }\r\n }", "public function getNextID()\n {\n try{\n //define the query to get the next ID\n $this->dbQuery = \"SELECT CustomerID FROM customer\n ORDER BY CustomerID DESC LIMIT 0,1\";\n \n $results = $this->dbObj->query($this->dbQuery);\n \n while($row = mysqli_fetch_array($results))\n {\n return $row['CustomerID'] +1;\n }\n }catch(Exception $e)\n {\n echo $e->getMessage();\n }\n }", "final public function getNext() {\n\t\treturn null;\n\t}", "public function getNext()\n {\n $nextIndex = $this->getIndex() + 1;\n\n return $this->offsetGet($nextIndex);\n }", "public function getNext($criteria = null)\n\t{\n\t\treturn $this->_getRelativeElement($criteria, 1);\n\t}", "private function _get_next_order()\n\t{\n\t\t$result = $this->order_by('order','desc')->limit(1)->get_all();\n\n\t\tif($result)\n\t\t{\n\n\t\t\t$order = $result[0]->order + 1;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$order = 0;\n\t\t}\t\n\n\t\treturn $order;\n\t}", "public function getNext(PropelPDO $con = null)\n {\n\n $query = YearQuery::create();\n\n $query->filterByRank($this->getSortableRank() + 1);\n\n\n return $query->findOne($con);\n }", "public function getNext()\n {\n return $this->hasNext() ? $this->curPage + 1 : null;\n }", "public function getNextValue();", "public function pay_bill_get(){\r\n if (!$this->pronet_model->pay_bill(1, '882332411098', '4999999999999999', '4521','12','2022')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function getNextRow() {\n $next_call_count = $this->currentPage * $this->pagination;\n if ($this->currentCount == $this->totalCount) {\n return NULL;\n }\n if ($this->currentCount == $next_call_count && $next_call_count < $this->totalCount) {\n $start = $this->currentPage * $this->pagination;\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=' . $this->pagination . '&start=' . $start, array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->data = $json->response->docs;\n $this->currentPage++;\n }\n }\n }\n // TODO Messages in case of empty data / failed call etc.\n $item = NULL;\n if (count($this->data)) {\n $item = current($this->data);\n next($this->data);\n $this->currentCount++;\n }\n return $item;\n }", "private function nextLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('next sunday', strtotime($time . ' -1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . '+1week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '+1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 +1month'));\n }\n\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }", "private function getNext()\n {\n $this->result = null;\n // Load next result if there's a next token or it's the first request.\n if (!$this->requestCount || $this->nextToken) {\n $this->loadNextResult();\n }\n\n return $this->result;\n }", "public static function getNextDueDate() {\n }", "public static function fetchNextScheduledExport()\n {\n \t$aDueList = self::fetchDueList();\n \tif ($aDueList)\n \t\treturn $aDueList[0];\n \t\t\n \treturn false;\n }", "function getNextTask( $queue ) {\n\t\t$query = \"SELECT cd.`ticket_id` FROM `\".BIT_DB_PREFIX.\"task_ticket` cd\n\t\t\t\t\t\t WHERE cd.`ticket_ref` BETWEEN 'TODAY' AND 'TOMORROW' AND cd.`room` = $queue + 80\n\t\t\t\t\t\t AND cd.`office` = 1\n\t\t\t\t \t\t ORDER BY cd.`ticket_ref`\";\n\t\t$next = $this->mDb->getOne( $query );\n// Add switch of user state to serving!\n\t\tif ( $next ) return true;\n\t\telse return false;\n\t}", "public function getNext() {\r\n $nextDate = $this->getStartDate();\r\n $nextDate->modify('+1 ' . $this->getMode());\r\n\r\n return $nextDate->getTimestamp();\r\n }", "public function nextval() {\n\t\t\tif ($this->database->isConnected()) {\n\t\t\t\t$query = \"SELECT \" . $this->schema . \".\" . $this->name . \".NEXTVAL FROM DUAL\";\n\t\t\t\t$stid = $this->database->executeRead($query);\n\t\t\t\t$results = $this->database->getResults($stid);\n\t\t\t\tforeach ($results as $row) {\n\t\t\t\t\treturn $row['NEXTVAL'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public function getNextRideItem()\n {\n // Check if ride has next point\n $rideitem = $this->rideitems()\n\t\t\t->whereIn('status', [RideItem::STATUS_NEXT, RideItem::STATUS_ARRIVED])\n\t\t\t->first();\n if($rideitem){\n return $rideitem;\n }\n \n // Set first active point as next\n $rideitem = $this->rideitems()\n\t\t\t->where('status', [RideItem::STATUS_PING, RideItem::STATUS_ACTIVE])\n\t\t\t->orderBy('order', 'asc')\n\t\t\t->first();\n if($rideitem)\n {\n\t\t\t$rideitem->status = RideItem::STATUS_NEXT;\n\t\t\t$rideitem->start_at = now()->addSeconds($rideitem->duration_value);\n\t\t\t$rideitem->save();\n\t\t\t\n\t\t\treturn $rideitem;\n }\n\t\t\n\t\t// S'il n'y a plus de point suivant\n $all_count = $this->rideitems()->count();\n $canceled_count = $this->rideitems()->where('status', '==', RideItem::STATUS_CANCELED)->count();\n if($all_count == $canceled_count){\n\t\t\t$this->cancelable(); // Set ride as cancelable\n }else{\n\t\t\t$this->completable(); // Set ride as completable\n\t\t}\n\t\t\n return null;\n }", "public function getNext ()\n {\n return prev ( $this->_list ) ;\n }", "function get_next_month_symbol($symbol, $month)\n\t{\n\t\t$symbol_delivery_months = explode(',', $this->delivery_months[$symbol]);\n\t\t// set default to first contract month next year\n\t\t$next_month = reset($symbol_delivery_months) . strftime(\"%y\", time() + 31536000);\n\t\t\n\t\tforeach($symbol_delivery_months as $month_symbol) {\n\t\t\tif($this->month_symbols[$month] < $month_symbol) {\t\n\t\t\t\t$next_month = $month_symbol . strftime(\"%y\"); \n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\treturn $next_month;\n\t}", "public function getNextAttribute()\n {\n $next_id = Customer::where('id', '>', $this->id)->min('id');\n if ($next_id == null) {\n $next_id = Customer::all()->min('id');\n }\n return \"/customer/$next_id\";\n }", "function getNextId() {\n\t\t$query = \"select min( $this->pKey ) from $this->table where $this->pKey > $this->id\";\n\t\treturn $this->getDb()->query( $query )->getFirst();\n\t}", "function FetchNextObj() {}", "public function next_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() + 1);\n\t}", "public function getNextValue()\n {\n return $this->nextValue instanceof CustomFieldsBuilder ? $this->nextValue->build() : $this->nextValue;\n }", "public function getBillingCycle()\n {\n return $this->billing_cycle;\n }", "public function inquire_bill_get(){\r\n// if (!$this->pronet_model->inquire_bill(1, '002', '0000000',0, null, 'E004', 3)) {\r\n if (!$this->pronet_model->inquire_bill(1, '101', '999999999999',0, null, 'E007', 10)) {//test for financial services using genesis\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }", "public function set_next_bill_date( $value ) {\n\t\t$this->set_prop( 'next_bill_date', $value ) ;\n\t}", "public function getNext()\n {\n $objNext = \\Database::getInstance()->prepare(\"SELECT project FROM tl_page_ac_project WHERE pid=? AND sorting>(SELECT sorting FROM tl_page_ac_project WHERE project=?) ORDER BY sorting\")\n ->limit(1)\n ->execute($this->page, $this->id);\n\n if (!$objNext->numRows)\n {\n return null;\n }\n\n $t = static::$strTable;\n $arrColumns[] = \"$t.id=?\";\n\n if (!BE_USER_LOGGED_IN)\n {\n $arrColumns[] = \"$t.published=1\";\n }\n\n return static::findOneBy($arrColumns, $objNext->project);\n }", "function next_record() {\r\n\t\treturn $this->dbh->next_record();\r\n\t}", "public static function next($current)\n {\n $countQuestion = Question::where('blueprint_id' , $current->blueprint_id)->count();\n if ($current->order < $countQuestion) {\n $question = Question::where('blueprint_id' , $current->blueprint_id)->where('order' , $current->order+1)->first();\n return $question->key;\n }\n else {\n return false;\n }\n }", "public function next() { \n\t\t$page = &$this->touchPage();\n\t\t\n\t\tnext($page);\n\t\t\n\t\tif(key($page) === null && count($page) == $this->booksPerPage) {\n\t\t\t$this->currentPage++;\n\t\t\t$page = &$this->touchPage();\n\t\t\treset($page);\n\t\t}\n\t\t\n\t\treturn current($page);\n\t}", "public function getNextSequence()\n {\n $objects = SevDeskApi::getFromSevDesk((new SevSequence)->objectName);\n $nextSequence = null;\n\n foreach($objects as $object)\n {\n if ($object['forObject'] == $this->objectName)\n $nextSequence = $object['nextSequence'];\n }\n\n return $nextSequence;\n }", "public function getNext()\n {\n return parent::getNext() ?: $this->getRepo()->newVoidModel();\n }", "public function getNextPage();", "function getNextBatch() {\n global $connection, $user;\n // find the next batch to be worked on\n // TODO: db should be improved to record the last batch the user worked on\n $sql = 'select trub.tr_batch_id from TR_USER_BATCH trub, TR_BATCH trb where trub.tr_batch_id = trb.tr_batch_id and trub.username = ? and trb.completed_date is null order by trub.position desc limit 1';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"s\",$_SESSION[\"username\"]);\n $statement->execute();\n $statement->bind_result($batch_id);\n $statement->store_result();\n if ($statement->fetch()) {\n // nothing\n } else {\n $batch_id = 1;\n }\n } else {\n throw new Exception(\"Connection to database failed\");\n }\n\n $batch = new TR_BATCH();\n $batch->setID($batch_id);\n\n return $batch;\n}", "function next_product_number() {\r\n $conn = $this->db->conn_id;\r\n $stmt = oci_parse($conn, \"BEGIN :v_Return := PRODUCT_ACTIONS.NEXT_PRODUCT_NUMBER(); END;\");\r\n oci_bind_by_name($stmt, ':v_Return', $result, SQLT_STR);\r\n\r\n if (!oci_execute($stmt)) {\r\n return oci_error($stmt);\r\n }\r\n return $result;\r\n }", "function nextPage() {\n\t\treturn $this->hasNextPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}", "public function getNextQueueItem() {\n $select = db_select($this->og_controller->queue_table, 'queue');\n $select->condition('queue.processed', 0);\n $select->fields('queue', array('entity_type', 'entity_id'));\n $select->range(0, 1);\n\n if ($item = $select->execute()->fetchObject()) {\n return new Dumper_Data_QueueItem($this->og_controller->og_node->nid, $item->entity_type, $item->entity_id);\n }\n\n return FALSE;\n }", "public function getNextRow() {\n $row = mssql_fetch_object($this->result);\n\n // Might be totally out of data, or just out of this batch - request another\n // batch and see\n if (!is_object($row)) {\n mssql_fetch_batch($this->result);\n $row = mssql_fetch_object($this->result);\n }\n if (is_object($row)) {\n return $row;\n }\n else {\n return NULL;\n }\n }", "public function nextCron() {\n\t\t$jour=array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');\n\t\t$x = self::getCron();\n\t\t$t = [];\n\t\tforeach ($x['cron'] as $cron) {\n\t\t\tif ($cron['active']) $t[] = self::getNextCron($cron['raw']);\n\t\t}\n\t\tif (count($t) >=1) {\n\t\t\t$n = min($t);\n\t\t\tFlight::json(array('Status' => 'OK','Time' => $jour[date('w', $n)].date(' d/m/Y H:i', $n)));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','Time' => 'Not Found'));\n\t}", "public function getNumber(){\n if ( is_null($this->number) ){\n $number = $this->getTable()->getNextBillingNumber($this->getCourier(), 'rest');\n $this->number = \"R-\".date('y',$this->from).date('m',$this->from).\"-\".$this->getCourier()->getCustomerNr().\"-\".$number;\n }\n return $this->number;\n }", "public function get_next_id() {\n\n $query = $this->db->query('SELECT getNextSeq(\"company_seq as id\");');\n // print \"<pre>\";\n\n $object = $query->result()[0];\n\n // print_r($object);\n\n $array = get_object_vars($object);\n\n // print_r($array);\n // print_r($array['getNextSeq(\"company_seq as id\")']);\n\n $result_id = $array['getNextSeq(\"company_seq as id\")'];\n //echo $result_id;//[0]['id'];\n // print \"</pre>\";\n // exit(); \n\n return $result_id;\n }", "public function next()\n {\n return $this->pager->next();\n }", "public function calculateNextValue() {}", "function getNextMonth() {\n\t\t$nextDate = date ( \"Y-m-d\", strtotime ( \"+1 months\" ) );\n\t\t$dateArray = split ( \"-\", $nextDate );\n\t\t$nextMonth = FormatClass::getMonthName ( $dateArray [1], \"full\" );\n\t\treturn $nextMonth;\n\t}", "public function calculateNextPaydates($paydate_model, $paydate_one, $number_of_paydates);", "public function getNextProgressiveNumberByDate($currentDate)\n {\n foreach ($this->invoiceDates as $number => $date) {\n if ($date > $currentDate) {\n $nextNumber = $number;\n break;\n }\n }\n if (!isset($nextNumber)) {\n $nextNumber = count($this->invoiceDates) + 1;\n }\n return $nextNumber;\n }", "public function nextClientVisit()\n {\n $today = Carbon::now();\n $visit = SitePlanner::where('from', '>=', $today->format('Y-m-d'))->where('site_id', $this->site_id)->where('task_id', 524)->orderBy('from')->first();\n\n return $visit;\n //return ($visit) ? $visit->from : null;\n }", "public function testFindNextBooking()\n {\n $bookingRepo = $this->em->getRepository('GrabagameBookingBundle:Booking');\n\n $booking = $bookingRepo->find(1);\n $expectedBooking = $bookingRepo->find(2);\n\n $nextBooking = $bookingRepo->findNextBooking($booking);\n $this->assertEquals($expectedBooking, $nextBooking);\n\n $booking = $bookingRepo->find(8);\n $expectedBooking = $bookingRepo->find(9);\n\n $nextBooking = $bookingRepo->findNextBooking($booking);\n $this->assertEquals($expectedBooking, $nextBooking);\n\n $booking = $bookingRepo->find(9);\n $expectedBooking = $bookingRepo->find(10);\n\n $nextBooking = $bookingRepo->findNextBooking($booking);\n $this->assertEquals($expectedBooking, $nextBooking);\n }", "function getNextRow()\n\t{\n\t\t\n\t\tif($record=mysql_fetch_array($this->resultset))\n\t\t{\n\t\t\t//fill the serialno also in the record\n\t\t\t$record[\"serialno\"]=$this->tmp_present;\n\t\t\t$this->tmp_present++;\n\t\t}\n\t\treturn $record;\n\t}", "public function get_next_object() { \n\n\t\t$tmp_id = Dba::escape($this->id);\n\t\t$order = \" ORDER BY tmp_playlist_data.id DESC\";\n\n\t\t$sql = \"SELECT tmp_playlist_data.object_id FROM tmp_playlist_data \" . \n\t\t\t\"WHERE tmp_playlist_data.tmp_playlist = '$tmp_id' $order LIMIT 1\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results['object_id'];\n\n\t}", "protected function _get_next_incrementer() {\n\t\t// Get the old integer\n\t\t$channel_id = $this->EE->input->get('channel_id');\n\t\t$old_number = $this->EE->db->select($this->field_name)\n\t\t\t\t\t\t\t\t ->where('channel_id', $this->EE->input->get('channel_id'))\n\t\t\t\t\t\t\t\t ->order_by('entry_id DESC')\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->get('channel_data')\n\t\t\t\t\t\t\t\t ->row();\n\t\t\n\t\t// Do we have one?\n\t\tif ($old_number) {\n\t\t\t// Increment\n\t\t\t$new_number = (int)$old_number->{$this->field_name} + 1;\n\t\t} else {\n\t\t\t// Start at 1\n\t\t\t$new_number = 1;\n\t\t}\n\t\t\n\t\t// Return it\n\t\treturn $new_number;\n\t}", "static public function getNextPrimaryKey()\r\n\t{\r\n\t\t$oTableCells = Core_Entity::factory(\"Table_Cell\");\r\n\t\t$oTableCells\r\n\t\t\t->queryBuilder()\r\n\t\t\t->clearOrderBy()\r\n\t\t\t->orderBy('id', 'DESC')\r\n\t\t\t->limit(1);\r\n\t\t$aTableCells = $oTableCells->findAll(false);\r\n\t\treturn intval(reset($aTableCells)->id);\r\n\t}", "function get_next_comic($in_same_category = false, $category = null) { return get_adjacent_comic($category, false, $in_same_category); }", "public function next($search=null){\n\t\treturn $this->look_on_same_row(\"next\",$search);\n\t}", "function get_nextitemrecno($itemID, $nextorprev, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('itemsearch');\n\t\t$expression = $nextorprev == 'next' ? \"MAX(recno) + 1\" : \"MIN(recno) - 1\";\n\t\t$q->field($q->expr($expression));\n\t\t$q->where('itemid', $itemID);\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchColumn();\n\t\t}\n\t}", "public function getNext() {\n\t\treturn $this->pagefiles->getNext($this); \n\t}", "public function getNext(): Carbon\n {\n return Carbon::parse(\n $this\n ->getCron()\n ->getNextRunDate(Carbon::now())\n );\n }", "public function next()\n {\n $row = $this->getRow($this->pointer);\n if($row){\n $this->pointer++;\n }\n return $row;\n }", "public function next($idol)\n {\n $query = $this->_em->createQuery('\n SELECT i\n FROM \\Dodici\\Fansworld\\WebBundle\\Entity\\Idol i\n WHERE i.id > :idolId\n ORDER BY i.id DESC\n ')\n ->setParameter('idolId', $idol->getId())\n ->setMaxResults(1);\n\n return $query->getOneOrNullResult();\n }", "public function next_entry()\n\t{\n\t\treturn $this->_prev_next('next');\n\t}", "function get_next_sequence($voucher_id)\n\t{\n\t\t$this->db->select_max('sequence');\n\t\t$this->db->where('voucher_id',$voucher_id);\n\t\t$res = $this->db->get('vouchers_products')->row();\n\t\treturn $res->sequence + 1;\n\t}", "public function getNextNumber()\n {\n $nextNoProc = $this->getAdapter()->prepare(\n \"DECLARE @RESULT int\n EXEC udf_gen_next_number\n @RESULT = @RESULT OUTPUT\"\n );\n $nextNoProc->execute();\n // Is this really necessary? Yes, unfortunately.\n $dereference = $nextNoProc->fetch();\n return array_pop($dereference);\n }", "public function findNextByQueue($queue);", "function next() {\n\n return $this->skip(1);\n }", "public function getNextMonth(){\n\t\tif($this->getMonth() == 12){return 1;}\n\t\telse{return $this->getMonth()+1;}\n\t}", "protected function _getNextEntityId()\n {\n if (!$this->_nextEntityId) {\n /** @var $addressResource \\Magento\\Customer\\Model\\ResourceModel\\Address */\n $addressResource = $this->_addressFactory->create()->getResource();\n $addressTable = $addressResource->getEntityTable();\n $this->_nextEntityId = $this->_resourceHelper->getNextAutoincrement($addressTable);\n }\n return $this->_nextEntityId++;\n }", "public function getNextPageNumber(): int;", "public function getNextBillingTimestamp()\n {\n if (empty($this->next_billing_timestamp)) {\n $this->next_billing_timestamp = $this->calculateNextBillingTimestamp($this->getTimestamp());\n }\n\n return $this->next_billing_timestamp;\n }", "public function getNextDocumentNumber() {\n \n }", "public function next($default = null)\n {\n /* @var OrderInterface $last */\n if (!$last = $this->orders->getLastOrder()) {\n return $default;\n }\n\n return $this->increment($last);\n }", "public function getNext () {\n $cond = \" AND id > :id ORDER BY ID ASC LIMIT 1 \";\n $bind = array(\n \":id\" => $this->id);\n return Dao::getEntityByCond('LessonUserRef', $cond, $bind);\n }", "public function getNext()\n {\n if( $this->db()->profiling && ( ! $this->_cursor || ! $this->is_iterating() ) )\n {\n $this->cursor();\n $bm = $this->db()->profiler_start(\"Mongo_Database::$this->db\", $this->inspect());\n $this->cursor()->next();\n $this->db()->profiler_stop($bm);\n }\n else\n {\n $this->cursor()->next();\n }\n return $this->current();\n }", "public function next($index=1){\n return $this->results()[$index]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function next() {\n $this->index++;\n return $this->valid() ? $this->current() : null;\n }", "public function getNext() \n {\n $page_next = $this->page_current + 1;\n \n if($this->page_current >= $this->num_pages) {\n\t\t $page_next = $this->num_pages;\n } \n \n return $page_next;\n }", "function ppt_resources_get_next_planned_orders($data)\n{\n global $user;\n $months = array(\n \"01\" => 'December',\n \"02\" => 'January',\n \"03\" => 'February',\n \"04\" => 'March',\n \"05\" => 'April',\n \"06\" => 'May',\n \"07\" => 'June',\n \"08\" => 'July',\n \"09\" => 'August',\n \"10\" => 'September',\n \"11\" => 'October',\n \"12\" => 'November',\n );\n\n if (!isset($data['year'])) {\n return services_error('Year is not defined!', 500);\n }\n\n if (empty($data['accounts'])) {\n return services_error('Accounts is not defined!', 500);\n }\n\n if (empty($data['products'])) {\n return services_error('Products is not defined!', 500);\n }\n\n $year = $data['year'];\n $accounts = $data['accounts'];\n $products = $data['products'];\n $dates = get_year_dates($year);\n $start_date = $dates['start_date'];\n $end_date = $dates['end_date'];\n\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', 'planned_order')\n ->fieldCondition('field_planned_account', 'target_id', $accounts, 'IN')\n ->fieldCondition('field_planned_product', 'target_id', $products, 'IN')\n ->fieldCondition('field_planned_period', 'value', $start_date, '>=')\n ->fieldCondition('field_planned_period', 'value', $end_date, '<=')\n ->addMetaData('account', user_load(1));\n\n $records = $query->execute();\n $final_arr = [];\n\n if (isset($records['node'])) {\n $nodes_ids = array_keys($records['node']);\n $nodes = node_load_multiple($nodes_ids);\n\n foreach ($nodes as $node) {\n // Get node planned product name.\n $planned_product_tid = $node->field_planned_product['und'][0]['target_id'];\n $planned_product = taxonomy_term_load($planned_product_tid);\n $planned_product_name = $planned_product->name;\n\n // Get node date for product (planned).\n if (isset($node->field_planned_period['und'])) {\n $node_date = $node->field_planned_period['und'][0]['value'];\n $planned_month = date(\"F\", strtotime($node_date));\n }\n\n // Get node values for planned quantity.\n $planned_quantity = 0;\n if (isset($node->field_planned_quantity['und'])) {\n $planned_quantity = $node->field_planned_quantity['und'][0]['value'];\n }\n\n // If product already exists, update its values for node months.\n if (isset($final_arr['planned'][$planned_product_name])) {\n if (isset($final_arr['planned'][$planned_product_name][$planned_month])) {\n $final_arr['planned'][$planned_product_name][$planned_month][0] += (int) $planned_quantity;\n } else {\n $final_arr['planned'][$planned_product_name][$planned_month][0] = [(int) $planned_quantity];\n }\n } else {\n // Initialze product array with 0 for all months, then update it with current node data.\n $final_arr['planned'][$planned_product_name] = [];\n for ($i = 1; $i <= 12; $i++) {\n $month = $months[sprintf('%02d', $i)];\n $final_arr['planned'][$planned_product_name][$month] = [0];\n }\n $final_arr['planned'][$planned_product_name][$planned_month] = [(int) $planned_quantity];\n }\n }\n }\n return $final_arr;\n}", "public function getBill($id){\n\t\t$sql = \"select * from su_bills where id=?\";\n\t\t$unit = $this->runRequest($sql, array($id));\n\t\tif ($unit->rowCount() == 1)\n\t\t\treturn $unit->fetch(); // get the first line of the result\n\t\telse\n\t\t\tthrow new Exception(\"Cannot find the item using the given id\");\n\t}", "public function getNextSequence($coupon_id)\n {\n CI::db()->select_max('sequence');\n CI::db()->where('coupon_id',$coupon_id);\n $res = CI::db()->get('coupons_products')->row();\n return $res->sequence + 1;\n }" ]
[ "0.80487335", "0.6455558", "0.63302267", "0.63280314", "0.6246678", "0.62086344", "0.6114703", "0.6114703", "0.6047466", "0.6007128", "0.5977046", "0.5963493", "0.5961762", "0.59172356", "0.58790684", "0.5877691", "0.58353156", "0.58328134", "0.5822775", "0.5819205", "0.57965237", "0.57754135", "0.57747865", "0.5760777", "0.5734525", "0.57189023", "0.5709543", "0.56918794", "0.56850237", "0.5677962", "0.56761515", "0.5670958", "0.5656917", "0.5650891", "0.558426", "0.55777735", "0.5560774", "0.55579823", "0.55551", "0.55534816", "0.55534", "0.55445856", "0.5533812", "0.5520058", "0.5512921", "0.54952484", "0.5495145", "0.5484255", "0.5475097", "0.5474609", "0.5455801", "0.5454783", "0.5452863", "0.5451625", "0.54449815", "0.5431641", "0.54126155", "0.5411948", "0.5408799", "0.54081905", "0.540552", "0.5401735", "0.54001707", "0.5398038", "0.53958684", "0.53840953", "0.53773564", "0.53770053", "0.53616744", "0.53570706", "0.5351177", "0.5350701", "0.5350253", "0.5347973", "0.534726", "0.5342366", "0.53408164", "0.53356093", "0.53246796", "0.5324395", "0.5324373", "0.5322818", "0.5316996", "0.5313794", "0.5305022", "0.52963704", "0.5296188", "0.5286056", "0.5281763", "0.5278305", "0.52611995", "0.5260639", "0.52604926", "0.5244342", "0.52431494", "0.5238551", "0.52215064", "0.5218437", "0.52037185", "0.52012485" ]
0.6455443
2
get ort object of location
public function getOrt() { $cid = $this->getCityId(); try { return new Yourdelivery_Model_City($cid); } catch (Yourdelivery_Exception_Database_Inconsistency $e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function asort() {}", "public function getSortValue() {}", "public function asort()\n {\n }", "public function getSortIndex();", "function getSort(){\n\treturn 281;\n}", "function getSort(){ return 301; }", "abstract protected function _getSortType();", "public function getSorting();", "function getSort(){\n return 188;\n }", "protected function _getSortType() {}", "protected function _getSortType() {}", "function getSort(){\n return 301;\n }", "public function Sort(){\r\n\t\treturn self::get_sort();\r\n\t}", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "public function get_sorting_directions() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_sorting_directions();\n\n }", "public function getElementSortOrder();", "public function getsort()\n {\n $s = $this->getname();\n return $s;\n }", "public function getSortOrder();", "public function getSortOrder();", "public function getSortOrder();", "public function getSortOrder(): int;", "function getSort(){\n return 100;\n }", "public function getSort()\n {\n return 125;\n }", "public function sortStrategy();", "function getSort() {\n return 999;\n }", "function _idx_order( $pos )\n\t{\n\t\t$elements = array( \n\t\t\t\t\t\t\t'gallery_img_order_username',\n\t\t\t\t\t\t\t'gallery_img_order_date',\n\t\t\t\t\t\t\t'gallery_img_order_size',\n\t\t\t\t\t\t\t'gallery_img_order_comment', \n\t\t\t\t\t\t\t'gallery_img_order_view',\n\t\t\t\t\t\t\t'gallery_img_order_rating',\n\t\t\t\t\t\t);\n\n\t\tforeach( $elements as $element )\n\t\t{\n\t\t\tif( $this->ipsclass->vars[$element] == $pos )\n\t\t\t{\n\t\t\t\treturn $element;\n\t\t\t}\n\t\t}\n\t}", "public function getSort()\n {\n return 168;\n }", "public function getSort() {\n return 30;\n }", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "protected function getSortInfo()\n {\n return array( \"sort_key_int\" => $this->getValue() );\n }", "function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }", "public function getSort()\n {\n return $this->__sort__;\n }", "function cmp_obj($a, $b)\r\n {\r\n $al = $a->Top;\r\n $bl = $b->Top;\r\n if ($al == $bl) {\r\n return 0;\r\n }\r\n return ($al > $bl) ? +1 : -1;\r\n }", "public function getAreaSort()\n {\n return $this->area_sort;\n }", "function getSort() {\n return $this->sort;\n }", "public function getSort()\n {\n return $this->tpSort;\n }", "function GetCurrentSort()\n\t{\n\t\tif (isset ( $this->m_externalParmas ['sortby'] ))\n\t\t{\n\t\t\treturn $this->m_externalParmas ['sortby'];\n\t\t}\n\t\t//From CMS\n\t\t$res = $this->m_sortBy;\n\t\t\n\t\tif (($newRes = DB::REQUEST ( \"sort{$this->m_linkIDName}\" )))\n\t\t{\n\t\t\t$res = $newRes;\n\t\t}\n\t\treturn $res;\n\t}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "function sortByIndex($a, $b) {\n\t\t return $a->zindex - $b->zindex;\n\t\t}", "function sort_field(&$object, $lang) {\n return null;\n }", "function sort_pos( $a, $b ) {\n\t\t\treturn strcmp( $a[ 'sortname' ], $b[ 'sortname' ] );\n\t\t}", "public function get_position(){ return $this->_position;}", "function _getsortby($idx) {\n\tswitch ((int)$idx) {\n\t\tcase 1:\t$idx = 6; break;\n\t\tcase 3:\t$idx = 2; break;\n\t\tcase 4:\t$idx = 3; break;\n\t\tcase 5:\t$idx = 12; break;\n\t\tcase 6:\t$idx = 8; break;\n\t\tcase 7:\t$idx = 9; break;\n\t\tcase 10:\t$idx = 4; break;\n\t\tcase 11:\t$idx = 5; break;\n\t\tdefault: $idx = 6;\n\t}\n\treturn $idx;\n}", "public function onInitSortingComponent()\n {\n return new Sorting();\n }", "public function getSort()\n {\n return $this->customSort;\n }", "public function &getOrderBy();", "public function get_location()\r\n\t\t{\r\n\t\t\t$retArr = $this->obj->getBasics();\r\n\r\n\t\t\treturn $retArr;\r\n\t\t}", "function getLocation(){ return $this->_Location;}", "function sortNumFound($a, $b)\n{\n return $b->numfound - $a->numfound;\n}", "public static function findByOrt ($ort) {\n\n $db = Zend_Registry::get('dbAdapter');\n $query = $db->select()\n ->from(array(\"o\" => \"orte\"))\n ->where(\"o.ort = ?\", $ort);\n return $db->fetchRow($query);\n\n }", "function get_position( )\n\t{\n\t\treturn $this->latdeg.\";\".$this->londeg;\n\t}", "public function getPos();", "public function getPos();", "public function getOrderingProvider(int $position = 17)\n {\n return $this->getField($position);\n }", "function cmp($a, $b) {\n\treturn $a['posi'] - $b['posi'];\n}", "public function natsort()\n {\n }", "protected function pickupLocationSortFunction($a, $b)\n {\n $result = strcmp($a['locationDisplay'], $b['locationDisplay']);\n if ($result == 0) {\n $result = $a['locationID'] - $b['locationID'];\n }\n return $result;\n }", "public function points() {\n\n if ($this->_needsSort) {\n usort($this->_points, array(__CLASS__, 'sort'));\n $this->_needsSort = false;\n }\n \n return $this->_points;\n }", "public function getSort()\n {\n return $this->sort;\n }", "public function getSort()\n {\n return $this->sort;\n }", "public function getSortBy();", "function get_category_by_position_sort(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_category\n\t\t\t\tLEFT JOIN evs_database.evs_identification\n\t\t\t\tON idf_ctg_id = ctg_id\n\t\t\t\tLEFT JOIN evs_database.evs_set_form_attitude\n\t\t\t\tON sft_ctg_id = idf_ctg_id\n\t\t\t\twhere sft_pos_id=? AND sft_pay_id = ?\n\t\t\t\tgroup by ctg_category_detail_en\n\t\t\t\torder by ctg_category_detail_en ASC \";\n $query = $this->db->query($sql, array($this->sft_pos_id, $this->sft_pay_id));\n\t\treturn $query;\n\n\t}", "public function sort();", "public function getSort()\n\t{\n\t\treturn 500;\n\t}", "public function byLocation(string $location);", "public function sortDirection();", "public function equipementlocationListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"EquipementLocation\");//type array\n\t}", "public function getOrd() {\n return $this->ord;\n }", "abstract public function collectorPositionDataProvider();", "public function getSort() {\n return $this->sort;\n }", "public function get_location()\n\t{\n\t\treturn $this->location;\n\t}", "public function generate_position($location)\n {\n return [\n 'country_id' => 75,\n 'location' => $location\n ];\n }", "public function getSortKey() {\n return $this->allBar->getSortKey();\n }", "function getSortOrder()\n\t{\n\t\tglobal $log;\n\t\t$log->debug(\"Entering getSortOrder() method ...\");\n\t\tif(isset($_REQUEST['sorder']))\n\t\t\t$sorder = $_REQUEST['sorder'];\n\t\telse\n\t\t\t$sorder = (($_SESSION['PRODUCTS_SORT_ORDER'] != '')?($_SESSION['PRODUCTS_SORT_ORDER']):($this->default_sort_order));\n\t\t$log->debug(\"Exiting getSortOrder() method ...\");\n\t\treturn $sorder;\n\t}", "function getSortOrder()\n\t{\n\t\tglobal $log;\n $log->debug(\"Entering getSortOrder() method ...\");\n\t\tif(isset($_REQUEST['sorder']))\n\t\t\t$sorder = $_REQUEST['sorder'];\n\t\telse\n\t\t\t$sorder = (isset($_SESSION['NOTES_SORT_ORDER'])?($_SESSION['NOTES_SORT_ORDER']):($this->default_sort_order));\n\t\t$log->debug(\"Exiting getSortOrder() method ...\");\n\t\treturn $sorder;\n\t}", "function getDistance() {\n\t\treturn $this->dist2loc;\n\t}", "function getPositionClassAttribute($classAttributeID)\n {\n \t$sortClassID = eZContentClassAttribute::fetch($classAttributeID,false,eZContentClass::VERSION_STATUS_DEFINED,array('placement'));\n return $sortClassID['placement']-1;\n }", "public static function sortables()\n {\n return ['plot_ref', 'plot_active', 'plot_percent_cultivated_land', 'plot_real_area', 'plot_start_date'];\n }", "public function determineSortPrice()\n {\n $price = $this->mcp3Project->getStringByPath('//project:Details/project:Koop/project:Prijs');\n if (!empty($price))\n return $price;\n\n $price = $this->mcp3Project->getStringByPath('//project:Details/project:Huur/project:Prijs');\n if (!empty($price))\n return $price;\n\n return 0;\n }", "public static function getPlace($location) {\n\t\t$sql = \"SELECT * FROM Buildings WHERE id = \".$location;\n\t\t$places = self::getPlaces($sql);\n\t\t$convertedPlaces = self::convertPlaces($places);\n\t\treturn $convertedPlaces;\n\t}", "abstract public function getCardOnTop(string $location): ?array;", "function getOrder();", "function getLocation();", "public function sortByPosition()\n\t{\n\t\t$sorted = array(); $result = array();\n\n\t\tforeach ($this->boxes as $key => $box)\n\t\t{\n\t\t $sorted[$key] = $box->getPosition();\n\t\t}\n\n\t\tasort($sorted);\n\n\t\tforeach (array_keys($sorted) as $key)\n\t\t{\n\t\t $sorted[$key] = $this->boxes[$key];\n\t\t}\n\n\t\t/* Reconstruction of key */\n\t\tforeach ($sorted as $box) {\n\t\t\t$results[] = $box;\n\t\t}\n\n\t\t$this->boxes = $results;\n\n\t\treturn $this;\n\t}", "function getSortOrder() { return $this->m_sortOrder; }", "public function getSortingCode(): ?string;", "function publisher_getOrderBy($sort)\r\n{\r\n if ($sort == \"datesub\") {\r\n return \"DESC\";\r\n } else if ($sort == \"counter\") {\r\n return \"DESC\";\r\n } else if ($sort == \"weight\") {\r\n return \"ASC\";\r\n }\r\n}", "function get_abook_sort() {\n global $data_dir, $username;\n\n /* get sorting order */\n if(sqgetGlobalVar('abook_sort_order', $temp, SQ_GET)) {\n $abook_sort_order = (int) $temp;\n\n if ($abook_sort_order < 0 or $abook_sort_order > 8)\n $abook_sort_order=8;\n\n setPref($data_dir, $username, 'abook_sort_order', $abook_sort_order);\n } else {\n /* get previous sorting options. default to unsorted */\n $abook_sort_order = getPref($data_dir, $username, 'abook_sort_order', 8);\n }\n\n return $abook_sort_order;\n}", "public function getLocation();", "public function getLocation();", "function MyMod_Sort_Get($sort=\"\")\n {\n if ($sort==\"\")\n {\n $sort=$this->Sort;\n $value=$this->CGI_VarValue($this->ModuleName.\"_Sort\");\n if (!empty($value))\n {\n $sort=$value;\n }\n }\n\n return $sort;\n }", "public function getSort()\n {\n return $this->sortDirection;\n }", "public function getLocation() { return $this->location; }", "public function getID()\n\t{\n\t\treturn 'Sort';\n\t}" ]
[ "0.60118204", "0.5829927", "0.57946706", "0.56985146", "0.56282604", "0.55493295", "0.55046314", "0.5494291", "0.54572004", "0.5433485", "0.5433485", "0.53832096", "0.53792804", "0.5341315", "0.5341315", "0.5341315", "0.5329976", "0.5317663", "0.5303853", "0.52960175", "0.52960175", "0.52960175", "0.529575", "0.5288268", "0.5265145", "0.5257106", "0.5248283", "0.51963", "0.51937103", "0.5157068", "0.51504076", "0.51504076", "0.5133425", "0.512267", "0.51003104", "0.5057819", "0.50562817", "0.5048954", "0.5048948", "0.50297225", "0.5023895", "0.5023895", "0.5023895", "0.5023895", "0.5023895", "0.49938822", "0.4993695", "0.49802414", "0.49706134", "0.49694827", "0.49625307", "0.4960888", "0.49395427", "0.49370462", "0.4930722", "0.49284548", "0.49148893", "0.48843732", "0.48804542", "0.48804542", "0.48786706", "0.48588133", "0.4855059", "0.48541662", "0.48456854", "0.48394683", "0.48394683", "0.48382047", "0.48286015", "0.48279986", "0.4824554", "0.48078018", "0.48005718", "0.4798578", "0.47893947", "0.47842154", "0.47791752", "0.47780305", "0.476919", "0.4761646", "0.47532785", "0.4748045", "0.47455263", "0.47275093", "0.4726298", "0.47168285", "0.47164065", "0.47149786", "0.47133085", "0.4707426", "0.47032276", "0.47020882", "0.46865642", "0.468489", "0.46683693", "0.46582112", "0.46582112", "0.46464294", "0.4637753", "0.46365047", "0.46256244" ]
0.0
-1
returns all order objects of the company's employees
public function getOrders($filter = array()) { return $this->getTable()->getOrders(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCompanyEmployees();", "public function getEmployees() {\n if ( is_null($this->_employees) ){\n $customers = $this->getTable()->getEmployees();\n $objects = new splObjectStorage();\n\n foreach ($customers AS $customer) {\n try {\n $ccust = new Yourdelivery_Model_Customer_Company($customer->customerId, $this->getId());\n if ($ccust->isDeleted()) {\n continue;\n }\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $objects->attach($ccust);\n }\n $this->_employees = $objects;\n }\n return $this->_employees;\n }", "function getAllOrders()\n {\n $dataService = new OrderDataService();\n\n return $dataService->getAllOrders();\n }", "public static function employees(Company $company): array\n {\n // number of employees in total\n $totalNumberOfEmployees = $company->employees()->notLocked()->count();\n\n // 10 random employees\n $tenRandomEmployeesCollection = collect([]);\n $allEmployees = $company->employees()\n ->notLocked()\n ->with('picture')\n ->inRandomOrder()\n ->take(10)\n ->get();\n\n foreach ($allEmployees as $employee) {\n $tenRandomEmployeesCollection->push([\n 'id' => $employee->id,\n 'name' => $employee->name,\n 'avatar' => ImageHelper::getAvatar($employee, 32),\n 'url' => route('employees.show', [\n 'company' => $company,\n 'employee' => $employee,\n ]),\n ]);\n }\n\n // ten random employees\n\n // number of employees hired in the current year\n $employeesHiredInTheCurrentYear = $company->employees()\n ->notLocked()\n ->whereYear('hired_at', (string) Carbon::now()->year)\n ->count();\n\n return [\n 'employees_hired_in_the_current_year' => $employeesHiredInTheCurrentYear,\n 'ten_random_employees' => $tenRandomEmployeesCollection,\n 'number_of_employees_left' => $totalNumberOfEmployees - $tenRandomEmployeesCollection->count(),\n 'view_all_url' => route('employees.index', [\n 'company' => $company,\n ]),\n ];\n }", "public function getAllEmployees();", "public static function getEnterpriseCompanies(){\n $result = db::get(\"SELECT uid_empresa FROM \". TABLE_EMPRESA .\" WHERE is_enterprise = 1 ORDER BY nombre\", \"*\", 0, \"empresa\");\n return new ArrayObjectList($result);\n }", "public function getAllEmployees() \n {\n $employees = Employees::getEmployees();\n\n foreach($employees as $key => $employee){\n $newArrayEmployees[$key] = $this->generateEmployeeData($employee);\n }\n\n sort($newArrayEmployees);\n\n return $newArrayEmployees;\n }", "public function getEmployees() {\n\n /* Fetch all included employee IDs */\n $employeeIDs = $this->getIncludedEmployeeIDs();\n\n\n /* Set orWhereIn variables */\n array_push($this->whereIn, [\n 'column' => 'employee_id',\n 'array' => $employeeIDs\n ]);\n }", "public static function all() {\n\n $db = Zend_Registry::get('dbAdapter');\n $result = $db->query('select id from companys')->fetchAll();\n $companys = new SplObjectStorage();\n foreach ($result as $c) {\n try {\n $company = new Yourdelivery_Model_Company($c['id']);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n $companys->attach($company);\n }\n return $companys;\n }", "public static function getOrders()\n\t{\n $orders = DB::query(\"SELECT orderproducts.*, products.strName, products.strDescription, products.strFeatures, products.price, products.category_id, products.status_id, orders.totalAmount, orders.date, inventoryproducts.name AS inventoryproductsname\n FROM orderproducts\n LEFT JOIN orders ON orderproducts.orderId=orders.id\n LEFT JOIN products ON orderproducts.productId=products.id\n LEFT JOIN inventoryproducts ON products.inventoryproductsId=inventoryproducts.id\");\n\n // acting as a factory\n // empty array to avoid errors when nothing was found\n\t\t$ordersArray = array();\n\t\tforeach($orders as $order)\n\t\t{\n\t\t\t// create an instance / object for this SPECIFIC \n\t\t\t$ordersArray[] = new OrdersAdmin($order); // put this object onto the array\n }\n\t\t// return the list of objects\n\t\t//return $ordersArray;\n }", "public function GetAllOrders() {\n return $this->orderManager->GetAllOrders();\n }", "function exeGetAllEmployees() {\n $exeGetAllEmployees = $this->db->query(\"SELECT *\n FROM employees\n WHERE status >= 0\n ORDER BY firstname ASC, lastname ASC\");\n \n return $exeGetAllEmployees->result_array();\n }", "public function findAllOrders()\n {\n return $this->createQueryBuilder('o')\n ->orderBy('o.createdDate' , 'DESC');\n }", "public function selectAll() {\r\n $query = \"SELECT * FROM \" . EmpleoDAO::EMPLEO_TABLE;\r\n $result = mysqli_query($this->conn, $query);\r\n $empleos = array();\r\n while ($empleoBD = mysqli_fetch_array($result)) {\r\n\r\n $empleo = new Empleo();\r\n $empleo->setId($empleoBD[\"idJob\"]);\r\n $empleo->setPosition($empleoBD[\"position\"]);\r\n $empleo->setCompany($empleoBD[\"company\"]);\r\n $empleo->setLogo($empleoBD[\"logo\"]);\r\n $empleo->setDescription($empleoBD[\"description\"]);\r\n $empleo->setSalary($empleoBD[\"salary\"]);\r\n\r\n array_push($empleos, $empleo);\r\n }\r\n return $empleos;\r\n }", "public static function DisplayAll() {\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM employees \";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees;\n\t\t}", "public function getAllEmp(){\n\t\t$sql = \"SELECT * FROM empreendimento;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function getAllEmployees() {\n\t\t$em = $this->getEntityManager();\n\t\t$employees = $em->createQueryBuilder()\n\t\t\t->select('e.employeeID,e.userName')\n\t\t\t->from('Employee', 'e')\n\t\t\t->orderBy('e.employeeID')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"employees\" => $employees\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public function orders() {\n if ($this->orders != null)\n return $this->orders;\n $ids = Pdb::fetchAll('small_order', self::$table);\n return $this->orders = safe_array_map(function ($id) { return new Order($id); }, $ids); // no paging here\n }", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "public static function FilterByEmployees() {\n\t\t\t\n\t\t\t$sql = \"SELECT Code,Employee_Name FROM employees\";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees1 = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees1[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees1;\n\t\t}", "public function getEmployees()\n {\n return $this->hasMany(Employee::className(), ['Emp_tumbol' => 'id']);\n }", "public static function getList(){\n return DB::table('employees')->get();\n }", "public function getEmployee()\n\t{\n\t\t$arr = $this->queryToDbObj->getEmployeeList();\n\n\t\treturn $arr;\n\t}", "protected function getAllOrders()\n {\n return Order::withTrashed()\n ->with(['address', 'user'])\n ->orderBy('id', 'DESC')\n ->get();\n }", "function admin_get_all_orders(){\n\t //$orders = $this->Order->find('all');\n\t $this->paginate = array('limit' => 10, 'order' => 'Order.od_date DESC');\n\t \n\t $this->set('orders', $this->paginate());\n\t \n\t \n\t if(!empty($this->data)){\n\t $this->Order->id = $this->data['Order']['id'];\n\t $this->Order->saveField('od_status', $this->data['Order']['od_status']);\n\t \n\t $result = $this->Order->get_ordered_items($this->data['Order']['id']);\n\t \n\t\t//enviar el correo electronico de la situacion\n\t $this->set('orderedProducts',$result);\n\t $this->set('status', $this->data['Order']['od_status']);\n\t $this->MyEmail->sendOrderStatusEmail($this->data['Order']['od_payment_email']);\n\t $this->redirect($this->referer());\n\t } \n\t}", "public function getAllOfficeEmployers();", "public function order(){\n\t\treturn $this->hasMany('App\\order','employee_id','id');\n\t}", "public function getOrders(){\n if ( is_null($this->orders) ){\n $db = $this->getTable()->getAdapter();\n $sid = $this->getCourier()->getId();\n\n //get all orders of courier service\n $sql = sprintf(\"select id from orders\n where (billCourier=0 or billCourier is NULL)\n and courierId = %d\",$sid);\n \n $rows = $db->fetchAll($sql);\n $orders = new SplObjectStorage();\n foreach($rows as $o){\n try{\n $order = new Yourdelivery_Model_Order($o['id']);\n\n if ( $order->getMode() == \"great\" && $order->getState() != 2 &&\n //check for great which do not provide pfand\n //kreiner, gela\n !in_array($order->getCourier()->getId(),array(12123,12115)) ){\n continue;\n }\n\n if ( $order->getState() < 0 ){\n continue;\n }\n\n if ( $order->getDeliverTime() > $this->until ){\n continue;\n }\n\n $orders->attach($order);\n }\n catch ( Yourdelivery_Exception_Database_Inconsistency $e ){\n\n }\n }\n $this->orders = $orders;\n }\n return $this->orders;\n }", "public function allCompanies()\n {\n return Company::all();\n }", "public function employees()\n {\n $response = $this->client->get('employees');\n\n return collect($response->json('collection'))->mapInto(Employee::class);\n }", "public function getAllEmployers();", "public function getOpenOrders(): array;", "static function getAllCustomerWithOrders(){\r\n\t\tglobal $DB;\r\n\t\t$retval = Array();\r\n\t\t\r\n\t\t$sql = \"SELECT DISTINCT personalization_orders.customerid FROM personalization_orders WHERE `status` >= 1 AND orderdate > 0\";\r\n\r\n\t\tif($DB->num_rows($sql)){\r\n\t\t\tforeach($DB->select($sql) as $r){ \r\n\t\t\t\t$retval[] = new BusinessContact($r[\"customerid\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "public function getAllOwnOrders() {\n\n $query = $this->db->prepare(\"SELECT * FROM `orders` WHERE `order_partner_id` = 28\");\n\n try {\n\n $query->execute();\n\n $result = $query->fetchAll();\n return $result;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function get_employees() {\n\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->uri->segment(4);\n\t\t\n\t\t$data = array(\n\t\t\t'company_id' => $id\n\t\t\t);\n\t\t$session = $this->session->userdata('username');\n\t\tif(!empty($session)){ \n\t\t\t$this->load->view(\"admin/events/get_employees\", $data);\n\t\t} else {\n\t\t\tredirect('admin/');\n\t\t}\n\t\t// Datatables Variables\n\t\t$draw = intval($this->input->get(\"draw\"));\n\t\t$start = intval($this->input->get(\"start\"));\n\t\t$length = intval($this->input->get(\"length\"));\n\t }", "private function GetOrders()\n\t{\t$orders = array();\n\t\t$where = array();\n\t\t\n\t\tif ($this->startdate)\n\t\t{\t$where[] = 'orderdate>=\"' . $this->startdate . ' 00:00:00\"';\n\t\t}\n\t\tif ($this->enddate)\n\t\t{\t$where[] = 'orderdate<=\"' . $this->enddate . ' 23:59:59\"';\n\t\t}\n\t\tif (!$this->showunpaid)\n\t\t{\t$where[] = 'NOT paiddate=\"0000-00-00 00:00:00\"';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT * FROM storeorders';\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' ORDER BY orderdate DESC';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$orders[$row['id']] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $orders;\n\t}", "public function findAllEmployeesAsArray()\n {\n return $this->createQueryBuilder('e')\n ->getQuery()\n ->getArrayResult();\n\n }", "public function get_employees() {\n\n\t\t$data['title'] = $this->Xin_model->site_title();\n\t\t$id = $this->uri->segment(4);\n\t\t\n\t\t$data = array(\n\t\t\t'company_id' => $id\n\t\t\t);\n\t\t$session = $this->session->userdata('username');\n\t\tif(!empty($session)){ \n\t\t\t$this->load->view(\"admin/assets/get_employees\", $data);\n\t\t} else {\n\t\t\tredirect('admin/');\n\t\t}\n\t\t// Datatables Variables\n\t\t$draw = intval($this->input->get(\"draw\"));\n\t\t$start = intval($this->input->get(\"start\"));\n\t\t$length = intval($this->input->get(\"length\"));\n\t }", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "public function Employees()\n {\n $this->_Employees->ClearAllOptions();\n return $this->_Employees;\n }", "public function allOrders()\n\t{\n\t\trequire 'Database.php';\n\n\t\t$req = $db->prepare(\"SELECT lol_server,lol_summoner,lol_account,lol_password,order_id, order_queue, order_boost, order_type, order_wins, start_league, start_division, desired_league, desired_division, order_date, DATE_FORMAT(order_date, '%d/%m/%Y') AS date, order_price, order_status, order_pause FROM orders WHERE user_id = ? ORDER BY order_status\");\n\t\t$req->execute(array($_SESSION['id']));\n\n\t\treturn $req->fetchAll();\n\t}", "public function getAdmins() {\n $a = new SplObjectStorage();\n $admins = $this->getTable()->getAdmins();\n foreach ($admins as $admin) {\n try {\n $customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId());\n $a->attach($customer);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n }\n return $a;\n }", "public static function getEmployees($conn) {\r\n\r\n \r\n // set static database connection\r\n $dbc = $conn->getdbc();\r\n\r\n // for now (or permanently) directly include SQL here\r\n $sql_showEmployees = \"SELECT * FROM employees\";\r\n\r\n\r\n if ($result = $dbc->query($sql_showEmployees)) {\r\n\r\n $employees = [];\r\n\r\n while ($row = $result->fetch()) {\r\n\r\n $employees[] = Employee::create($conn, $row['id'], $row['fname'], $row['lname'], $row['email']);\r\n }\r\n // return users array\r\n return $employees;\r\n } else {\r\n\r\n echo \"<p> Could not run query </p>\";\r\n }\r\n }", "public function actionOrders(){\n\t\t$orders = $this->_getOrderModel()->getAllOrder();\n\t\t\n\t\t$viewParams = array(\n\t\t\t'orders' => $orders\n\t\t);\n\t\t\n\t\treturn $this -> responseView('DTUI_ViewPublic_EntryPoint_Orders','dtui_order_list',$viewParams);\n\t}", "public function Orders()\n {\n return $this->getOrders();\n }", "public static function vehicles_employees_crits(){\n\t\treturn array('(company_name'=>CRM_ContactsCommon::get_main_company(),'|related_companies'=>array(CRM_ContactsCommon::get_main_company()));\n }", "public function employees()\n {\n return $this->users->where('account_type', 'Employee');\n }", "public function getOrders()\n {\n return $this->hasMany(Order::className(), ['customer_id' => 'id']);\n }", "public function orders()\n {\n return $this->morphMany(Checkout::orderModel(), 'customer');\n }", "public function GetAllEmployees()\r\n\t{\t\r\n\t\t$WhereCondition = \"\";\r\n\t\t$query = $this->db->query(\" \t\r\n\t\t\t\t\t\t\t\t\tSELECT * FROM `tbl_user`\r\n\t\t\t\t\t\t\t\t\tWHERE user_designation_id = 3\r\n\t\t\t\t\t\t\t\t\t$WhereCondition\r\n\t\t\t\t\t\t\t\t\tORDER BY user_name\r\n\t\t\t\t\t\t\t\t\");\r\n\t\t$result = $query->result_array();\t\t\t\r\n\t\treturn $result;\r\n\t}", "public function companies(): Collection\n {\n return Company::all();\n }", "function fetchAllOrders()\n\t{\n\t\t$sql = \"SELECT o.booking_id,o.journey_id,o.booking_time,o.email, o.amount, r.route_name, o.order_status, j.departure_date, j.departure_time, j.vehicle_reg,j.route_id, j.driver_id, j.conductor_id, b.color,b.model,b.coach,b.no_of_seats,r.start_point, r.end_point, r.distance,r.duration, j.driver_name,j.conductor_name,b.imgurl,b.normal_seats,b.vip_seats FROM booking as o, journey as j, route as r, bus as b WHERE j.journey_id = o.journey_id AND j.route_id = r.route_id AND j.vehicle_reg = b.registration AND j.route_id = r.route_id\";\n\t\t$result = $this->conn->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$orders[] = new Order($row['booking_id'], $row['journey_id'], $row['booking_time'], $row['email'],\n\t\t\t\t\t$row['amount'], $row['route_name'], $row['order_status'],$row['departure_date'],\n\t\t\t\t\t$row['departure_time'],$row['vehicle_reg'],$row['route_id'],$row['driver_id'],$row['conductor_id'],\n\t\t\t\t\t$row['color'],$row['model'],$row['coach'],$row['no_of_seats'],$row['start_point'],$row['end_point'],\n\t\t\t\t\t$row['distance'],$row['duration'],$row['driver_name'],$row['conductor_name'],$row['imgurl'],$row['normal_seats'],$row['vip_seats']\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $orders;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "public function index()\n {\n return Api_Employees::all()->toArray(); \n }", "function getAll( $OrderBy = \"ID\", $LimitStart = \"None\", $LimitBy = \"None\" )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n switch ( strtolower( $OrderBy ) )\r\n {\r\n case \"description\":\r\n case \"desc\":\r\n $OrderBy = \"ORDER BY Description\";\r\n break;\r\n case \"name\":\r\n $OrderBy = \"ORDER BY Name\";\r\n break;\r\n case \"parentid\":\r\n case \"pid\":\r\n $OrderBy = \"ORDER BY ParentID\";\r\n break;\r\n case \"id\":\r\n case \"typeid\":\r\n $OrderBy = \"ORDER BY ID\";\r\n break;\r\n default:\r\n $OrderBy = \"ORDER BY ID\";\r\n break;\r\n }\r\n\r\n if ( is_numeric( $LimitStart ) )\r\n {\r\n $LimitArray = array( \"Offset\" => $LimitStart );\r\n\r\n if ( is_numeric( $LimitBy ) )\r\n {\r\n $LimitArray =& array_merge( $LimitArray, array( \"Limit\" => $LimitBy ) );\r\n }\r\n }\r\n else\r\n {\r\n $LimitArray = array();\r\n }\r\n\r\n $company_type_array = array();\r\n $return_array = array();\r\n\r\n\r\n $db->array_query( $company_type_array, \"SELECT ID FROM eZContact_CompanyType $OrderBy\", $LimitClause );\r\n\r\n foreach ( $company_type_array as $companyTypeItem )\r\n {\r\n $return_array[] = new eZCompanyType( $companyTypeItem[ $db->fieldName( \"ID\" ) ] );\r\n }\r\n return $return_array;\r\n }", "function getEmployees($crewName) {\r\n\t\tglobal $databaseName;\r\n\t\tglobal $timesheetDate;\r\n\t\tglobal $builder;\r\n\t\tglobal $subdivision;\r\n\t\tglobal $lot;\r\n\t\tglobal $action;\r\n\t\t$employeesArr = array();\r\n\t\t\r\n\t\t$timesheetDateTS = strtotime($timesheetDate);\r\n\t\tif($timesheetDateTS > 0) {\r\n\t\t\t$date = date('m/d/y', $timesheetDateTS);\r\n\t\t}\r\n\r\n\t\t// Get Forman employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_forman`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\tarray_push($employeesArr, $employee);\r\n\t\t}\r\n\t\t\r\n\t\t// Get Mason employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_mason`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Apprentice employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_apprentice`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Apprentice employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_labor`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Driver employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_driver`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Get Operator employees.\r\n\t\t$sql = \"select * from \" . $databaseName . \".employees where `crew_name`='\" . $crewName . \"' and `is_operator`='1'\";\r\n\t\t$records = mysqli_query($this->con, $sql);\r\n\t\t\r\n\t\t// Get Employees from DB.\r\n\t\twhile($rows = mysqli_fetch_array($records)) {\r\n\t\t\t$employee = new Employee();\r\n\t\t\t$employeeName = trim($rows['first']) . \" \" . trim($rows['last']);\r\n\t\t\t$employee->setName($employeeName);\r\n\t\t\t$employee->setWage($rows['wage']);\r\n\t\t\t\r\n\t\t\tif(!in_array($employee, $employeesArr)) {\r\n\t\t\t\tarray_push($employeesArr, $employee);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $employeesArr;\r\n\t}", "public function getOrders()\n {\n $response = $this->orderDesk->get( \"orders\" );\n $orders = $response[ \"orders\" ];\n $values = [];\n\n if (!empty($orders)) {\n foreach ( $orders as $order ) {\n\n $value = [\n $order[\"shipping\"][\"first_name\"],\n $order[\"shipping\"][\"last_name\"],\n $order[\"email\"],\n $order[\"shipping_method\"],\n $order[\"payment_type\"],\n $order[\"order_total\"]\n ];\n \n array_push( $values, $value );\n }\n \n $this->updateGoogleSheets( $values );\n } else {\n return $response['message'];\n }\n }", "function getAllEmpleadosDatos()\n\t\t\t{\n\t\t\t\t$request=\"SELECT `Id_Empleado` FROM `empleados` WHERE 1\";\n\t\t\t\t$result=$this->query->consulta($request);\n\t\t\t\t$empleadosIds=array();\n\t\t\t\t$empleadosDatos=array();\n\t\t\t\tif ($result->num_rows > 0) {\n\t\t\t \n\t\t\t\t while($datos = $result->fetch_assoc()) {\n\n\t\t\t\t array_push($empleadosIds,$datos[\"Id_Empleado\"]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\tforeach ($empleadosIds as $id_empleado) {\n\t\t\t\t\t\n\t\t\t\t\t$empleado_temp=new Empleado();\n\t\t\t\t\t$empleado_temp->obtenerDatosId($id_empleado);\n\t\t\t\t\tarray_push($empleadosDatos,$empleado_temp->getAllDatos2());\n\n\t\t\t\t}\n\n\t\t\t\treturn $empleadosDatos; \n\t\t\t}", "function get_all_employees($terms = null ){\n\t\tif(!is_null($terms)){\n\t\t\t$sql = \"SELECT *\n\t\t\tFROM employees\n\t\t\tWHERE employee_name LIKE '$terms%' \";\n\t\t\tif(is_numeric($terms)){\n\t\t\t$sql = \"SELECT *\n\t\t\tFROM employees\n\t\t\t\tWHERE employee_id = '$terms' \";\n\t\t\t}\n\t\t\t$query = $this->db->query($sql);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t$query = $this->db->get('employees');\n\t\t}\n\t\treturn $query->result();\n\t\t\n\t}", "public function getOrders()\n {\n return $this->orders;\n }", "public function getCompaniesToSuspend() {\n return $this->createQuery('c')\n ->select('c.*')\n ->from('Companies_Model_Company c')\n ->where('c.status = ?', Companies_Model_Company::STATUS_EXPIRED)\n ->addWhere('c.payment_date IS NOT NULL AND ADDDATE(c.payment_date, 8) < NOW()')\n ->execute();\n }", "public function getOrderings() {}", "public function getOrders()\n {\n $result = array();\n\n if (!empty(\\XLite\\Core\\Request::getInstance()->order_ids)) {\n $orderIds = explode(',', \\XLite\\Core\\Request::getInstance()->order_ids);\n\n foreach ($orderIds as $orderId) {\n $orderId = trim($orderId);\n $order = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Order')->find(intval($orderId));\n if ($order) {\n $result[] = $order;\n }\n }\n\n } else {\n $result[] = $this->getOrder();\n }\n\n return $result;\n }", "function show_orders() {\n\n\t\t$connection = new MySQLDataSource();\n $connection->connect($GLOBALS['db']['default']['hostname'],\n $GLOBALS['db']['default']['username'],\n $GLOBALS['db']['default']['password'],\n $GLOBALS['db']['default']['database']);\n\t\t$query = \"SELECT * FROM orders ORDER BY date;\";\n\t\t$connection->execute_query($query);\n\t\t$row = $connection->next();\n\t\t$i = 0;\n\n\t\tif(!$row) {\n\n\t\t\t$connection->disconnect();\n\t\t\treturn false;\n\n\t\t} else {\n\n\t\t\twhile($row) {\n\n\t\t\t\t$orders[$i] = new Order();\n\t\t\t\t$orders[$i]->setIdOrder($row->id_order);\n\t\t\t\t$orders[$i]->setDate($row->date);\n\t\t\t\t$orders[$i]->setIdCustomer($row->id_customer);\n\t\t\t\t$orders[$i]->setAmount($row->amount);\n\t\t\t\t$row = $connection->next();\n\t\t\t\t$i++;\n\n\t\t\t}\n\n\t\t\t$connection->disconnect();\n\t\t\treturn $orders;\n\n\t\t}\n\t}", "public function getAllOrdersInBasket() {\n\n $basketUser = $this->getBasketUserFromAuth();\n\n $basketDetailModel = new Application_Model_BasketDetail();\n\n $result = $basketDetailModel->getAllOrdersInBasket($basketUser);\n\n return $result;\n }", "public function allCompanies()\n {\n\n $companies = $this->core_companies;\n\n $items = [];\n foreach ($companies as $company) {\n\n $companyItem = new CompanyCardItem();\n $companyItem->id = $company->id;\n $companyItem->name = $company->name;\n //$companyItem->amount = $catalog->amount;\n $companyItem->title = $company->title;\n if (\\Dash\\count($company->photo))\n $companyItem->image = '/uploaz/eyuf/UserCompany/photo/' . $company->id . '/' . $company->photo[0];\n $companyItem->url = ZUrl::to([\n 'customer/markets/show',\n 'id' => $company->id\n ]);\n $companyItem->distence = \"12km\";\n //$companyItem->image = $catalog->price;\n //$companyItem->price = $catalog->price_old;\n //$companyItem->currency = \"$\";\n //$companyItem->cart_amount = 0;\n\n $items[] = $companyItem;\n }\n return $items;\n }", "public function listAllEmployees()\n {\n foreach (Employee::all() as $employee) {\n $response[] = new EmployeeResource($employee);\n }\n return $this->responseSuccess(['employees' => $response]);\n }", "function getAllOrders(){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `order`');\n\t\t$sth \t-> execute();\n\t\treturn \t$sth;\n\t}", "private function getCustomerOrders()\n {\n $order = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\\Magento\\Sales\\Model\\OrderFactory::class);\n $orderCollection = $order->create()->getCollection()->addFieldToFilter(\n 'customer_id', $this->getCustomerId()\n )->addFieldToFilter(\n 'status', \\Magento\\Sales\\Model\\Order::STATE_COMPLETE\n );\n return $orderCollection;\n }", "public function index()\n {\n $employees = Employee::with('company')->paginate(10);\n // dd($employees);\n return view('admin.employee.index',compact('employees',$employees));\n }", "public function getAll(Libs\\RequestHandler $requestHandler) {\n $orderService = Factories\\OrderServiceFactory::create($GLOBALS['config']);\n $result = $orderService->getAll();\n $requestHandler->respondSuccess($result);\n }", "public function index()\n {\n // get all orders\n $orders = Order::all();\n\n return $orders;\n }", "function getOrderings() ;", "public function AllOpen_Orders_get() {\n extract($_GET);\n $result = $this->feeds_model->AllOpen_Orders();\n return $this->response($result);\n }", "public function getEmployeesByName(Request $request) \n {\n $employees = Employees::getEmployeesByName($request->input('name'));\n\n $newArrayEmployees = [];\n foreach($employees as $key => $employee){\n $newArrayEmployees[$key] = $this->generateEmployeeData($employee);\n }\n\n sort($newArrayEmployees);\n\n return $newArrayEmployees;\n }", "private function listEmployee()\n\t{\n\t\t$employees = $this->employee->getEmployee();\n\t\t$cnt = 1;\n\t\tforeach($employees as $key => $val)\n\t\t{\n\t\t\t$arr = array('CNT' => $cnt,\n\t\t\t\t\t\t 'EMPLOYEE_NAME' => $val['name_employee'],\n\t\t\t\t\t\t 'EMPLOYEE_ID' => $val['id_employee'],\n\t\t\t\t\t\t 'EMPLOYEE_MAIL' => $val['mail_employee']);\n\t\t\t$cnt ++;\n\t\t\t$this->view->addToReplace($arr);\n\t\t\t$this->arrRender['LISTEMPLOYEES'] .= $this->view->\n\t\t\tsetTemplateFile('employeeslist')->renderFile();\n\t\t}\n\t}", "public function getEmployees() { // gets all employees who have the responsability of dealing with visitor comments\n $db = Database::getDB();\n $query = 'SELECT * FROM planners WHERE employeeID < 5\n ORDER BY employeeID';\n $statement = $db->prepare($query);\n $statement->execute();\n \n $employees = array();\n foreach ($statement as $row) {\n $employee = new Employee($row['employeeID'],$row['fname']);\n $employees[] = $employee;\n }\n return $employees;\n }", "public function employees() {\n return $this->hasMany(Employee::class);\n }", "public function employees()\n {\n return $this->hasMany(Employee::class);\n }", "public static function getEmployee()\n {\n $employees = Employee::select('id', 'name')\n ->where('owner_id', auth_cache()->userable->id)\n ->whereDoesntHave('roles')\n ->get();\n\n return response()->json($employees);\n }", "public function getOrders() : \\TheCodingMachine\\TDBM\\AlterableResultIterator\n {\n return $this->retrieveManyToOneRelationshipsStorage('orders', 'from__product_id__to__table__products__columns__id', ['orders.product_id' => $this->get('id', 'products')]);\n }", "public function getOrderList()\n {\n }", "public function index()\n {\n $employees = Employee::with('company')->paginate(10);\n\n return view('adminlte::employees.employees', compact('employees'));\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public static function allEmployeesEmail($companyId = null) {\n if (is_null($companyId)) {\n return array();\n }\n\n $db = Zend_Registry::get('dbAdapter');\n return $db->query('select c.email from customers c inner join customer_company cc on c.id=cc.customerId where c.deleted=0 and cc.companyId=' . $companyId . ' order by c.email')->fetchAll();\n }", "public function all() : Collection\n {\n return Order::all();\n }", "public function AllOrders_get() {\n extract($_GET);\n $result = $this->feeds_model->AllOrders($per_page, $offset);\n return $this->response($result);\n }", "public function getCompaniesReport() : CompaniesReport\n\t{\n\t\t$response = $this->execute('Empresa');\n\t\t\n\t\t$companiesByArea = [];\n\t\tforeach($response['e'] as $areaPool){\n\t\t\t$i = $areaPool['a'];\n\t\t\tforeach($areaPool['e'] as $company){\n\t\t\t\t$companiesByArea[$i][]=new Company(\n\t\t\t\t\t$company['a'],\n\t\t\t\t\t$company['c'],\n\t\t\t\t\t$company['n']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn new CompaniesReport($response['hr'],$companiesByArea);\n\t}", "public function getOrderings();", "public function getCompanyWithUsers();", "public static function allPurchaseOrders()\n {\n try {\n $result = JasminConnect::callJasmin('/purchases/orders');\n } catch (Exception $e) {\n return $e->getMessage();\n }\n\n $purchaseOrders = array();\n\n foreach(json_decode($result->getBody(), true) as $order) {\n if($order['documentStatus'] === 1) {\n $purchaseOrder = [\n 'sort_key' => substr($order['naturalKey'], '9'),\n 'id' => str_replace('.', '-', $order['naturalKey']),\n 'owner' => $order['sellerSupplierParty'],\n 'date' => substr($order['documentDate'], 0, 10),\n 'items' => []\n ];\n\n foreach ($order['documentLines'] as $product) {\n array_push($purchaseOrder['items'], [\n 'id' => $product['purchasesItem'],\n 'description' => $product['description'],\n 'quantity' => $product['quantity'],\n 'stock' => Products::getProductStock($product['purchasesItem']),\n 'zone' => Products::getProductWarehouseSection($product['purchasesItem'])\n ]);\n }\n\n array_push($purchaseOrders, $purchaseOrder);\n }\n }\n\n // Array sorting in ascending order\n usort($purchaseOrders, function ($a, $b) {return $a['sort_key'] > $b['sort_key'];});\n\n return $purchaseOrders;\n }", "public function returnAllOpenOrders(): array\n {\n $openOrders = [];\n foreach ($this->request('returnOpenOrders', ['currencyPair' => 'all']) as $pair => $orders) {\n if (is_array($orders)) {\n foreach ($orders as $openOrder) {\n $openOrders[$pair][] = $this->factory(OpenOrder::class, $openOrder);\n }\n }\n }\n\n return $openOrders;\n }", "static function getAll($order = \"_default_order\") {\n $CI = get_instance();\n $classname = get_called_class();\n eval('$object = new ' . $classname . '();');\n $CI->db->order_by($order == \"_default_order\" ? $object->_default_order() : $order);\n $result = $CI->db->get($object->_tablename())->result();\n $array = array();\n foreach ($result as $value) {\n eval('$array[] = new ' . $classname . '($value);');\n }\n return $array;\n }", "public function findAll()\r\n {\r\n $sql = \"select * from tb_employer where employerid <> 1 order by employerid asc\";\r\n $statement = $this->commonPDO->query($sql);\r\n return $statement->fetchAll();\r\n }", "public function orders()\r\n {\r\n return $this->hasMany('Syscover\\Market\\Models\\Order', 'customer_id');\r\n }", "public function index()\n {\n //$employees = \\DB::table('employees')->orderBy('id', 'desc')->paginate(10);\n $employees = Employee::with('Company')->get();\n\n //dd($employees->toArray());\n return view('employee.index',['employees'=>$employees->toArray()]);\n }", "public function listeEmployee(){\n\t\t\t\t\t $sql = \"SELECT * FROM employee\";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "public function getChainsWithCompany(empresa $company)\n {\n $cacheString = \"chains-from-{$this}-to-{$company}\";\n\n if (($state = $this->cache->getData($cacheString)) !== null) {\n $chainsList = $state;\n } else {\n $startList = $this->getStartIntList();\n if (count($startList) === 0) {\n return false;\n }\n\n $startComaList = $startList->toComaList();\n $companyUid = $company->getUID();\n\n $employees = TABLE_EMPLEADO . \"_empresa\";\n $count = \"SELECT count(uid_empleado)\n FROM {$employees} e\n WHERE e.uid_empresa = ej.uid_empresa\n \";\n\n $hierarchy = TABLE_EMPRESA .\"_jerarquia\";\n\n $sql = \"SELECT n1, n2, n3, n4\n FROM {$hierarchy} ej\n WHERE n1 IN ({$startComaList})\n AND (\n (n2 = {$companyUid})\n OR (n3 = {$companyUid})\n OR (n4 = {$companyUid})\n )\n ORDER BY ({$count}) DESC\n LIMIT 30\n \";\n\n $chainsList = $this->db->query($sql, true);\n // set here cache in order to get better readability\n $this->cache->addData($cacheString, $chainsList);\n }\n\n $chains = new ArrayObjectList;\n\n foreach ($chainsList as $chainIDS) {\n $chain = new ArrayObjectList;\n foreach ($chainIDS as $nodeID) {\n if ($nodeID && is_numeric($nodeID)) {\n $node = new empresa($nodeID);\n $chain[] = $node;\n }\n }\n\n if (count($chain)) {\n $chains[] = $chain;\n }\n }\n\n return $chains;\n }", "public function getAllEntities();", "public function getOwnerCompanies () {\n\t\t\tif (count($this) === 0) return new ArrayObjectList;\n\n\t\t\t$db \t\t= db::singleton();\n\t\t\t$table \t\t= TABLE_DOCUMENTOS_ELEMENTOS . \" INNER JOIN \". TABLE_DOCUMENTO_ATRIBUTO . \" USING (uid_documento_atributo)\";\n\t\t\t$set \t\t= $this->toComaList();\n\t\t\t$SQL \t\t= \"SELECT uid_empresa_propietaria FROM {$table} WHERE uid_documento_elemento IN ({$set}) GROUP BY uid_empresa_propietaria\";\n\t\t\t$collection\t= $db->query($SQL, '*', 0, \"empresa\");\n\n\n\t\t\treturn new ArrayObjectList($collection);\n\t\t}", "protected function getOrders()\n {\n \\Rakuten\\Connector\\Resources\\Log\\Logger::info('Processing initialize in getOrders in Batch.');\n $resource = Mage::getSingleton('core/resource');\n $write = $resource->getConnection('core_write');\n $order = $resource->getTableName('sales/order');\n $rakutenOrder = $resource->getTableName('rakuten_rakutenlogistics/order');\n $payment = $resource->getTableName('sales/order_payment');\n\n $select = $write->select()\n ->from(['order' => $order], ['entity_id', 'increment_id', 'customer_firstname', 'customer_lastname', 'state', 'created_at'])\n ->join(['payment' => $payment], 'order.entity_id = payment.entity_id', ['additional_information'])\n ->join(['rakutenOrder' => $rakutenOrder], 'order.entity_id = rakutenOrder.order_id', ['calculation_code', 'order_id'])\n ->where('DATEDIFF(NOW(), order.created_at) <= ?', $this->days)\n ->where('order.state = ?', Mage_Sales_Model_Order::STATE_PROCESSING);\n\n $data = $write->fetchAll($select);\n foreach ($data as $key => $item) {\n if (!$item['calculation_code']) {\n continue;\n }\n if (!$this->hasBatchCode($item['additional_information'])) {\n $this->orders[$key]['orderId'] = $item['order_id'];\n $this->orders[$key]['incrementId'] = $item['increment_id'];\n $this->orders[$key]['status'] = $item['state'];\n $this->orders[$key]['billingName'] = $item['customer_firstname'] . ' ' . $item['customer_lastname'];\n $createdAt = new \\DateTime($item['created_at']);\n $this->orders[$key]['createdAt'] = $createdAt->format('d/m/Y H:m:s');\n $this->orders[$key]['calculationCode'] = $item['calculation_code'];\n }\n }\n if (count($this->orders)) {\n $this->orders = array_values($this->orders);\n }\n }" ]
[ "0.75963193", "0.7502415", "0.66931903", "0.66750634", "0.6669356", "0.6622108", "0.6490672", "0.6463409", "0.64028865", "0.63498855", "0.6339747", "0.6270077", "0.62434006", "0.6220143", "0.6166198", "0.61648166", "0.6152638", "0.61492527", "0.6114754", "0.6103403", "0.6097917", "0.60958105", "0.606457", "0.60198927", "0.6006107", "0.59861994", "0.5985896", "0.5962842", "0.5961785", "0.59385616", "0.59126997", "0.5901597", "0.5882015", "0.58710855", "0.5864968", "0.5857395", "0.58547205", "0.583299", "0.58272696", "0.5820191", "0.58054054", "0.58021784", "0.57861894", "0.57828194", "0.57636803", "0.57598275", "0.5758494", "0.57336473", "0.5727247", "0.5723536", "0.5715675", "0.56986934", "0.56967276", "0.5688811", "0.5685644", "0.567924", "0.5676745", "0.5674266", "0.56392246", "0.56358325", "0.5628838", "0.56283003", "0.56142926", "0.5613503", "0.56125015", "0.56094646", "0.560327", "0.5593268", "0.55878067", "0.55834144", "0.557221", "0.55675", "0.55653423", "0.55574626", "0.5557019", "0.5554602", "0.5553136", "0.55502194", "0.55481076", "0.55455226", "0.55409104", "0.55346", "0.5532063", "0.55283463", "0.552832", "0.55211264", "0.5521109", "0.5518515", "0.5509962", "0.5507787", "0.55036885", "0.5499214", "0.5493712", "0.54892594", "0.5482004", "0.5476876", "0.54667443", "0.5464762", "0.54637676", "0.54614586" ]
0.5731795
48
get restaurants, having restriction on this company any company assigned to restaurant is only allowed to order
public function getRestaurantRestrictions() { return $this->getTable()->getRestaurantRestrictions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNotApprovedRestaurants() {\n\t\t$query = \"SELECT * FROM restaurant WHERE approved = 1\";\n\t\t$rest_list;\n\t\t$result = $this->mysqli->query($query);\n\t\t$i = 0;\n\t\twhile ($row = $result->fetch_object()) {\n\t\t\t$restaurant = new Restaurant();\n\t\t\t$restaurant->setId($row->id);\n\t\t\t$restaurant->setName($row->name);\n\t\t\t$restaurant->setLatitude($row->latitude);\n\t\t\t$restaurant->setLongitude($row->longitude);\n\t\t\t$restaurant->setWebsite($row->website);\n\t\t\t$restaurant->setCity($row->city);\n\t\t\t$restaurant->setFax($row->fax);\n\t\t\t$restaurant->setHas_breakfast($row->hasbreakfast);\n\t\t\t$restaurant->setHas_dinner($row->hasdinner);\n\t\t\t$restaurant->setHas_lunch($row->haslunch);\n\t\t\t$restaurant->setHittaURL($row->hittaURL);\n\t\t\t$restaurant->setMail_city($row->mailcity);\n\t\t\t$restaurant->setPhone($row->phone);\n\t\t\t$restaurant->setStreet($row->street);\n\t\t\t$restaurant->setType($row->type_name);\n\t\t\t$restaurant->setZip($row->zipcode);\n\t\t\t$rest_list[$i];\n\t\t\t$i++;\n\t\t}\n\t\treturn $rest_list;\n\t}", "public function getRestaurants(){\n \n $result = self::where([\n \"status\" => \"Active\"\n ])\n ->select([\"id\",\"name\",\"has_gst\"])\n ->orderBy(\"name\")\n ->get();\n \n return $result;\n }", "public function allRestaurants()\n {\n $compQuery = Company::where([\n 'active' => 1,\n 'companytype_id' => 1, // restaurants\n ])->get();\n\n $companies = new collection();\n\n foreach ($compQuery as $company) {\n $companies->push([\n 'id' => $company->id,\n 'area_id' => $company->area_id,\n 'name' => $company->name,\n 'slug' => $company->slug,\n 'rating' => intval($company->rating),\n 'description' => $company->description,\n 'address' => $company->address,\n 'image' => Front::myMediaUrl($company, 'company_image', 'banner'),\n ]);\n }\n // dd($companies);\n\n $pageConfigs = [\n 'newsletter' => true,\n 'breadcrumb' => true,\n 'title' => 'Abboda Restaurants',\n ];\n return view('pages.restaturants', [\n 'pageConfigs' => $pageConfigs,\n 'companies' => $companies->toArray(),\n ]);\n }", "private function findRestaurandsInCommon()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n\n $allRestaurantIDs = array();\n $userlist = $dbHandler->getUsers();\n\n $restaurants = $dbHandler->getRestaurants();\n foreach ($restaurants as $restaurant) {\n $allRestaurantIDs[] = $restaurant->getId();\n }\n foreach ($userlist as $user) {\n $restaurants = $user->getPreferedRestaurantIds();\n $restaurantID = array();\n foreach ($restaurants as $restaurant) {\n $restaurantID[] = $restaurant[\"Id\"];\n\n }\n $allRestaurantIDs = array_intersect($restaurantID,$allRestaurantIDs);\n }\n return $allRestaurantIDs;\n }", "function fetch_all_active_restaurants_of_user($restaurant_creator)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->where(array(\n\t\t\t\t\t\t\t'restaurant_status' => 1,\n\t\t\t\t\t\t\t'restaurant_creator' => $restaurant_creator,\n\t\t\t\t\t\t))\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "function fetch_all_restaurants_of_user($restaurant_creator)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->where(array(\n\t\t\t\t\t\t\t'restaurant_creator' => $restaurant_creator,\n\t\t\t\t\t\t))\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "public function get_target_restaurant_list () {\n\t\t$restaurantList = $this->get_param('post.restaurant_list');\n\t\t$grouponRestaurantList = $this->get_param('post.groupon_restaurant_list');\n\n\t\t$this->get_restaurant_list($restaurantList, $grouponRestaurantList);\n\t}", "public function getAllCompanyRecruitment()\n {\n return \\App\\Recruitment::getAllCompanyRecruitments(\\Auth::id());\n }", "public function afficherRestaurant(){\r\n\t\t$sql=\"SElECT * From restaurant\";\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 getRestaurantsAssociations() {\n return $this->getTable()->getRestaurantsAssociations();\n }", "public function getRestaurant()\n {\n $restaurant = Restaurant::getOneBy(array('_id' => $this->restaurant));\n return $restaurant;\n }", "public function getRecurringOrders();", "public function restaurant()\n {\n return $this->restaurant;\n }", "public function Restaurants()\n {\n return $this->belongsToMany('App\\Model\\Restaurants', 'restaurant_cuisines', 'restaurant_id', 'cuisine_id');\n }", "public function getAllRestaurants() {\n return view('pages.test.restaurants', ['restaurants'=>Restaurant::all()]);\n }", "public function getCompanyWithUsers();", "public function getrestaurant()\n\t{\t\t\n\t\t$this->db->select(\"res.*,ht.hotal_name\");\n\t\t$this->db->from(RESTAURANT.\" as res\");\n\t\t$this->db->join(Hotal.\" as ht\", \"ht.id = res.hotal_id\");\n\t\t$this->db->where(\"res.is_deleted='0'\");\n\t\t$this->db->order_by(\"res.id\",\"DESC\");\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\t\n\t}", "function getHotelsPerTripOrganizer(Request $request)\n {\n $oUser=Auth::user();\n if ($oUser->role=='admin'){\n\n $aActiveTrips = Trip::where('is_active', true)->get();\n\n $aHotels = Hotel::get();\n\n if ($request->post('selectedActiveTrip') == null) {\n $iTripId = Trip::where('is_active', true)->first();\n } else {\n $iTripId = Trip::where('trip_id', $request->post('selectedActiveTrip'))->select('trip_id')->first();\n }\n $aHotelsid = HotelsPerTrip::whereIn('trip_id', $iTripId)->select('hotel_id')->get();\n\n $aHotelsPerTrip = HotelsPerTrip::whereIn('hotels.hotel_id', $aHotelsid)\n ->where('trip_id', $iTripId->trip_id)\n ->join('hotels', 'hotels_per_trips.hotel_id', '=', 'hotels.hotel_id')\n ->orderBy('hotel_start_date', 'asc')\n ->get();\n\n return view('organiser.HotelsAndRooms.hotels',\n [\n 'aHotelsPerTrip' => $aHotelsPerTrip,\n 'aHotels' => $aHotels,\n 'aActiveTrips' => $aActiveTrips,\n 'iTripId' => $iTripId\n ]);\n }\n else {\n foreach ($oUser->traveller->travellersPerTrip as $travellersPerTrip) {\n $is_organizer = $travellersPerTrip->is_organizer;\n if ($is_organizer) {\n $travellerId = $oUser->traveller->traveller_id;\n $aIsOrganizerOfTrip = TravellersPerTrip::where('traveller_id', $travellerId)->where('is_organizer', true)->select('trip_id')->get();\n\n if ($request->post('selectedActiveTrip') == null) {\n $iTripId = Trip::where('is_active', true)->whereIn('trip_id', $aIsOrganizerOfTrip)->first();\n } else {\n $iTripId = Trip::where('trip_id', $request->post('selectedActiveTrip'))->select('trip_id')->first();\n }\n $aHotelsid = HotelsPerTrip::whereIn('trip_id', $iTripId)->select('hotel_id')->get();\n\n $aHotelsPerTrip = HotelsPerTrip::whereIn('hotels.hotel_id', $aHotelsid)\n ->where('trip_id', $iTripId->trip_id)\n ->join('hotels', 'hotels_per_trips.hotel_id', '=', 'hotels.hotel_id')\n ->orderBy('hotel_start_date', 'asc')\n ->get();\n\n\n $aActiveTrips = Trip::where('is_active', true)->whereIn('trip_id', $aIsOrganizerOfTrip)->get();\n\n $aHotels = Hotel::get();\n\n return view('organiser.HotelsAndRooms.hotels',\n [\n 'aHotelsPerTrip' => $aHotelsPerTrip,\n 'aHotels' => $aHotels,\n 'aActiveTrips' => $aActiveTrips,\n 'iTripId' => $iTripId\n ]);\n }\n }\n return $this->getHotelsPerTripUser();\n }\n }", "public function reservations()\n {\n return $this->hasMany('App\\Reservation', 'restaurant_id');\n }", "public function getRestaurant()\n {\n return $this->hasOne(Restaurant::className(), ['restaurantId' => 'restaurantId']);\n }", "function fetch_all_restaurants($limit, $start, $query)\n {\n $search = $query['search'];\n $restaurant_creator = $query['restaurant_creator'];\n\t\t$this->db->select('*')->from($this->table);\n // if client search something\n if(!empty($search)) $this->db->like('restaurant_name', $search);\n if(!empty($restaurant_creator)) $this->db->where('restaurant_creator', $restaurant_creator);\n\t\t$query = $this->db->limit($limit, $start)->get()->result_array();\n\t\t\n\t\tforeach ($query as $key => $restaurant) {\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$tags = $this->tag_model->fetch_all_tags_of_restaurant($restaurant['restaurant_id']);\n $query[$key]['tags'] = $this->global_model->belong_to_many('restaurant_tags', 'tags', 'restaurant_id', $restaurant['restaurant_id'], 'tag_id');\n\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$categories = $this->global_model->has_many('categories', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['categories'] = $categories;\n\n\t\t\t// this method fetch all tags of a restaurant\n\t\t\t$ratings = $this->global_model->with('ratings', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['rating'] = '';\n\t\t\t// total rows\n\t\t\t$totalRows = count($ratings);\n\t\t\t// sum of rating points\n\t\t\t$sumOfRating = 0;\n\t\t\tforeach ($ratings as $rating) {\n\t\t\t\t$sumOfRating += $rating['rating'];\n\t\t\t}\n\t\t\t// if restaurant has rating\n\t\t\tif ($totalRows != 0) {\n\t\t\t\t// average of rating\n\t\t\t\t$query[$key]['totalRated'] = $totalRows;\n\t\t\t\t$query[$key]['rating'] = number_format($sumOfRating / $totalRows, 1, '.', '');\n\t\t\t}\n\n\t\t\t// this method fetch restaurant creator info\n\t\t\t$user = $this->global_model->with('users', 'id', $restaurant['restaurant_creator']);\n\t\t\t$query[$key]['creator'] = $user;\n\n\t\t}\n\n\t\t// return data from server\n\t\treturn $query;\n\t}", "public static function getAdditionalCommissions($restaurantId) {\n $db = Zend_Registry::get('dbAdapter');\n\n $result = array();\n\n try{\n $sql = 'select * from restaurant_commission rc where rc.restaurantId = '. $restaurantId . ' order by rc.from';\n $result = $db->fetchAll($sql);\n }\n catch ( Zend_Db_Statement_Exception $e ){\n return null;\n }\n\n return $result;\n }", "private function getAllApplicants() {\n $applicants = DB::table('crew')\n ->leftJoin('crewfasttrack', 'crewfasttrack.APPLICANTNO', '=', 'crew.APPLICANTNO')\n ->leftJoin('fasttrack', 'fasttrack.fasttrack', '=', 'crewfasttrack.FASTTRACKCODE')\n ->leftJoin('crewscholar', 'crewscholar.APPLICANTNO', '=', 'crew.APPLICANTNO')\n ->leftJoin('scholar', 'scholar.SCHOLASTICCODE', '=', 'crewscholar.SCHOLASTICCODE')\n ->leftJoin('crewchange', function ($join) {\n $join->on('crewchange.APPLICANTNO', '=', 'crew.APPLICANTNO')\n ->where('crewchange.DATEEMB', DB::raw(\"(select max(crewchange.DATEEMB) from crewchange where crewchange.APPLICANTNO = crew.APPLICANTNO )\"))\n ->groupby('crewchange.APPLICANTNO');\n })\n ->leftJoin('rank', 'rank.RANKCODE', '=', 'crewchange.RANKCODE')\n ->leftJoin('vessel', function ($join) {\n $join->on('vessel.VESSELCODE', '=', 'crewchange.VESSELCODE')\n ->whereDate('crewchange.DATEEMB', '<', Carbon::now())\n ->whereDate('crewchange.DATEDISEMB', '>', Carbon::now());\n })\n ->select('crew.APPLICANTNO', 'crew.CREWCODE', 'crew.FNAME', 'crew.GNAME', 'crew.MNAME', 'crew.STATUS', \n 'crew.UTILITY', 'scholar.DESCRIPTION', 'fasttrack.FASTTRACK', 'rank.RANK', 'vessel.VESSEL')->paginate(15);\n return $applicants;\n }", "function fetch_some_restaurants($restaurant_name)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->like('restaurant_name', $restaurant_name)\n\t\t\t\t\t\t->limit(5)\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "public function index()\n {\n return Reservation::with('customer','paypal_payments')->Where('status','Check in')->orWhere('status','Reserved')->get();\n }", "private function approvedByRole()\n {\n $pending = \\ApprovalSequence\\Models\\Entity::Where('entity_id', $this[$this->primaryKey])->get();\n $approvers = $pending->map(function ($item) {\n return $item->approver->role_id;\n });\n //to avoid duplication\n return $approvers->unique();\n }", "public function getRestrictions() \n {\n return $this->_restrictions; \n }", "public function GuideExpensesRestaurants()\n {\n return $this->hasMany('App\\Models\\GuideExpensesRestaurants',\"restaurant_id\");\n }", "public function fetch_restaurant_on_condition($query)\n {\n $this->db->select('*')->from('restaurants');\n \n if (isset($query['restaurant_id']) && !empty($query['restaurant_id'])) {\n $this->db->where('restaurant_id', $query['restaurant_id']);\n }\n\n if (isset($query['restaurant_creator']) && !empty($query['restaurant_creator'])) {\n $this->db->where('restaurant_creator', $query['restaurant_creator']);\n\t\t}\n\t\t\n\t\tif (isset($query['restaurant_slug']) && !empty($query['restaurant_slug'])) {\n $this->db->where('restaurant_slug', $query['restaurant_slug']);\n }\n\n $query = $this->db->get()->result_array();\n // with restaurant info\n foreach ($query as $key => $restaurant) {\n // this metho dfetch all tags of a restaurant\n\t\t\t$tags = $this->tag_model->fetch_all_tags_of_restaurant($restaurant['restaurant_id']);\n $query[$key]['tags'] = $this->global_model->belong_to_many('restaurant_tags', 'tags', 'restaurant_id', $restaurant['restaurant_id'], 'tag_id');\n\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$categories = $this->global_model->has_many('categories', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['categories'] = $categories;\n\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$ratings = $this->global_model->with('ratings', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['rating'] = '';\n\t\t\t// total rows\n\t\t\t$totalRows = count($ratings);\n\t\t\t// sum of rating points\n\t\t\t$sumOfRating = 0;\n\t\t\tforeach ($ratings as $rating) {\n\t\t\t\t$sumOfRating += $rating['rating'];\n\t\t\t}\n\t\t\t// if restaurant has rating\n\t\t\tif ($totalRows != 0) {\n\t\t\t\t// average of rating\n\t\t\t\t$query[$key]['totalRated'] = $totalRows;\n\t\t\t\t$query[$key]['rating'] = number_format($sumOfRating / $totalRows, 1, '.', '');\n\t\t\t}\n\n\t\t\t// this method fetch restaurant creator info\n\t\t\t$user = $this->global_model->with('users', 'id', $restaurant['restaurant_creator']);\n\t\t\t$query[$key]['creator'] = $user;\n }\n return $query;\n }", "public static function getAvailableContractors(): array\n {\n $contractorsQuery = ContractorOccupation::find()->select('DISTINCT(contractor_id)');\n\n return self::find()\n ->select('*')\n ->addSelect([\n 'COUNT(task.contractor_id) AS doneTaskCount',\n 'COUNT(review.task_id) AS reviewCount',\n 'AVG(review.rating) AS rating'\n ])\n ->rightJoin(['occupation' => $contractorsQuery], 'user.id = occupation.contractor_id')\n ->leftJoin('task', 'task.contractor_id = user.id')\n ->leftJoin('review', 'task.id = review.task_id')\n\n ->andWhere(['task.state_id' => Task::STATE_DONE])\n ->andWhere(['user.hide_profile' => false])\n ->groupBy('user.id')\n ->orderBy('user.datetime_created ASC')\n ->all();\n }", "public function getContractors()\n {\n return $this->hasMany(User::className(), ['id' => 'contractor_id'])->viaTable('favorite_contractor', ['customer_id' => 'id']);\n }", "function fetch_restaurants_by_user_info($user_id)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from('restaurants')\n\t\t\t\t\t\t->where('restaurant_creator', $user_id)\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public function hasRecurringOrders();", "public function getDonors()\n {\n $group = Request::get('group');\n \t$city = Request::get('city');\n \t$state = Request::get('state');\n \t$conditions = [ 'is_donor' => '1' ];\n\n \tif(isset($group)) $conditions = array_add($conditions, 'group', $group);\n \tif(isset($city) ) $conditions = array_add($conditions, 'city', $city);\n \tif(isset($state) ) $conditions = array_add($conditions, 'state', $state);\n \treturn User::where($conditions)->get();\n }", "public function getAllRestaurants(){\n $query=$this->db->query(\"SELECT * FROM restaurant\");\n if($query->num_rows){\n $tmp['restaurants']=$query->rows;\n \n foreach($tmp['restaurants'] as &$restaurant){\n $query=$this->db->query(\"SELECT COUNT(review_id) AS num_review,ROUND(AVG(rating),0) AS rating FROM reviews WHERE restaurant_id=\".$restaurant['restaurant_id']);\n if($query->num_rows){\n $restaurant['num_review']=$query->rows[0]['num_review'];\n if($restaurant['num_review']!=0)\n $restaurant['rating']=$query->rows[0]['rating'];\n else\n $restaurant['rating']=0;\n }\n else{\n $restaurant['num_review']=0;\n $restaurant['rating']=0;\n }\n }\n\n $tmp['status']=\"success\";\n return $tmp;\n }\n else{\n return array(\"status\"=>\"fail\",\"error\"=>\"no restaurants found.\");\n }\n }", "function list_get() {\n $user = $this->get('user');\n $fromdate = $this->get('fromdate');\n $todate = $this->get('todate');\n $status = $this->get('status');\n $role = $this->get('role');\n \n $condition = \" and order_id!=''\";\n $branch = $this->get('branch');\n if($branch != \"\") {\n if($role!=\"DEALER\")\n $condition .= \" and o.branch_id='$branch'\";\n }\n \n \n if(($status!= \"Received\" && $status!= \"Delivered\" && $status!= \"Rejected\" && $status!=\"rejected\") && ($role==\"DEALER\" || $role==\"SE\"))\n $condition .= \" and o.parent_order='0'\"; // and o.parent_order='0'\n \n if($role==\"DEALER\" && $user!=\"\")\n $condition .= \" and o.orderedby='$user'\"; // and o.parent_order='0'\n else if($role==\"SE\" && $user!=\"\") {\n \n $seller_info = \"\";\n //echo \"select GROUP_CONCAT(`seller`) as seller_info from branch_dealers where sales_manager='$user' and branch='$branch'\";\n $deal_query = $this->model_all->getTableDataFromQuery(\"select GROUP_CONCAT(`seller`) as seller_info from branch_dealers where sales_manager='$user' and branch='$branch'\");\n if($deal_query->num_rows()>0){\n $deal_rs = $deal_query->row();\n $seller_info = $deal_rs->seller_info;\n if($seller_info!=\"\"){\n $seller_info = trim($seller_info,\",\");\n $condition .= \" and (o.orderedby IN ($seller_info) or o.created_by='$user')\";\n \n }else{\n \n $condition .= \" and o.created_by='$user'\";\n }\n \n \n \n }else{\n $condition .= \" and o.created_by='$user'\";\n \n }\n \n \n \n }\n \n \n \n \n\n if ($status == \"Cancelled\") {\n $condition .= \" and o.status='Cancelled'\";\n } else if ($status == \"Ordered\") {\n $condition .= \" and o.status='Ordered'\";\n } else if ($status == \"Delivered\") {\n $condition .= \" and o.status='Delivered' and o.seller_accept='1' \"; // and delivery_recieved='1'\n } else if ($status == \"Received\") {\n $condition .= \" and o.status='Delivered' and o.dboy_accept='1'\";\n } else if ($status == \"Rejected\" || $status == \"rejected\") {\n $condition .= \" and o.status='Delivered' and o.delivery_reject='1'\";\n } else if ($status == \"Pending\") {\n $condition .= \" and o.status not in ('Cancelled','Delivered','Ordered')\";\n } else if ($status == \"track\") {\n $condition .= \" and o.status not in ('Cancelled')\";\n } else if ($status == \"Denied\") {\n $condition .= \" and ((o.fa_status='2') or (o.fa_status='1' and o.admin_status='2') or (o.fa_status='2' and o.admin_status='2'))\";\n } else if ($status == \"Dispatch_Reject\") {\n $condition .= \" and o.status='Rejected' and o.dboy_accept='2'\";\n } \n\n \n \n\n if ($fromdate != \"\" && $todate == \"\") {\n $fromdate = date(\"Y-m-d\", strtotime($fromdate));\n $condition .= \" and date(o.`orderedon`)='$fromdate'\";\n } else if ($fromdate != \"\" && $todate != \"\") {\n $fromdate = date(\"Y-m-d\", strtotime($fromdate));\n $todate = date(\"Y-m-d\", strtotime($todate));\n $condition .= \" and o.`orderedon` between '$fromdate 00:00:00' and '$todate 23:59:59'\";\n }\n\n \n \n\n $result_set = $this->model_all->getTableDataFromQuery(\"select o.id, o.order_id, o.orderedon, o.status, o.orderedby, o.created_by,o.order_value,o.payment_type,o.credit_date,s.id as dealer_id,s.company_name as dealer_name,o.parent_order from seller_orders o,sellers s where o.orderedby=s.id $condition order by o.orderedon desc\");\n \n if ($result_set->num_rows() > 0) {\n $result[\"status\"] = 1;\n $result[\"message\"] = \"Records Found\";\n $result[\"total_records\"] = $result_set->num_rows(); \n \n\n\n foreach ($result_set->result_array() as $row) {\n if($row[\"orderedby\"]!=$row[\"created_by\"]){\n\n $emp_qry = $this->model_all->getTableDataFromQuery(\"select e.first_name as emp_name,e.mobile,b.name as branch_name from employees e,branches b where e.branch=b.id and e.id='$row[created_by]'\");\n if($emp_qry->num_rows()>0){\n $emp_rs=$emp_qry->row();\n $row[\"takenby_name\"] = $emp_rs->emp_name;\n $row[\"takenby_branch\"] = $emp_rs->branch_name;\n $row[\"takenby_contact\"] = $emp_rs->mobile;\n }else{\n $row[\"takenby_name\"] = \"-\";\n $row[\"takenby_branch\"] = \"-\";\n $row[\"takenby_contact\"] = \"-\"; \n }\n \n }else{\n $row[\"takenby_name\"] = \"Self\";\n $row[\"takenby_branch\"] = \"-\";\n $row[\"takenby_contact\"] = \"-\"; \n }\n if($row['credit_date']!=\"\"){\n $row['credit_date'] = date(\"d-m-Y\", strtotime($row['credit_date']));\n } \n $row['orderedon'] = date(\"d-m-Y\", strtotime($row['orderedon']));\n $result[\"records\"][] = $row;\n }\n $this->response($result, 200);\n exit;\n } else {\n $result[\"status\"] = 0;\n $result[\"message\"] = \"No records Found\";\n $this->response($result, 200);\n exit;\n }\n }", "public function getAcceptedOrders(Request $request)\n {\n $id = $request->id;\n $aAcceptedOrders = Order::with('user', 'order_item.menu_item')\n ->where('restaurant_id', '=', $id)\n ->where('status', '=', 0)\n ->where('accepted', '=', 1)\n ->orderBy('delivery_time', 'asc')\n ->get();\n return response()->json($aAcceptedOrders);\n }", "public function getRequesterCompanies (usuario $user = null, $self = true, $corps = true, $requirements = false)\n {\n $actives = new ArrayObjectList();\n $company = $user instanceof usuario ? $user->getCompany() : null;\n $requesters = $this->obtenerEmpresasCliente($company, $user);\n\n\n // loop over each requester\n foreach ($requesters as $requester) {\n $actives[] = $requester;\n\n if ($corps === true && $corp = $requester->perteneceCorporacion()) {\n $actives[] = $requester;\n\n if ($user instanceof usuario) {\n // Need to check the visibility to the corp\n $limiterUser = $user->getUserLimiter($corp);\n if ($limiterUser && $limiterUser->compareTo($user) === false) {\n continue;\n }\n }\n\n $actives[] = $corp;\n }\n }\n\n if ($self === true) {\n $limiterUser = $user instanceof usuario ? $user->getUserLimiter($this) : false;\n\n // if the user who hide the visibility is the same as $user\n // we have an optional visibility, and we dont want to hide\n // those clients here\n if ($limiterUser === false || $limiterUser->compareTo($user)) {\n\n //adding own company if the user has visibility\n $actives[] = $this;\n }\n }\n\n // filter the companies with docs if neeeded\n if ($requirements) {\n $withRequirements = new ArrayObjectList();\n foreach ($actives as $i => $active) {\n if ($active->countCorpDocuments() > 0) {\n $withRequirements[] = $active;\n }\n }\n\n $actives = $withRequirements;\n }\n\n return $actives->unique();\n }", "public function getCreditRequests()\n {\n $search['q'] = request('q');\n\n $partner = auth()->user()->companies->first();\n\n $creditRequests = CreditRequest::search($search['q'])->with('quotation.user','user','credits')->paginate(10);\n\n return $creditRequests;\n /*$creditRequestsPublic = CreditRequest::search($search['q'])->where('public',1)->with('quotation.user','user','shippings')->get()->all();\n \n $creditRequestsPrivate = CreditRequest::search($search['q'])->where('public', 0)->whereHas('suppliers', function($q) use($partner){\n $q->where('shipping_request_supplier.supplier_id', $partner->id);\n })->get()->all();\n\n $creditRequests = array_collapse([$creditRequestsPublic, $creditRequestsPrivate]);\n\n // dd($creditRequests);\n \n \n $paginator = paginate($creditRequests, 10);\n \n return $paginator; */\n \n \n\n \n \n }", "public function index()\n {\n if(auth()->user()->hasRole('owner')){\n return view('items.index', ['categories' => auth()->user()->restorant->categories->reverse(), 'restorant_id' => auth()->user()->restorant->id]);\n }else\n return redirect()->route('orders.index')->withStatus(__('No Access'));\n }", "public function get_restaurant_list_fees () {\n\t\t\n\t\t$restaurantIDString = $this->get_param('post.restaurant_id_list');\n\t\t$deliveryRegionID = $this->get_param('post.delivery_region_id');\n\t\t\n\t\t$extraFee = M('restaurant')\n\t\t\t->where('`id` in (' . $restaurantIDString . ')')\n\t\t\t->field('sum(`extra_fee`) as extra_fee')\n\t\t\t->find();\n\t\t\n\t\tif (!$extraFee) {\n\t\t\t$extraFee = \"0\";\n\t\t} else {\n\t\t\t$extraFee = $extraFee['extra_fee'];\n\t\t}\n\t\t\n\t\t\n\t\t$deliveryFee = M('restaurant_deliver_fee')\n\t\t\t->where(\"`region_id` = $deliveryRegionID and `restaurant_id` in ( $restaurantIDString ) \")\n\t\t\t->select();\n\t\t\n\t\t$this->return_data(['extra_fee' => $extraFee, 'delivery_fee' => $deliveryFee]);\n\t}", "public function all() {\n $parser = new XmlParser();\n $restaurants = $parser->getRestaurantList(50);\n foreach ($restaurants as $restaurant) {\n $restaurant_eloquent = Restaurant::firstOrNew(['url' => $restaurant[\"value\"]]);\n if (!$restaurant_eloquent->exists) {\n $restaurant_eloquent->description = \"\";\n $restaurant_eloquent->name = $this->getTempName($restaurant_eloquent);\n $restaurant_eloquent->save();\n }\n $this->dispatch(new ScrapeRestaurantInfo($restaurant_eloquent));\n }\n\n return Restaurant::all()->keyBy('id');\n }", "public function query()\n {\n $company_id = request()->company_id;\n\n $trips = Trips::CompanyPayoutTripsOnly()->select('trips.*','users.company_id as company_id','companies.name as company_name')\n ->with(['currency','driver']);\n\n if($this->filter_type == 'Weekly') {\n $trips = $trips\n ->whereHas('driver',function($q) use ($company_id){\n $q->where('company_id',$company_id);\n })\n ->groupBy(DB::raw('WEEK(trips.created_at)'));\n }\n else if($this->filter_type == 'OverAll') {\n $trips = $trips->groupBy('users.company_id');\n }\n\n $trips = $trips->get();\n return $this->applyScopes($trips);\n }", "public function listaAnticiposClientes()\n {\n $anticiposAgregados = array();\n foreach($this->session->userdata(\"comprobantes_anticipos\") as $index => $value)\n {\n $anticiposAgregados[] = $index;\n }\n $this->db->where('cliente_id', $_POST['cliente']);\n $this->db->where('comprobante_anticipo', 1);\n $this->db->where('comprobante_anticipo_usado', 0);\n if(count($anticiposAgregados) > 0)\n {\n $this->db->where_not_in('id',$anticiposAgregados);\n }\n $this->db->order_by('id','DESC');\n $query = $this->db->get(\"comprobantes\");\n $rsAnticipos = $query->result();\n return $rsAnticipos;\n }", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getCustomers()\n {\n return $this->hasMany(User::className(), ['id' => 'customer_id'])->viaTable('favorite_contractor', ['contractor_id' => 'id']);\n }", "function cicleinscription_get_vacancies_remaning(){\n\t\n}", "public function getMultipleRevisitOrders()\n {\n return \\DB::select(\"SELECT a.id, a.propaddress1, a.propaddress2, a.propcity, a.propstate, a.propzip, s.descrip as status_name FROM appr_dashboard_delay_order d LEFT JOIN appr_order a ON (a.id=d.orderid) LEFT JOIN order_status s ON (a.status=s.id) WHERE d.created_date BETWEEN :from AND :to AND d.delay_date BETWEEN :t AND :b GROUP BY d.orderid HAVING COUNT(d.id) > 1\", [':from' => strtotime('today'), ':to' => strtotime('tomorrow'), ':t' => strtotime('today'), ':b' => strtotime('tomorrow')]);\n }", "function GetAllAcceptedPlacedOffers()\n {\n $placedOffersModel = new PlacedOffersModel();\n return $placedOffersModel->GetAllAcceptedPlacedOffers();\n }", "public function getRestrictions()\n {\n return $this->restrictions;\n }", "public function getRestrictions()\n {\n return $this->restrictions;\n }", "function WholesalerList($varPortalFilter) {\n $arrClms = array(\n 'pkWholesalerID',\n 'CompanyName',\n );\n $argWhere = \"WholesalerStatus IN ('active','deactive','suspend') \" . $varPortalFilter;\n $varOrderBy = ' CompanyName ASC ';\n\n $varTable = TABLE_WHOLESALER;\n $arrRes = $this->select($varTable, $arrClms, $argWhere, $varOrderBy);\n //pre($arrRes);\n return $arrRes;\n }", "public function index(Request $request)\n {\n //\n $setting = Setting::find(1);\n// $commision = $setting->commission;\n//$restaurants = Restaurant::all();\n//foreach ($restaurants as $restaurant){\n//$netApp = 0;\n// $total = 0 ;\n// foreach ($restaurant->orders as $order){\n// $total += $order->total;\n// }\n// $netApp = $commision*$total;\n//\n//}\n// $restaurants = Restaurant::where(function ($q) use ($request) {\n// if ($request->search) {\n// $q->where('name', 'LIKE', '%' . $request->search . '%');\n//\n// }\n// })->paginate(6);\n $payments = Payment::orwhereHas('restaurant', function ($q) use ($request) {\n $q->where('name', 'LIKE', '%' . $request->search . '%');\n })->paginate(6);\n return view('admin.payments.index', compact('payments'));\n\n }", "public function index() {\n $restaurants = Restaurant::where('status','!=', 'blocked')->get();\n return view('admin.restaurants.index',compact('restaurants'));\n }", "public function rules($restaurant)\n {\n $properties = Property::pluck('id');\n $properties = $properties->join(',');\n\n $restaurantThemes = RestaurantTheme::pluck('id');\n $restaurantThemes = $restaurantThemes->join(',');\n\n $restaurantTypes = RestaurantType::pluck('id');\n $restaurantTypes = $restaurantTypes->join(',');\n\n $restaurantLocations = RestaurantLocation::pluck('id');\n $restaurantLocations = $restaurantLocations->join(',');\n\n return [\n 'name' => ['required', 'min:1', 'max:50', Rule::unique('restaurants','name')->ignore($restaurant)],\n 'property_id' => \"required|in:{$properties}\",\n 'restaurant_theme_id' => \"required|in:{$restaurantThemes}\",\n 'restaurant_type_id' => \"required|in:{$restaurantTypes}\",\n 'restaurant_location_id' => \"required|in:{$restaurantLocations}\",\n 'how_many_pax' => ['min:1', 'max:50'],\n 'open_time' => ['min:1', 'max:50'],\n 'closing_time' => ['min:1', 'max:50'],\n 'included' => ['min:1', 'max:50'],\n ];\n }", "public function getOtherCriteriaList() {\n return $this->_get(9);\n }", "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Cliente';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function allRest(){\n\t\t$restaurantes = DB::SELECT('SELECT * FROM pf.res_restaurants where restaurant_id = parent_restaurant_id and activate = 1');\n\t\t$landing = LandingPage::select('header','logo','landing_page_id')->get();\n\n\t\treturn View::make('web.restaurantes')\n\t\t\t->with('restaurantes', $restaurantes)\n\t\t\t->with('landing', $landing);\n\t}", "public function getAll()\n {\n if (Auth::user()->id_role == 1) \n {\n $company_id = GetSession::getCompanyId();\n }elseif(Auth::user()->id_role == 2)\n {\n $company_id = Auth::user()->id_company;\n }\n \n return Product::where('id_company', $company_id)->orderBy('created_at','desc')->get();\n }", "public function reservations() {\n return $this->hasMany('App\\Reservation')->getResults();\n }", "public function getCustomerResultPermissions(): array;", "function getPermissions($company_id = 0, $role_id=0, $project_id=0, $access_id=0, $item_id=0){\n\t\tGLOBAL $AppUI;\n\t\t$rta=Array();\n\n\t\t// set project's filter\n\t\t$whereProject.= \"\\n\\tAND rp.project_id = \";\n\t\t$whereProject .= @$project_id != 0 ? $project_id : \"-1\";\n\t\t$whereCompany .= \"\\n\\tAND rp.company_id = \";\n\t\t$whereCompany .= @$company_id != 0 ? $company_id : \"-1\";\n\t\t// set access's filter\n\t\t$where=\"\";\n\t\tif (@$company_id!=0){\n\t\t\t$where.= \"\\n\\tAND (r.role_type=0 or r.role_type=1 and r.role_company=$company_id)\";\n\t\t}\n\t\t\n\t\t\t\t\t\t\n\t\t// set access's filter\n\t\tif (@$access_id!=0){\n\t\t\t$where.= \"\\n\\tAND rp.access_id = $access_id\";\n\t\t}\n\n\t\t// set permission's filter\n\t\tif (@$item_id!=0){\n\t\t\t$where.= \"\\n\\tAND rp.item_id = $item_id\";\n\t\t}\n\n\t\tif (@$role_id!=0){\n\t\t\t$where.= \"\\n\\tAND (r.role_id=$role_id)\";\n\t\t}\n\t\t$sql=\"\n(select DISTINCT \nr.role_id\n, r.role_name\n, -1 project_id \n, 'All' project_name\n, ta.access_id\n, ta.access_name\n, tpi.item_id\n, tpi.item_name\n, 9 permission_value\nfrom \nroles r\n,task_access ta\n,task_permission_items tpi \nWHERE\t1=1\n\t\t$where\norder by\nrole_id,project_id,access_id,item_id,permission_value)\nunion\n(select DISTINCT \nr.role_id\n, r.role_name\n, rp.project_id \n, 'All' project_name\n, rp.access_id\n, ta.access_name\n, tpi.item_id\n, tpi.item_name\n, rp.permission_value\n\nfrom \nroles r\n,role_permissions rp left join task_access ta on ta.access_id=rp.access_id\n,task_permission_items tpi \nwhere\n\t\trp.role_id = r.role_id \n\tand\ttpi.item_id=rp.item_id\n\tand\t(ta.access_id=rp.access_id or rp.access_id=-1)\n$whereProject\n$whereCompany\n$where\norder by\nrole_id,project_id,access_id,item_id,permission_value\n)\n\t\";\n\t\t//echo \"<pre>$sql</pre>\";\n\t\t$rta=db_loadList( $sql );\t\t\n\t\t$out=array();\n\t\t$r=\"role_id\";\n\t\t$p=\"project_id\";\n\t\t$a=\"access_id\";\n\t\t$i=\"item_id\";\n\t\t$v=\"permission_value\";\n\t\tforeach($rta as $j=>$fila){\n\t\t\t$curval = $out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])];\n\t\t\tif (isset($curval)){\n\t\t\t\tif( $curval > $fila[$v]){\n\t\t\t\t\t//echo \"$curval - $fila[$v] {[$fila[$r]][$fila[$p]][$fila[$a]][$fila[$i]]}\";\n\t\t\t\t\t$out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])]=$fila[$v];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])]=$fila[$v];\n\t\t\t}\n\t\t\tunset($curval);\n\t\t}\n\t\t//$curval =$out[\"4\"][\"-1\"][\"1\"][\"1\"];\n\t\t//$curval =$out[4][-1][1][1];\n\t\t//echo \"PRM= $curval <br>\";\n\t\t\n\t\treturn $out;\t\n\t}", "public function getOtherRecruitmentList() {\n return $this->_get(5);\n }", "public function index()\n {\n if(Auth::guard('restaurant')->id())\n {\n $id= Auth::guard('restaurant')->id();\n }\n else if(Auth::guard('manager')->id())\n {\n $manager = Auth::guard('manager')->user();\n $id=$manager->restaurant_id;\n $user_type=$manager->user_type;\n $perms=get_admin_module_permission($id,$user_type,'coupon');\n\n if(isset($perms))\n {\n if($perms->view)\n {}\n else{\n return view('admin.nopermission')->with('error', 'Permission Denied');\n } \n }\n\n }\n else{\n return redirect('admin');\n }\n\n $coupon =Coupon::where('restaurant_id',$id)->paginate(10);\n return view('admin.coupon.index',compact('coupon'));\n }", "public function getContractorOccupations()\n {\n return $this->hasMany(ContractorOccupation::className(), ['contractor_id' => 'id']);\n }", "public function selectnearbyRestro($lat,$long){\n // cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * \n // sin( radians( lat ) ) ) ) AS distance FROM your_table_name HAVING\n // distance < 25 ORDER BY distance LIMIT 0 , 20;\")\n\n $query = $this->db->query(\"SELECT *, ( 3959 * acos( cos( radians($lat) ) * cos( radians( latitude ) ) * \n cos( radians( longnitude ) - radians($long) ) + sin( radians($lat) ) * \n sin( radians( latitude ) ) ) ) AS distance FROM restaurant HAVING\n distance < 10 ORDER BY distance LIMIT 0 , 20\");\n // print_r($query);die;\n $res = $query->result();\n return $res;\n }", "function listarres()\n\t{\n\t\t$sql = \"call sp_s_restaurante_all\";\n\t\ttry {\n\t\t\t$PrepareStatement = $this->cnn->getPrepareStatement($sql);\n\t\t\t$PrepareStatement->execute();\n\t\t\treturn $PrepareStatement->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \" . $e;\n\t\t\treturn false;\n\t\t}\n\t}", "function getOrders() {\r\n $b2b_orders = getOrdersFromB2B();\r\n //GET ORDERS FROM B2C\r\n $b2c_orders = getOrdersFromB2C();\r\n //COMBINE ORDERS\r\n $today_orders = array_merge($b2b_orders, $b2c_orders);\r\n \r\n $restaurant_array = array();\r\n \r\n foreach($today_orders as $order ) {\r\n $restaurant = array(\r\n \"id\" => '',\r\n \"orders\"=> array(),\r\n );\r\n if ( count($restaurant_array) == 0 ) {\r\n $restaurant[\"id\"] = $order[\"restaurant_id\"];\r\n array_push($restaurant[\"orders\"], $order);\r\n array_push($restaurant_array, $restaurant);\r\n } else {\r\n foreach($restaurant_array as &$array_item) {\r\n if ( $array_item[\"id\"] == $order[\"restaurant_id\"] ) {\r\n array_push($array_item[\"orders\"], $order);\r\n continue 2;\r\n }\r\n }\r\n $restaurant[\"id\"] = $order[\"restaurant_id\"];\r\n array_push($restaurant[\"orders\"], $order);\r\n array_push($restaurant_array, $restaurant);\r\n }\r\n }\r\n \r\n return $restaurant_array;\r\n}", "public function restaurant()\n {\n }", "static function getAllCustomerWithOrders(){\r\n\t\tglobal $DB;\r\n\t\t$retval = Array();\r\n\t\t\r\n\t\t$sql = \"SELECT DISTINCT personalization_orders.customerid FROM personalization_orders WHERE `status` >= 1 AND orderdate > 0\";\r\n\r\n\t\tif($DB->num_rows($sql)){\r\n\t\t\tforeach($DB->select($sql) as $r){ \r\n\t\t\t\t$retval[] = new BusinessContact($r[\"customerid\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "function getSalesConsultants() {\n\t\t\n\t\t$sel_consultant= tep_db_query(\"SELECT DISTINCT order_assigned_to FROM orders ORDER BY order_assigned_to ASC\");\n\t\twhile($sales_arr = tep_db_fetch_array($sel_consultant)) {\n\t\t\tif($sales_arr['order_assigned_to']==\"\" || is_null($sales_arr['order_assigned_to']) || $sales_arr['order_assigned_to']==\" \") {\n\t\t\t\t$sales_arr['order_assigned_to'] = \"Empty\";\n\t\t\t}\n\t\t\t$sales_consultants[] = $sales_arr['order_assigned_to'];\n\t\t}\n\t\t\n\t\treturn $sales_consultants;\t\t\n\t}", "public function restaurant()\n {\n return $this->belongsTo('App\\Models\\Local', 'riflocal', 'rif');\n }", "public function getResturantDetails(){\n // $endPrice = $this->_request['endPrice'] != \"undefined\" ? intval ($this->_request['endPrice']) : -1;\n \n $sql = \"select * from resturants r join city c on r.CityId = c.CityID\";\n // if($startPrice!=\"undefined\")\n // {\n // $sql.=\" where r.start_price>=$startPrice \";\n // if($endPrice != -1 )\n // $sql.=\" and r.end_price<=$endPrice\";\n // }\n $rows = $this->executeGenericDQLQuery($sql);\n $resturantDetails = array();\n for($i=0;$i<sizeof($rows);$i++)\n {\n\n\n $resturantDetails[$i]['Name'] =($rows[$i]['Name'] == null || $rows[$i]['Name'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Name'] ;\n $resturantDetails[$i]['Address'] =($rows[$i]['Address'] == null || $rows[$i]['Address'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Address'] ;\n $resturantDetails[$i]['content'] =($rows[$i]['content'] == null || $rows[$i]['content'] ==\"null\") ? \"No Data Available\" : $rows[$i]['content'] ;\n $resturantDetails[$i]['Phone1'] =($rows[$i]['Phone1'] == null || $rows[$i]['Phone1'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone1'] ;\n $resturantDetails[$i]['Phone2'] =($rows[$i]['Phone2'] == null || $rows[$i]['Phone2'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone2'] ;\n $resturantDetails[$i]['Phone3'] =($rows[$i]['Phone3'] == null || $rows[$i]['Phone3'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone3'] ;\n $resturantDetails[$i]['Mobile'] =($rows[$i]['Mobile'] == null || $rows[$i]['Mobile'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Mobile'] ;\n $resturantDetails[$i]['Website'] =($rows[$i]['Website'] == null || $rows[$i]['Website'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Website'] ;\n $resturantDetails[$i]['Category'] =($rows[$i]['Category'] == null) ? 0 : $rows[$i]['Category'] ;\n $resturantDetails[$i]['Facilities'] =$this->getFacilitiesByIds($rows[$i]['Facilities']);\n $resturantDetails[$i]['CityId'] =$rows[$i]['CityId'] ;\n $resturantDetails[$i]['stdCode'] =$rows[$i]['STDCode'] ;\n $resturantDetails[$i]['icon_image'] =($rows[$i]['icon_image'] == null || $rows[$i]['icon_image'] ==\"null\") ? \"img/not_found.jpg\" : $rows[$i]['icon_image'] ;\n $resturantDetails[$i]['home_image'] =($rows[$i]['home_image'] == null || $rows[$i]['home_image'] ==\"null\") ? \"img/not_found.jpg\" : $rows[$i]['home_image'] ;\n \n \n }\n $this->response($this->json($resturantDetails), 200);\n\n }", "public function index()\n {\n $id_user = Auth::user()->id;\n\n // Faccio una query al db per prendere tutti i ristoranti con l'id user dell'utente loggato\n $restaurants_list = Restaurant::select()->where('user_id', $id_user)->get();\n\n // Faccio una query al db per prendere tutti gli ordini dei ristoranti dell'utente loggato dove i pagamenti sono andati a buon fine in ordine di delivery time\n $orders_list = Order::orderBy('delivery_time')->whereIn('restaurant_id' , Restaurant::select('id')->where('user_id', $id_user))->whereIn('id' , Payment::select('order_id')->where('status', 'Accepted'))->get();\n\n\n $data = [\n // Lista ristoranti dell'utente\n 'restaurants' => $restaurants_list,\n // Lista degli ordini con pagamento ok di tutti i ristoranti dell'utente\n 'orders' => $orders_list,\n ];\n\n return view('admin.orders.index', $data);\n }", "public function getAllApplicants();", "function GetAllPlacedOffers()\n {\n $placedOffersModel = new PlacedOffersModel();\n return $placedOffersModel->GetAllPlacedOffers();\n }", "public function run(Faker $faker)\n {\n $restaurants = [\n [\n 'name' => 'Mirko',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Dal genovese',\n 'vat' => '12345678912',\n 'address' => 'Via del genovese',\n 'zip' => '21137',\n 'phone' => '3333333331',\n 'image' => 'https://www.umberto.it/wp-content/uploads/2018/11/RISTORANTE-UMBERTO-%C3%A8-UNA-TAPPA-del-MONOPOLY-NAPOLI-2.png'\n ],\n [\n 'name' => 'Giuseppe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Dal pugliese',\n 'vat' => '55566699954',\n 'address' => 'Via del pugliese',\n 'zip' => '21137',\n 'phone' => '3333333332',\n 'image' => 'https://i.ibb.co/26JzDpz/124689152-116276153619835-6658681031194173572-n.png'\n\n ],\n [\n 'name' => 'Alfonso',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Da Alfonso',\n 'vat' => '55566199954',\n 'address' => 'Via di Alfonso',\n 'zip' => '21137',\n 'phone' => '3333333333',\n 'image' => 'https://lirp.cdn-website.com/0912aaa6/dms3rep/multi/opt/Logo-174w.png'\n\n ],\n [\n 'name' => 'Marco',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Il Barbatrucco',\n 'vat' => '55516699954',\n 'address' => 'Via del barbatrucco',\n 'zip' => '21137',\n 'phone' => '3333335100',\n 'image' => 'https://media-cdn.tripadvisor.com/media/photo-s/0d/34/6c/c6/getlstd-property-photo.jpg'\n ],\n [\n 'name' => 'Pasquale',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Bella Napoli',\n 'vat' => '5156669995',\n 'address' => 'Via Napoli',\n 'zip' => '21137',\n 'phone' => '3333335588',\n 'image' => 'https://www.bellanapolilignano.info/wp-content/uploads/2018/10/bella-napoli-1.png'\n ],\n [\n 'name' => 'Eugenio',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Ristogenius',\n 'vat' => '55561298854',\n 'address' => 'Via del genio',\n 'zip' => '21137',\n 'phone' => '3334133550',\n 'image' => 'https://ristoacademy.it/wp-content/uploads/2021/07/RISTOGENIUS-LOGO-bn.png'\n ],\n [\n 'name' => 'Frank',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Da Frank',\n 'vat' => '52261899995',\n 'address' => 'Via di Frank',\n 'zip' => '21137',\n 'phone' => '3334163550',\n 'image' => 'https://pizzeriafrank.it/wp-content/uploads/2020/05/logo-frank.png'\n ],\n [\n 'name' => 'Chung',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Xuan',\n 'vat' => '55571299954',\n 'address' => 'Via della seta',\n 'zip' => '21137',\n 'phone' => '3334133588',\n 'image' => 'https://lh3.googleusercontent.com/-9l9A01-22tIcnGyliIupCbF7qChLejD5B8k5Bg_VyxWryFJ2urQFmFssCJvieThO8TeFFtEnvmPMFPv=w1080-h608-p-no-v0'\n ],\n [\n 'name' => 'Filippo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Pizzeria Namek',\n 'vat' => '55561200054',\n 'address' => 'Via Namek',\n 'zip' => '21137',\n 'phone' => '33341893550',\n 'image' => 'https://i.ibb.co/DWYrDWg/20506989-123062131659736-760641137862062055-o.jpg'\n ],\n [\n 'name' => 'Tanaka',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'restaurant_name' => 'Toshi',\n 'vat' => '55560099954',\n 'address' => 'Via Giappone',\n 'zip' => '21137',\n 'phone' => '3332003500',\n 'image' => 'https://menu.sluurpy.it/menu-nuovi/4924/4924/miniatura.jpg'\n ]\n ];\n\n $types = Type::pluck('id')->toArray();\n\n foreach ($restaurants as $restaurant) {\n $new_user = new User();\n $new_user->fill($restaurant);\n $new_user->save();\n $new_user->types()->attach(Arr::random($types, 2));\n }\n\n // for ($i = 0; $i < 13; $i++) {\n // $new_user = new User();\n // $new_user->name = $faker->name();\n // $new_user->email = $faker->email();\n // $new_user->password = bcrypt($faker->word());\n // $new_user->restaurant_name = $faker->words(2, true);\n // $new_user->vat = $faker->randomNumber(9, true);\n // $new_user->address = $faker->address();\n // $new_user->zip = $faker->randomNumber(5, true);\n // $new_user->phone = $faker->phoneNumber();\n // $new_user->save();\n // $new_user->types()->attach(Arr::random($types, 2));\n // }\n }", "public function solicitudesRecibidas(Request $request,$filtro){\n //datos para el filtrado\n $nombre = $request->get('nombre');\n $id_carrera = $request->get('carrera_id');\n $numc = $request->get('numc');\n $roleid = $request->get('role_id');\n\n $visto = ($request->get('visto')) ? true :null;\n \n $id_carreras=UserCarrera::where('identificador',usuario()->identificador)->pluck('carrera_id');\n $carreras = Carrera::whereIn('id',$id_carreras)->get();\n //toma los id de carreras de las cuales tiene permiso\n if(!$id_carrera){\n $id_carrera = $id_carreras;\n }else{\n $id_carrera = array($id_carrera);\n }\n $respuesta = ($filtro == 'pendientes') ? '=' : '!='; \n $permisod = UserAdscripcion::where('identificador','=',usuario()->identificador)->pluck('adscripcion_id');\n $permisod = Adscripcion::whereIn('id',$permisod)->orWhere('tipo','administrativo')->pluck('id');\n\n\n //solicitudes de estudiantes y docentes que no han sido revisadas\n $solicitudes = Solicitud::join('users','solicituds.identificador','=','users.identificador')\n ->leftJoin('recomendacions','solicituds.id','=','recomendacions.id_solicitud')\n ->leftJoin('observaciones',function($join){\n $join->on('observaciones.solicitud_id', '=', 'solicituds.id')\n ->where('observaciones.identificador', '=', usuario()->identificador);\n })\n ->select('solicituds.*','observaciones.voto','observaciones.descripcion','observaciones.visto')\n ->where('recomendacions.respuesta',$respuesta,null)\n ->where(function ($query) use ($id_carrera,$permisod){\n $query->where('solicituds.enviadocoor','=',true)\n ->whereIn('users.carrera_id', $id_carrera)\n ->orWhere(function ($query) use ($permisod){\n $query->where('solicituds.enviado','=',true)\n ->whereIn('users.adscripcion_id',$permisod);});})\n ->whereHas('user', function($query) use ($nombre,$numc,$roleid) {\n $query->nombre($nombre)\n ->identificador($numc)\n ->role($roleid);})\n ->when($filtro == 'pendientes', function($query) use ($visto){\n $query->where('observaciones.visto',$visto);\n })\n ->paginate(5);\n $reuniones = Calendario::whereDate('start','<=',hoy())->orderBy('start','desc')->pluck('start'); \n if($filtro == 'finalizadas'){\n //si se filtran las solicitudes por finalizadas(vistas en reunion) se retorna la vista\n return view('jefe.solicitudesTerminadas',compact('solicitudes','carreras','reuniones'));\n }else{\n if(!$request->get('visto')){\n //si las solicitudes se filtran por recibidas(nuevas solicitudes) y que no han sido vistas\n //se hace un conteo esas solicitudes pendientes para notificar al usuario por si quedan solicitudes pendientes por revisar\n Notificacion::where([['identificador','=',usuario()->identificador],['tipo','=','solicitud']])->update(['num' => $solicitudes->total()]);\n }\n return view('jefe.solicitudesRecibidas',compact('solicitudes','carreras','reuniones'));\n }\n}", "private function queryDepositsAndWithdrawals() {\r\n return $this->queryAPI( 'returnDepositsWithdrawals', //\r\n [\r\n 'start' => time() - 14 * 24 * 3600,\r\n 'end' => time() + 3600\r\n ]\r\n );\r\n\r\n }", "public function testLocalSearchRestaurants()\n {\n $localResultSet = $this->_yahoo->localSearch('restaurants', ['zip' => '95014']);\n\n $this->assertTrue($localResultSet instanceof Zend_Service_Yahoo_LocalResultSet);\n\n $this->assertTrue($localResultSet->totalResultsAvailable > 10);\n $this->assertEquals(10, $localResultSet->totalResultsReturned);\n $this->assertEquals(10, $localResultSet->totalResults());\n $this->assertEquals(1, $localResultSet->firstResultPosition);\n\n foreach ($localResultSet as $localResult) {\n $this->assertTrue($localResult instanceof Zend_Service_Yahoo_LocalResult);\n }\n }", "public function getLocationList($return_active_only = TRUE);", "public function owner_request()\n\t{\n//\t\tcheck user type\n\t\tif ($this->session->userdata('user')['role'] != 'superAdmin') redirect('admin/home');\n\n\t\t$data['user'] = $this->session->userdata('user');\n\t\t$data['title'] = \"Home\";\n\n\t\t$this->db->select(\"claim_your_business.*, restaurants.name as restaurant_name\");\n\t\t$this->db->join('restaurants', 'restaurants.id = claim_your_business.restaurant_id');\n\t\t$this->db->where('claim_your_business.status != ', 2);\n\t\t$this->db->order_by('id', 'DESC');\n\t\t$data['business'] = $this->db->get('claim_your_business')->result();\n\n\t\t$this->load->view('layouts/header.php', $data);\n\t\t$this->load->view('admin/owner_index.php');\n\t\t$this->load->view('layouts/footer.php');\n\t}", "public static function getEligibleLokalReaktors($artwork)\n {\n $c = new Criteria();\n $c->add(self::LOKALREAKTOR, 1);\n $c->addJoin(LokalreaktorResidencePeer::SUBREAKTOR_ID,self::ID);\n $c->add(LokalreaktorResidencePeer::RESIDENCE_ID, $artwork->getUser()->getResidenceId());\n $result = self::doSelect($c);\n \n return $result;\n }", "public function index()\n {\n $id = Auth::user()->id;\n $restaurants = Restaurant::where('user_id',$id)->get();\n return view('owner.restaurant.index',compact('restaurants'));\n }", "public function get_flights($vars=array()) {\n\n if(!empty($vars))\n { \n $origin_city = (isset($vars['origin_city']) && ($vars['origin_city']!=\"\")) ? $vars['origin_city'] : \"\";\n $destination_city = (isset($vars['destination_city']) && ($vars['destination_city']!=\"\")) ? $vars['destination_city'] : \"\";\n $trip_type = (isset($vars['trip_type']) && ($vars['trip_type']!=\"\")) ? $vars['trip_type'] : 1;\n $departure_date = (isset($vars['departure_date']) && ($vars['departure_date']!=\"\")) ? $vars['departure_date'] : \"\";//date(\"Y-m-d\");\n $return_date = (isset($vars['return_date']) && ($vars['return_date']!=\"\")) ? $vars['return_date'] : \"\";//date(\"Y-m-d\",strtotime(\"+1 day\"));\n $persons = (isset($vars['persons']) && ($vars['persons']!=\"\")) ? $vars['persons'] : 1;\n \n $filters_flight = (isset($vars['filters_flight']) && ($vars['filters_flight']!=\"\")) ? $vars['filters_flight'] : \"\";\n $condition = \"\";\n if($filters_flight != \"\")\n {\n $condition .= \"arrivalLocation IN ($filters_flight) AND (Capacity > '0')\"; //This is to search for flight heading in cities that matched the filter result \n }else\n {\n //prepare condition\n if($trip_type == 2)\n { //return trip\n if(($origin_city == \"\") || ($destination_city == \"\") || ($departure_date == \"\") || ($return_date == \"\") )\n {\n return false;\n }\n $condition = \"( ( ( (DepartureAirport LIKE '%$origin_city%' AND ArrivalLocation LIKE '%$destination_city%') AND (DepartureDate = '$departure_date' ) ) \n OR ( (DepartureAirport LIKE '%$destination_city%' AND ArrivalLocation LIKE '%$origin_city%') AND (DepartureDate = '$return_date' ) ) )\n AND (Capacity >= '$persons') )\"; \n }else\n { //One way trip\n \n if(($origin_city == \"\") || ($destination_city == \"\") || ($departure_date == \"\") )\n {\n return false;\n }\n $condition = \"( ( (DepartureAirport LIKE '%$origin_city%' AND ArrivalLocation LIKE '%$destination_city%') AND (DepartureDate = '$departure_date' ) ) \n AND (Capacity >= '$persons') )\"; \n }\n }\n }else\n {\n $condition = \" 1='1' \"; \n }\n //echo $condition;\n $this->db->select('*');\n $this->db->from('flight');\n $this->db->where($condition);\n $this->db->order_by('Price', \"asc\");\n $query = $this->db->get();\n \n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n}", "public function check_restaurant_address(Request $request)\n {\n $area_id = $request->area_id;\n $source_lat = $request->lat;\n $source_lng = $request->lng;\n\n $data = $this->addarea->where('id',$area_id)\n ->selectRaw(\"(6371 * acos(cos(radians(\" . $source_lat . \"))* cos(radians(`latitude`)) \n * cos(radians(`longitude`) - radians(\" . $source_lng . \")) + sin(radians(\" . $source_lat . \")) \n * sin(radians(`latitude`)))) as distance\")\n ->having('distance','<=',DEFAULT_RADIUS)\n ->orderBy('distance')\n ->first();\n\n return $data;\n }", "public static function vehicles_employees_crits(){\n\t\treturn array('(company_name'=>CRM_ContactsCommon::get_main_company(),'|related_companies'=>array(CRM_ContactsCommon::get_main_company()));\n }", "public function getPlatoxRestaurant($idplato) {\n $adapter = $this->tableGateway->getAdapter();\n $sql = new Sql($adapter);\n $selecttot = $sql->select()\n ->from('ta_plato')\n ->columns(array('*', 'num' => new \\Zend\\Db\\Sql\\Expression('COUNT(tc.in_id)')))\n ->join('ta_tipo_plato', 'ta_plato.ta_tipo_plato_in_id=ta_tipo_plato.in_id ', array('tipo_plato_nombre' => 'va_nombre'), 'left')\n ->join(array('pl' => 'ta_plato_has_ta_local'), 'pl.ta_plato_in_id = ta_plato.in_id', array(), 'left')\n ->join(array('tl' => 'ta_local'), 'tl.in_id = pl.ta_local_in_id', array('va_horario_opcional','de_latitud','va_email', 'de_longitud', 'va_direccion', 'va_horario', 'va_dia', 'va_telefono','va_direccion_referencia'), 'left')\n ->join(array('tr' => 'ta_restaurante'), 'tr.in_id = tl.ta_restaurante_in_id', array('restaurant_id' => 'in_id', 'restaurant_nombre' => 'va_nombre', 'restaurant_img' => 'va_imagen','web'=>'va_web'), 'left')\n ->join(array('ttc' => 'ta_tipo_comida'), 'ttc.in_id=tr.ta_tipo_comida_in_id', array('tipo_comida'=>'va_nombre_tipo'), 'left') \n ->join(array('tu' => 'ta_ubigeo'), 'tu.in_id = tl.ta_ubigeo_in_id', array('pais' => 'ch_pais', 'departamento' => 'ch_departamento', 'provincia' => 'ch_provincia', 'distrito' => 'ch_distrito'), 'left')\n ->join(array('tc' => 'ta_comentario'), 'tc.ta_plato_in_id=ta_plato.in_id', array('estado_comen'=>'en_estado'), 'left')\n// ->join(array('tcli'=>'ta_cliente'),'tcli.in_id=tc.ta_cliente_in_id',array('va_nombre_cliente','va_email'),'left')\n ->where(array('ta_plato.in_id' => $idplato,'ta_plato.en_estado' =>'activo','tr.en_estado'=>'activo'));//'tc.en_estado'=>'aprobado'\n $selecttot->group('ta_plato.in_id');\n\n $selectString = $sql->getSqlStringForSqlObject($selecttot);\n $results = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n\n return $results; //->toArray();\n }", "public function getFlightsCustomAll($start_date, $end_date, $origin, $destination, $update_date_only)\n {\n \n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT p FROM FlyingMainBundle:Flights p\n WHERE p.active = 1\n AND p.date >= :start_date AND p.date <= :end_date\n AND p.origin = :origin AND p.destination = :destination\n AND p.lastUpdated <= :update_date_only'\n )->setParameters(array('start_date' => $start_date, 'end_date' => $end_date, 'origin' => $origin, 'destination' => $destination, 'update_date_only' => $update_date_only));\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n\n }", "public function retrieveTenants()\n {\n return $this->start()->uri(\"/api/tenant\")\n ->get()\n ->go();\n }", "public function getCriteria();", "public function authorize()\n {\n return $this->user()->memberOfTenant(tenant());\n }", "function GetAllDeniedPlacedOffers()\n {\n $placedOffersModel = new PlacedOffersModel();\n $placedOffersModel->GetAllDeniedPlacedOffers();\n }", "public function restaurant()\n {\n return $this->belongsTo('App\\Restaurant', 'restaurant_id');\n }", "public function getPermissions()\n {\n\n $roles = Role::where(function($query){\n\n $query->whereIn('id',$this->roles()->pluck('role_id'));\n\n })->with('permissions')->get();\n\n\n $permissions = $roles->map(function($role){\n\n $permissionData = $role->permissions->pluck('permission');\n\n if(sizeOf($permissionData) > 0)\n {\n return $permissionData[0];\n }\n\n })->filter(function($item){\n if($item !== null)\n {\n return $item;\n }\n });\n\n if ($permissions->count() <= 1)\n {\n return $permissions;\n }\n\n return $permissions->unique();\n\n }", "public static function getAllActiveRecurringCharges()\n\t{\n\t\t// Set the filter constraints (only retrieve the recurring adjusments that are awaiting approval)\n\t\t$arrFilter = array('recurringChargeStatus'\t=> array(\t'Type'\t=> self::SEARCH_CONSTRAINT_RECURRING_CHARGE_STATUS_ID,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Value'\t=> Recurring_Charge_Status::getIdForSystemName('ACTIVE')\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\n\t\t// Order by AccountId ascending\n\t\t$arrSort = array(Recurring_Charge::ORDER_BY_ACCOUNT_ID => true);\n\t\treturn self::searchFor($arrFilter, $arrSort);\n\t}", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "function getDoctorsByCriteria($speciality, $subspeciality, $chosencity, $chosenlocationid, $last,$count) {\r\n\t\t$sqlstring = \"select x.doctor_id, concat(a.first_name, ' ', a.last_name) as doctor, d.speciality as speciality, e.speciality as 'sub speciality',\";\r\n\t\t$sqlstring .= \" g.city as city, f.location as location\";\r\n\t\t$sqlstring .= \" from donors a, doctor x, schedule b, speciality_sub_speciality_link c, speciality d, sub_speciality e, location f, city g\";\r\n\t\t$sqlstring .= \" where a.donor_id = x.donor_id and x.doctor_id = b.doctor_id and x.speciality_Sub_Speciality_link_id = c.speciality_Sub_Speciality_link_id\";\r\n\t\t$sqlstring .= \" and c.speciality_id = d.speciality_id and c.sub_speciality_id = e.sub_speciality_id\";\r\n\t\t$sqlstring .= \" and b.location_id = f.location_id and f.city_id = g.city_id\";\r\n\r\n\t\tif ( !(empty($speciality)) && (strlen($speciality) > 0) )\r\n\t\t\t$sqlstring .= \" and d.speciality = '\" . $speciality . \"'\";\r\n\r\n\t\tif ( !(empty($subspeciality)) && (strlen($subspeciality) > 0) )\r\n\t\t\t$sqlstring .= \" and e.speciality = '\" . $subspeciality . \"'\";\r\n\r\n\t\tif ( !(empty($chosencity)) && (strlen($chosencity) > 0) )\r\n\t\t\t$sqlstring .= \" and g.city = '\". $chosencity . \"'\";\r\n\r\n\t\tif ( !(empty($chosenlocationid)) && (strlen($chosenlocationid) > 0) )\r\n\t\t\t$sqlstring .= \" and f.location_id = \". $chosenlocationid;\r\n\t\t\r\n\t\t$sqlstring .= \" group by doctor_id, doctor, Speciality, 'Sub Speciality', city, location\";\r\n\t\t$sqlstring .= \" limit \". $last. \",\". $count;\r\n\r\n\t\treturn $this->exec($sqlstring);\r\n\t}" ]
[ "0.696992", "0.6287122", "0.6181779", "0.6047981", "0.6011092", "0.59179544", "0.58538026", "0.5671452", "0.5619524", "0.5612831", "0.5478126", "0.5408447", "0.5402133", "0.5388593", "0.53553134", "0.5297504", "0.5294551", "0.5285207", "0.52418315", "0.5188748", "0.5183477", "0.5170611", "0.51704574", "0.51618284", "0.51544493", "0.5151464", "0.51475155", "0.514517", "0.51431257", "0.5115906", "0.5114345", "0.51124847", "0.51053315", "0.51050866", "0.50881034", "0.50728744", "0.5069225", "0.5060817", "0.5059409", "0.50553346", "0.5051213", "0.5050183", "0.50424033", "0.5041753", "0.5032888", "0.5032099", "0.5030912", "0.5008834", "0.50038755", "0.49936524", "0.49929586", "0.49830306", "0.49830306", "0.4981852", "0.49774846", "0.49722603", "0.49714285", "0.49570256", "0.4954247", "0.4954107", "0.49504945", "0.49442148", "0.49425423", "0.49384987", "0.49342048", "0.4933828", "0.49322513", "0.49224722", "0.49101985", "0.4908273", "0.49033943", "0.48910722", "0.48886254", "0.4877696", "0.48713988", "0.48572257", "0.485597", "0.4850591", "0.48493645", "0.48359114", "0.4834876", "0.48334497", "0.48294783", "0.48243433", "0.48209623", "0.48197207", "0.48191634", "0.48185334", "0.48169848", "0.48142463", "0.48040354", "0.48034236", "0.48031062", "0.47971475", "0.47881037", "0.47861582", "0.47859892", "0.47859722", "0.4775527", "0.47732395" ]
0.6609882
1
get restaurants, having restriction on this company any company assigned to restaurant is only allowed to order same as getRestaurantRestrictions, returning the array
public function getRestaurantsAssociations() { return $this->getTable()->getRestaurantsAssociations(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRestaurantRestrictions() {\n return $this->getTable()->getRestaurantRestrictions();\n }", "public function getNotApprovedRestaurants() {\n\t\t$query = \"SELECT * FROM restaurant WHERE approved = 1\";\n\t\t$rest_list;\n\t\t$result = $this->mysqli->query($query);\n\t\t$i = 0;\n\t\twhile ($row = $result->fetch_object()) {\n\t\t\t$restaurant = new Restaurant();\n\t\t\t$restaurant->setId($row->id);\n\t\t\t$restaurant->setName($row->name);\n\t\t\t$restaurant->setLatitude($row->latitude);\n\t\t\t$restaurant->setLongitude($row->longitude);\n\t\t\t$restaurant->setWebsite($row->website);\n\t\t\t$restaurant->setCity($row->city);\n\t\t\t$restaurant->setFax($row->fax);\n\t\t\t$restaurant->setHas_breakfast($row->hasbreakfast);\n\t\t\t$restaurant->setHas_dinner($row->hasdinner);\n\t\t\t$restaurant->setHas_lunch($row->haslunch);\n\t\t\t$restaurant->setHittaURL($row->hittaURL);\n\t\t\t$restaurant->setMail_city($row->mailcity);\n\t\t\t$restaurant->setPhone($row->phone);\n\t\t\t$restaurant->setStreet($row->street);\n\t\t\t$restaurant->setType($row->type_name);\n\t\t\t$restaurant->setZip($row->zipcode);\n\t\t\t$rest_list[$i];\n\t\t\t$i++;\n\t\t}\n\t\treturn $rest_list;\n\t}", "public function getRestrictions() \n {\n return $this->_restrictions; \n }", "public function getRestrictions()\n {\n return $this->restrictions;\n }", "public function getRestrictions()\n {\n return $this->restrictions;\n }", "private function findRestaurandsInCommon()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n\n $allRestaurantIDs = array();\n $userlist = $dbHandler->getUsers();\n\n $restaurants = $dbHandler->getRestaurants();\n foreach ($restaurants as $restaurant) {\n $allRestaurantIDs[] = $restaurant->getId();\n }\n foreach ($userlist as $user) {\n $restaurants = $user->getPreferedRestaurantIds();\n $restaurantID = array();\n foreach ($restaurants as $restaurant) {\n $restaurantID[] = $restaurant[\"Id\"];\n\n }\n $allRestaurantIDs = array_intersect($restaurantID,$allRestaurantIDs);\n }\n return $allRestaurantIDs;\n }", "public function getAllCompanyRecruitment()\n {\n return \\App\\Recruitment::getAllCompanyRecruitments(\\Auth::id());\n }", "function fetch_all_restaurants_of_user($restaurant_creator)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->where(array(\n\t\t\t\t\t\t\t'restaurant_creator' => $restaurant_creator,\n\t\t\t\t\t\t))\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "function fetch_all_active_restaurants_of_user($restaurant_creator)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->where(array(\n\t\t\t\t\t\t\t'restaurant_status' => 1,\n\t\t\t\t\t\t\t'restaurant_creator' => $restaurant_creator,\n\t\t\t\t\t\t))\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "public static function getAdditionalCommissions($restaurantId) {\n $db = Zend_Registry::get('dbAdapter');\n\n $result = array();\n\n try{\n $sql = 'select * from restaurant_commission rc where rc.restaurantId = '. $restaurantId . ' order by rc.from';\n $result = $db->fetchAll($sql);\n }\n catch ( Zend_Db_Statement_Exception $e ){\n return null;\n }\n\n return $result;\n }", "public static function getAvailableContractors(): array\n {\n $contractorsQuery = ContractorOccupation::find()->select('DISTINCT(contractor_id)');\n\n return self::find()\n ->select('*')\n ->addSelect([\n 'COUNT(task.contractor_id) AS doneTaskCount',\n 'COUNT(review.task_id) AS reviewCount',\n 'AVG(review.rating) AS rating'\n ])\n ->rightJoin(['occupation' => $contractorsQuery], 'user.id = occupation.contractor_id')\n ->leftJoin('task', 'task.contractor_id = user.id')\n ->leftJoin('review', 'task.id = review.task_id')\n\n ->andWhere(['task.state_id' => Task::STATE_DONE])\n ->andWhere(['user.hide_profile' => false])\n ->groupBy('user.id')\n ->orderBy('user.datetime_created ASC')\n ->all();\n }", "public function getRestaurants(){\n \n $result = self::where([\n \"status\" => \"Active\"\n ])\n ->select([\"id\",\"name\",\"has_gst\"])\n ->orderBy(\"name\")\n ->get();\n \n return $result;\n }", "public function get_target_restaurant_list () {\n\t\t$restaurantList = $this->get_param('post.restaurant_list');\n\t\t$grouponRestaurantList = $this->get_param('post.groupon_restaurant_list');\n\n\t\t$this->get_restaurant_list($restaurantList, $grouponRestaurantList);\n\t}", "public function allRestaurants()\n {\n $compQuery = Company::where([\n 'active' => 1,\n 'companytype_id' => 1, // restaurants\n ])->get();\n\n $companies = new collection();\n\n foreach ($compQuery as $company) {\n $companies->push([\n 'id' => $company->id,\n 'area_id' => $company->area_id,\n 'name' => $company->name,\n 'slug' => $company->slug,\n 'rating' => intval($company->rating),\n 'description' => $company->description,\n 'address' => $company->address,\n 'image' => Front::myMediaUrl($company, 'company_image', 'banner'),\n ]);\n }\n // dd($companies);\n\n $pageConfigs = [\n 'newsletter' => true,\n 'breadcrumb' => true,\n 'title' => 'Abboda Restaurants',\n ];\n return view('pages.restaturants', [\n 'pageConfigs' => $pageConfigs,\n 'companies' => $companies->toArray(),\n ]);\n }", "public function getCustomerResultPermissions(): array;", "public function getOtherCriteriaList() {\n return $this->_get(9);\n }", "private function determineCarriersForPudoLocations(\n bool $onlyActiveContracts,\n CarrierInterface $specificCarrier = null\n ): array {\n // If we're looking for a specific carrier but it doesn't\n // matter if it has active contracts, just return it immediately.\n if (!$onlyActiveContracts && $specificCarrier) {\n return [$specificCarrier];\n }\n\n // Return all carriers if we're not filtering for anything specific.\n if (!$onlyActiveContracts) {\n return $this->getCarriers()->get();\n }\n\n $parameters = [\n 'has_active_contract' => 'true',\n 'delivery_method' => 'pick-up',\n ];\n\n if ($specificCarrier) {\n $parameters['carrier'] = $specificCarrier->getId();\n }\n\n $pudoServices = $this->getServices(null, $parameters)->get();\n\n return array_map(function (Service $service) {\n return $service->getCarrier();\n }, $pudoServices);\n }", "public function getAvailableCompanies()\n {\n return $this->createQuery('c')\n ->select('c.*')\n ->addSelect(\n \"(SELECT ROUND(AVG(r.rating), 2)\n FROM Companies_Model_Review r\n WHERE r.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND r.company_id = c.id) as rating\"\n )\n ->addSelect(\"(SELECT COUNT(rc.id)\n FROM Companies_Model_Review rc\n WHERE rc.status = '\" . Companies_Model_Review::STATUS_PUBLISHED . \"'\n AND rc.company_id = c.id) as review_count\")\n ->whereIn('c.status', Companies_Model_Company::getActiveStatuses())\n ->orderBy('rating DESC')\n ->execute();\n }", "public static function getRestriction(): Restriction;", "public function getRentals(): array\n {\n return $this->rentals;\n }", "public function getAccessRestrictions()\n {\n return $this->getFieldArray('506');\n }", "public function getCriteriaList() {\n return $this->_get(6);\n }", "public function getCriteria();", "public static function vehicles_employees_crits(){\n\t\treturn array('(company_name'=>CRM_ContactsCommon::get_main_company(),'|related_companies'=>array(CRM_ContactsCommon::get_main_company()));\n }", "private function _getRestriction($data, $secodaryKey, $allowGlobal = true)\n {\n $restriction = [];\n\n if ($data) {\n $restriction[$secodaryKey] = $this->_getSecondaryKeys($data, $this->viaModel->formName());\n }\n\n if ($allowGlobal && $this->restriction) {\n $restriction = ArrayHelper::merge($restriction, $this->restriction);\n }\n\n return $restriction;\n }", "function getPermissions($company_id = 0, $role_id=0, $project_id=0, $access_id=0, $item_id=0){\n\t\tGLOBAL $AppUI;\n\t\t$rta=Array();\n\n\t\t// set project's filter\n\t\t$whereProject.= \"\\n\\tAND rp.project_id = \";\n\t\t$whereProject .= @$project_id != 0 ? $project_id : \"-1\";\n\t\t$whereCompany .= \"\\n\\tAND rp.company_id = \";\n\t\t$whereCompany .= @$company_id != 0 ? $company_id : \"-1\";\n\t\t// set access's filter\n\t\t$where=\"\";\n\t\tif (@$company_id!=0){\n\t\t\t$where.= \"\\n\\tAND (r.role_type=0 or r.role_type=1 and r.role_company=$company_id)\";\n\t\t}\n\t\t\n\t\t\t\t\t\t\n\t\t// set access's filter\n\t\tif (@$access_id!=0){\n\t\t\t$where.= \"\\n\\tAND rp.access_id = $access_id\";\n\t\t}\n\n\t\t// set permission's filter\n\t\tif (@$item_id!=0){\n\t\t\t$where.= \"\\n\\tAND rp.item_id = $item_id\";\n\t\t}\n\n\t\tif (@$role_id!=0){\n\t\t\t$where.= \"\\n\\tAND (r.role_id=$role_id)\";\n\t\t}\n\t\t$sql=\"\n(select DISTINCT \nr.role_id\n, r.role_name\n, -1 project_id \n, 'All' project_name\n, ta.access_id\n, ta.access_name\n, tpi.item_id\n, tpi.item_name\n, 9 permission_value\nfrom \nroles r\n,task_access ta\n,task_permission_items tpi \nWHERE\t1=1\n\t\t$where\norder by\nrole_id,project_id,access_id,item_id,permission_value)\nunion\n(select DISTINCT \nr.role_id\n, r.role_name\n, rp.project_id \n, 'All' project_name\n, rp.access_id\n, ta.access_name\n, tpi.item_id\n, tpi.item_name\n, rp.permission_value\n\nfrom \nroles r\n,role_permissions rp left join task_access ta on ta.access_id=rp.access_id\n,task_permission_items tpi \nwhere\n\t\trp.role_id = r.role_id \n\tand\ttpi.item_id=rp.item_id\n\tand\t(ta.access_id=rp.access_id or rp.access_id=-1)\n$whereProject\n$whereCompany\n$where\norder by\nrole_id,project_id,access_id,item_id,permission_value\n)\n\t\";\n\t\t//echo \"<pre>$sql</pre>\";\n\t\t$rta=db_loadList( $sql );\t\t\n\t\t$out=array();\n\t\t$r=\"role_id\";\n\t\t$p=\"project_id\";\n\t\t$a=\"access_id\";\n\t\t$i=\"item_id\";\n\t\t$v=\"permission_value\";\n\t\tforeach($rta as $j=>$fila){\n\t\t\t$curval = $out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])];\n\t\t\tif (isset($curval)){\n\t\t\t\tif( $curval > $fila[$v]){\n\t\t\t\t\t//echo \"$curval - $fila[$v] {[$fila[$r]][$fila[$p]][$fila[$a]][$fila[$i]]}\";\n\t\t\t\t\t$out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])]=$fila[$v];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$out[intval($fila[$r])][intval($fila[$p])][intval($fila[$a])][intval($fila[$i])]=$fila[$v];\n\t\t\t}\n\t\t\tunset($curval);\n\t\t}\n\t\t//$curval =$out[\"4\"][\"-1\"][\"1\"][\"1\"];\n\t\t//$curval =$out[4][-1][1][1];\n\t\t//echo \"PRM= $curval <br>\";\n\t\t\n\t\treturn $out;\t\n\t}", "private function approvedByRole()\n {\n $pending = \\ApprovalSequence\\Models\\Entity::Where('entity_id', $this[$this->primaryKey])->get();\n $approvers = $pending->map(function ($item) {\n return $item->approver->role_id;\n });\n //to avoid duplication\n return $approvers->unique();\n }", "public function get(): array\n {\n return $this->criterions;\n }", "public function getRightsGroupsListWithRestrictions($restrictions){\n\t\t$last_index = count($restrictions)-1;\n\t\t$query = \"SELECT rights_group_id,rights_group_name,rights_group_description FROM RightsGroups\";\n\t\tif(count($restrictions) > 0){\n\t\t\t$query .= \" WHERE \";\n\t\t\tforeach($restrictions as $key => $value) {\n\t\t\t\t$query .= $value;\n\t\t\t\tif($key != $last_index){\n\t\t\t\t\t$query .= \" AND \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( $this->config->debug )\n\t\t\techo \"<!-- DEBUG: GenyRightsGroup MySQL query : $query -->\\n\";\n\t\t$result = mysql_query($query, $this->handle);\n\t\t$object_list = array();\n\t\tif (mysql_num_rows($result) != 0){\n\t\t\twhile ($row = mysql_fetch_row($result)){\n\t\t\t\t$tmp_object = new GenyClient();\n\t\t\t\t$tmp_object->id = $row[0];\n\t\t\t\t$tmp_object->name = $row[1];\n\t\t\t\t$tmp_object->description = $row[2];\n\t\t\t\t$object_list[] = $tmp_object;\n\t\t\t}\n\t\t}\n// \t\tmysql_close();\n\t\treturn $object_list;\n\t}", "public function getAllRestaurants(){\n $query=$this->db->query(\"SELECT * FROM restaurant\");\n if($query->num_rows){\n $tmp['restaurants']=$query->rows;\n \n foreach($tmp['restaurants'] as &$restaurant){\n $query=$this->db->query(\"SELECT COUNT(review_id) AS num_review,ROUND(AVG(rating),0) AS rating FROM reviews WHERE restaurant_id=\".$restaurant['restaurant_id']);\n if($query->num_rows){\n $restaurant['num_review']=$query->rows[0]['num_review'];\n if($restaurant['num_review']!=0)\n $restaurant['rating']=$query->rows[0]['rating'];\n else\n $restaurant['rating']=0;\n }\n else{\n $restaurant['num_review']=0;\n $restaurant['rating']=0;\n }\n }\n\n $tmp['status']=\"success\";\n return $tmp;\n }\n else{\n return array(\"status\"=>\"fail\",\"error\"=>\"no restaurants found.\");\n }\n }", "public function getrestaurant()\n\t{\t\t\n\t\t$this->db->select(\"res.*,ht.hotal_name\");\n\t\t$this->db->from(RESTAURANT.\" as res\");\n\t\t$this->db->join(Hotal.\" as ht\", \"ht.id = res.hotal_id\");\n\t\t$this->db->where(\"res.is_deleted='0'\");\n\t\t$this->db->order_by(\"res.id\",\"DESC\");\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\t\n\t}", "protected function getCarriers()\n {\n /** @var \\MageWorx\\ShippingRules\\Model\\ResourceModel\\Carrier\\Collection $carrierCollection */\n $carrierCollection = $this->carrierCollectionFactory->create();\n $result = $carrierCollection->toOptionArray();\n\n return $result;\n }", "public static function getLokalReaktors($referenceArray = false,$active_only=false)\n {\n $c = new Criteria();\n $c->add(self::LOKALREAKTOR, 1);\n \n\n if ($active_only)\n {\n $c->add(SubreaktorPeer::LIVE,1);\n }\n\n $result = self::doSelect($c);\n if ($referenceArray)\n {\n $returnArray = array();\n foreach ($result as $resultRow)\n {\n $returnArray[$resultRow->getId()] = $resultRow->getReference();\n }\n return $returnArray;\n }\n \n return $result;\n }", "private function getAllApplicants() {\n $applicants = DB::table('crew')\n ->leftJoin('crewfasttrack', 'crewfasttrack.APPLICANTNO', '=', 'crew.APPLICANTNO')\n ->leftJoin('fasttrack', 'fasttrack.fasttrack', '=', 'crewfasttrack.FASTTRACKCODE')\n ->leftJoin('crewscholar', 'crewscholar.APPLICANTNO', '=', 'crew.APPLICANTNO')\n ->leftJoin('scholar', 'scholar.SCHOLASTICCODE', '=', 'crewscholar.SCHOLASTICCODE')\n ->leftJoin('crewchange', function ($join) {\n $join->on('crewchange.APPLICANTNO', '=', 'crew.APPLICANTNO')\n ->where('crewchange.DATEEMB', DB::raw(\"(select max(crewchange.DATEEMB) from crewchange where crewchange.APPLICANTNO = crew.APPLICANTNO )\"))\n ->groupby('crewchange.APPLICANTNO');\n })\n ->leftJoin('rank', 'rank.RANKCODE', '=', 'crewchange.RANKCODE')\n ->leftJoin('vessel', function ($join) {\n $join->on('vessel.VESSELCODE', '=', 'crewchange.VESSELCODE')\n ->whereDate('crewchange.DATEEMB', '<', Carbon::now())\n ->whereDate('crewchange.DATEDISEMB', '>', Carbon::now());\n })\n ->select('crew.APPLICANTNO', 'crew.CREWCODE', 'crew.FNAME', 'crew.GNAME', 'crew.MNAME', 'crew.STATUS', \n 'crew.UTILITY', 'scholar.DESCRIPTION', 'fasttrack.FASTTRACK', 'rank.RANK', 'vessel.VESSEL')->paginate(15);\n return $applicants;\n }", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "private function getFiltroReputacao()\n {\n return (array)$this->filtros['reputacao'];\n }", "public static function getAllReaktors($referenceArray = false,$active_only=false)\n {\n $c = new Criteria();\n\n\n if ($active_only)\n {\n $c->add(SubreaktorPeer::LIVE,1);\n }\n\n $result = self::doSelect($c);\n if ($referenceArray)\n {\n $returnArray = array();\n foreach ($result as $resultRow)\n {\n $returnArray[$resultRow->getId()] = $resultRow->getReference();\n }\n return $returnArray;\n }\n\n return $result;\n }", "public function getRecurringOrders();", "protected function armaColeccionZpCarac() {\n $arrayRet = array();\n $dao = new PGDAO();\n $where = $this->strZpTprop();\n if ($where != '') {\n $arrayRet = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARAC . \" where tipoprop in (\" . $where . \")\"));\n } else {\n $arrayRet = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARAC));\n }\n return $arrayRet;\n }", "public function getRestrictions() : ?ReposOwnerRepoBranchesBranchProtectionPutBodyRestrictions\n {\n return $this->restrictions;\n }", "function fetch_all_restaurants($limit, $start, $query)\n {\n $search = $query['search'];\n $restaurant_creator = $query['restaurant_creator'];\n\t\t$this->db->select('*')->from($this->table);\n // if client search something\n if(!empty($search)) $this->db->like('restaurant_name', $search);\n if(!empty($restaurant_creator)) $this->db->where('restaurant_creator', $restaurant_creator);\n\t\t$query = $this->db->limit($limit, $start)->get()->result_array();\n\t\t\n\t\tforeach ($query as $key => $restaurant) {\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$tags = $this->tag_model->fetch_all_tags_of_restaurant($restaurant['restaurant_id']);\n $query[$key]['tags'] = $this->global_model->belong_to_many('restaurant_tags', 'tags', 'restaurant_id', $restaurant['restaurant_id'], 'tag_id');\n\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$categories = $this->global_model->has_many('categories', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['categories'] = $categories;\n\n\t\t\t// this method fetch all tags of a restaurant\n\t\t\t$ratings = $this->global_model->with('ratings', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['rating'] = '';\n\t\t\t// total rows\n\t\t\t$totalRows = count($ratings);\n\t\t\t// sum of rating points\n\t\t\t$sumOfRating = 0;\n\t\t\tforeach ($ratings as $rating) {\n\t\t\t\t$sumOfRating += $rating['rating'];\n\t\t\t}\n\t\t\t// if restaurant has rating\n\t\t\tif ($totalRows != 0) {\n\t\t\t\t// average of rating\n\t\t\t\t$query[$key]['totalRated'] = $totalRows;\n\t\t\t\t$query[$key]['rating'] = number_format($sumOfRating / $totalRows, 1, '.', '');\n\t\t\t}\n\n\t\t\t// this method fetch restaurant creator info\n\t\t\t$user = $this->global_model->with('users', 'id', $restaurant['restaurant_creator']);\n\t\t\t$query[$key]['creator'] = $user;\n\n\t\t}\n\n\t\t// return data from server\n\t\treturn $query;\n\t}", "public function getResturantDetails(){\n // $endPrice = $this->_request['endPrice'] != \"undefined\" ? intval ($this->_request['endPrice']) : -1;\n \n $sql = \"select * from resturants r join city c on r.CityId = c.CityID\";\n // if($startPrice!=\"undefined\")\n // {\n // $sql.=\" where r.start_price>=$startPrice \";\n // if($endPrice != -1 )\n // $sql.=\" and r.end_price<=$endPrice\";\n // }\n $rows = $this->executeGenericDQLQuery($sql);\n $resturantDetails = array();\n for($i=0;$i<sizeof($rows);$i++)\n {\n\n\n $resturantDetails[$i]['Name'] =($rows[$i]['Name'] == null || $rows[$i]['Name'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Name'] ;\n $resturantDetails[$i]['Address'] =($rows[$i]['Address'] == null || $rows[$i]['Address'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Address'] ;\n $resturantDetails[$i]['content'] =($rows[$i]['content'] == null || $rows[$i]['content'] ==\"null\") ? \"No Data Available\" : $rows[$i]['content'] ;\n $resturantDetails[$i]['Phone1'] =($rows[$i]['Phone1'] == null || $rows[$i]['Phone1'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone1'] ;\n $resturantDetails[$i]['Phone2'] =($rows[$i]['Phone2'] == null || $rows[$i]['Phone2'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone2'] ;\n $resturantDetails[$i]['Phone3'] =($rows[$i]['Phone3'] == null || $rows[$i]['Phone3'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Phone3'] ;\n $resturantDetails[$i]['Mobile'] =($rows[$i]['Mobile'] == null || $rows[$i]['Mobile'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Mobile'] ;\n $resturantDetails[$i]['Website'] =($rows[$i]['Website'] == null || $rows[$i]['Website'] ==\"null\") ? \"No Data Available\" : $rows[$i]['Website'] ;\n $resturantDetails[$i]['Category'] =($rows[$i]['Category'] == null) ? 0 : $rows[$i]['Category'] ;\n $resturantDetails[$i]['Facilities'] =$this->getFacilitiesByIds($rows[$i]['Facilities']);\n $resturantDetails[$i]['CityId'] =$rows[$i]['CityId'] ;\n $resturantDetails[$i]['stdCode'] =$rows[$i]['STDCode'] ;\n $resturantDetails[$i]['icon_image'] =($rows[$i]['icon_image'] == null || $rows[$i]['icon_image'] ==\"null\") ? \"img/not_found.jpg\" : $rows[$i]['icon_image'] ;\n $resturantDetails[$i]['home_image'] =($rows[$i]['home_image'] == null || $rows[$i]['home_image'] ==\"null\") ? \"img/not_found.jpg\" : $rows[$i]['home_image'] ;\n \n \n }\n $this->response($this->json($resturantDetails), 200);\n\n }", "public function getRespondentOrganizations()\n {\n\n if (! $this->_hasVar('__allowedRespOrgs')) {\n $availableOrganizations = $this->util->getDbLookup()->getOrganizationsWithRespondents();\n $allowedOrganizations = $this->getAllowedOrganizations();\n\n $this->_setVar('__allowedRespOrgs', array_intersect($availableOrganizations, $allowedOrganizations));\n }\n // \\MUtil_Echo::track($this->_getVar('__allowedOrgs'));\n\n return $this->_getVar('__allowedRespOrgs');\n }", "public function getIdeasListWithRestrictions( $restrictions ) {\n\t\t$last_index = count( $restrictions ) - 1;\n\t\t$query = \"SELECT idea_id,idea_title,idea_description,idea_votes,idea_status_id,idea_submitter FROM Ideas\";\n\t\tif( count( $restrictions ) > 0 ) {\n\t\t\t$query .= \" WHERE \";\n\t\t\tforeach( $restrictions as $key => $value ) {\n\t\t\t\t$query .= $value;\n\t\t\t\tif( $key != $last_index ) {\n\t\t\t\t\t$query .= \" AND \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( $this->config->debug ) {\n\t\t\techo \"<!-- DEBUG: GenyIdea MySQL query : $query -->\\n\";\n\t\t}\n\t\t$result = mysql_query( $query, $this->handle );\n\t\t$idea_list = array();\n\t\tif( mysql_num_rows( $result ) != 0 ) {\n\t\t\twhile( $row = mysql_fetch_row( $result ) ) {\n\t\t\t\t$tmp_idea = new GenyIdea();\n\t\t\t\t$tmp_idea->id = $row[0];\n\t\t\t\t$tmp_idea->title = $row[1];\n\t\t\t\t$tmp_idea->description = $row[2];\n\t\t\t\t$tmp_idea->votes = $row[3];\n\t\t\t\t$tmp_idea->status_id = $row[4];\n\t\t\t\t$tmp_idea->submitter = $row[5];\n\t\t\t\t$idea_list[] = $tmp_idea;\n\t\t\t}\n\t\t}\n// \t\tmysql_close();\n\t\treturn $idea_list;\n\t}", "public function getCompanyWithUsers();", "public function getAllowedOrganizations()\n {\n\n if (! $this->_hasVar('__allowedOrgs')) {\n $this->refreshAllowedOrganizations();\n }\n // \\MUtil_Echo::track($this->_getVar('__allowedOrgs'));\n\n return $this->_getVar('__allowedOrgs');\n }", "public function getPermissions()\n {\n\n $roles = Role::where(function($query){\n\n $query->whereIn('id',$this->roles()->pluck('role_id'));\n\n })->with('permissions')->get();\n\n\n $permissions = $roles->map(function($role){\n\n $permissionData = $role->permissions->pluck('permission');\n\n if(sizeOf($permissionData) > 0)\n {\n return $permissionData[0];\n }\n\n })->filter(function($item){\n if($item !== null)\n {\n return $item;\n }\n });\n\n if ($permissions->count() <= 1)\n {\n return $permissions;\n }\n\n return $permissions->unique();\n\n }", "public function getCriteriaCollection(): CriteriaCollection;", "public static function getEligibleLokalReaktors($artwork)\n {\n $c = new Criteria();\n $c->add(self::LOKALREAKTOR, 1);\n $c->addJoin(LokalreaktorResidencePeer::SUBREAKTOR_ID,self::ID);\n $c->add(LokalreaktorResidencePeer::RESIDENCE_ID, $artwork->getUser()->getResidenceId());\n $result = self::doSelect($c);\n \n return $result;\n }", "private function getGriidcStaff(): array\n {\n $entityManager = $this->getDoctrine()->getManager();\n //get user Ids of Griidc Staff to exclude from the report with personDataRepository roles of:\n //Manager (1), Developer (2), Support (3), Subject Matter Expert (4)\n $griidcUserQueryString = 'SELECT account.userId FROM ' . PersonDataRepository::class .\n ' personDataRepository JOIN ' . Person::class .\n ' person WITH person.id = personDataRepository.person JOIN ' . Account::class .\n ' account WITH account.person = person.id WHERE personDataRepository.role in (1, 2, 3, 4) ';\n $griidcUserResult = $entityManager->createQuery($griidcUserQueryString)->getScalarResult();\n return array_column($griidcUserResult, 'userId');\n }", "function fetch_some_restaurants($restaurant_name)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->like('restaurant_name', $restaurant_name)\n\t\t\t\t\t\t->limit(5)\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "public function getAdmins() {\n $a = new SplObjectStorage();\n $admins = $this->getTable()->getAdmins();\n foreach ($admins as $admin) {\n try {\n $customer = new Yourdelivery_Model_Customer_Company($admin['id'], $this->getId());\n $a->attach($customer);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n continue;\n }\n }\n return $a;\n }", "public function getRequesterCompanies (usuario $user = null, $self = true, $corps = true, $requirements = false)\n {\n $actives = new ArrayObjectList();\n $company = $user instanceof usuario ? $user->getCompany() : null;\n $requesters = $this->obtenerEmpresasCliente($company, $user);\n\n\n // loop over each requester\n foreach ($requesters as $requester) {\n $actives[] = $requester;\n\n if ($corps === true && $corp = $requester->perteneceCorporacion()) {\n $actives[] = $requester;\n\n if ($user instanceof usuario) {\n // Need to check the visibility to the corp\n $limiterUser = $user->getUserLimiter($corp);\n if ($limiterUser && $limiterUser->compareTo($user) === false) {\n continue;\n }\n }\n\n $actives[] = $corp;\n }\n }\n\n if ($self === true) {\n $limiterUser = $user instanceof usuario ? $user->getUserLimiter($this) : false;\n\n // if the user who hide the visibility is the same as $user\n // we have an optional visibility, and we dont want to hide\n // those clients here\n if ($limiterUser === false || $limiterUser->compareTo($user)) {\n\n //adding own company if the user has visibility\n $actives[] = $this;\n }\n }\n\n // filter the companies with docs if neeeded\n if ($requirements) {\n $withRequirements = new ArrayObjectList();\n foreach ($actives as $i => $active) {\n if ($active->countCorpDocuments() > 0) {\n $withRequirements[] = $active;\n }\n }\n\n $actives = $withRequirements;\n }\n\n return $actives->unique();\n }", "public function get_criteria() { return $this->criteria_list; }", "public function getRecruiters(){\n\t\t\n\t\t$ar = array();\n\t\t\n\t\t$result = $this->adapter->query(\"select * from vemplist WHERE emp_dept LIKE '%R%' OR emp_dept LIKE '%LR%' OR emp_dept LIKE '%LA%' order by ctct_name\")->execute();\n\t\t\n\t\tforeach ($result as $row) \n\t\t\t{\n\t\t\t\t$ar[$row['emp_id']]=$row['ctct_name'];\n\t\t\t}\n\t\t\n\t\treturn $ar;\n\t}", "private function getFilteredCarers($criteria) {\n //always on\n $active = true;\n $nationality = 'all';\n\n //dynamic\n $personGender = $criteria['person_gender'];\n if ($personGender == Constants::GENDER_FEMALE) {\n $workWithMale = false;\n $workWithFemale = true;\n } else {\n $workWithMale = true;\n $workWithFemale = false;\n }\n\n //default value if not saved before in DB\n if (!isset($criteria['showMale'])) {\n $criteria['showMale'] = false;\n }\n if (!isset($criteria['showFemale'])) {\n $criteria['showFemale'] = false;\n }\n if (!isset($criteria['type_care']) || $criteria['type_care'] == \"\") {\n $criteria['type_care'] = Constants::HOURLY;\n }\n\n $showMale = $criteria['showMale'];\n $showFemale = $criteria['showFemale'];\n\n $physicalId = $criteria['physical_condition'];\n $mentalId = $criteria['mental_condition'];\n $ageGroupId = $criteria['age_group'];\n\n if ($criteria['type_care'] == Constants::HOURLY) {\n $hourly = true;\n $liveIn = false;\n } else {\n $hourly = false;\n $liveIn = true;\n }\n\n $activities = array();\n foreach ($criteria as $key => $value) {\n\n if (Util::startsWith($key, 'activities_')) {\n\n $val = Util::lastCharactersAfter($key, 'activities_condition_');\n $activities[] = $val;\n }\n }\n\n $model = Condition::loadModel($physicalId);\n $physicals = $model->getConditionsIdsUp();\n\n $model = Condition::loadModel($mentalId);\n $mentals = $model->getConditionsIdsUp();\n\n $ageGroup = array($ageGroupId);\n\n $postCodeRaw = $criteria['postCode'];\n $postCode = strip_tags(trim(strtoupper($postCodeRaw)));\n if (empty($postCode)) {\n $postCode = null;\n }\n\n $language = 'english';\n\n $carers = DBServices::getFilteredCarers2($activities, $physicals, $mentals, $ageGroup, $active, $workWithMale, $workWithFemale, $nationality, $liveIn, $hourly, $showMale, $showFemale, $postCode, $language);\n\n return $carers;\n }", "public function getAllowedCarriers()\n {\n return isset($this->AllowedCarriers) ? $this->AllowedCarriers : null;\n }", "private function getAddresses()\n {\n $doctrine = $this->getDoctrine();\n\n /** @var \\Doctrine\\ORM\\QueryBuilder $qb */\n $qb = $doctrine\n ->getRepository('BadcowAddressBundle:BaseAddress')\n ->createQueryBuilder('a');\n\n $qb->add('where', $qb->expr()->orX(\n $qb->expr()->isNull('a.latitude'),\n $qb->expr()->isNull('a.longitude')\n ));\n\n return $qb->getQuery()->getResult();\n }", "public function getAllApplicants();", "public function getRestaurant()\n {\n $restaurant = Restaurant::getOneBy(array('_id' => $this->restaurant));\n return $restaurant;\n }", "protected function armaColeccionObligatorios() {\n $dao = new PGDAO();\n $result = array();\n $where = $this->strZpTprop();\n if ($where != '') {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG . \" and tipoprop in (\" . $where . \")\"));\n } else {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG));\n }\n foreach ($colec as $carac) {\n $result[$carac['id_zpcarac']] = 0;\n }\n return $result;\n }", "public function afficherRestaurant(){\r\n\t\t$sql=\"SElECT * From restaurant\";\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}", "function fetch_restaurants_by_user_info($user_id)\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->from('restaurants')\n\t\t\t\t\t\t->where('restaurant_creator', $user_id)\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "public function getContractorOccupations()\n {\n return $this->hasMany(ContractorOccupation::className(), ['contractor_id' => 'id']);\n }", "function get_all_pac_emp_roles()\n {\n $pac_emp_roles = $this->getdb()->query(\"\n SELECT\n *\n\n FROM\n `pac_emp_roles`\n\n WHERE\n 1 = 1\n \")->result_array();\n\n return $pac_emp_roles;\n }", "function getIdsByRestrictions(IRestrictor $restrictor, $limit = NULL, $offset = NULL);", "function getOrders() {\r\n $b2b_orders = getOrdersFromB2B();\r\n //GET ORDERS FROM B2C\r\n $b2c_orders = getOrdersFromB2C();\r\n //COMBINE ORDERS\r\n $today_orders = array_merge($b2b_orders, $b2c_orders);\r\n \r\n $restaurant_array = array();\r\n \r\n foreach($today_orders as $order ) {\r\n $restaurant = array(\r\n \"id\" => '',\r\n \"orders\"=> array(),\r\n );\r\n if ( count($restaurant_array) == 0 ) {\r\n $restaurant[\"id\"] = $order[\"restaurant_id\"];\r\n array_push($restaurant[\"orders\"], $order);\r\n array_push($restaurant_array, $restaurant);\r\n } else {\r\n foreach($restaurant_array as &$array_item) {\r\n if ( $array_item[\"id\"] == $order[\"restaurant_id\"] ) {\r\n array_push($array_item[\"orders\"], $order);\r\n continue 2;\r\n }\r\n }\r\n $restaurant[\"id\"] = $order[\"restaurant_id\"];\r\n array_push($restaurant[\"orders\"], $order);\r\n array_push($restaurant_array, $restaurant);\r\n }\r\n }\r\n \r\n return $restaurant_array;\r\n}", "public function listaAnticiposClientes()\n {\n $anticiposAgregados = array();\n foreach($this->session->userdata(\"comprobantes_anticipos\") as $index => $value)\n {\n $anticiposAgregados[] = $index;\n }\n $this->db->where('cliente_id', $_POST['cliente']);\n $this->db->where('comprobante_anticipo', 1);\n $this->db->where('comprobante_anticipo_usado', 0);\n if(count($anticiposAgregados) > 0)\n {\n $this->db->where_not_in('id',$anticiposAgregados);\n }\n $this->db->order_by('id','DESC');\n $query = $this->db->get(\"comprobantes\");\n $rsAnticipos = $query->result();\n return $rsAnticipos;\n }", "public function rules($restaurant)\n {\n $properties = Property::pluck('id');\n $properties = $properties->join(',');\n\n $restaurantThemes = RestaurantTheme::pluck('id');\n $restaurantThemes = $restaurantThemes->join(',');\n\n $restaurantTypes = RestaurantType::pluck('id');\n $restaurantTypes = $restaurantTypes->join(',');\n\n $restaurantLocations = RestaurantLocation::pluck('id');\n $restaurantLocations = $restaurantLocations->join(',');\n\n return [\n 'name' => ['required', 'min:1', 'max:50', Rule::unique('restaurants','name')->ignore($restaurant)],\n 'property_id' => \"required|in:{$properties}\",\n 'restaurant_theme_id' => \"required|in:{$restaurantThemes}\",\n 'restaurant_type_id' => \"required|in:{$restaurantTypes}\",\n 'restaurant_location_id' => \"required|in:{$restaurantLocations}\",\n 'how_many_pax' => ['min:1', 'max:50'],\n 'open_time' => ['min:1', 'max:50'],\n 'closing_time' => ['min:1', 'max:50'],\n 'included' => ['min:1', 'max:50'],\n ];\n }", "function getAccommodationTypes(){\n\t\t$typesTable = $this->getTable(\"HotelAccommodationTypes\");\n\t\treturn $typesTable->getAccommodationTypes();\n\t}", "public function getCriteria()\n {\n $criterias = array();\n foreach ($this->validators as $validator) {\n $criterias = array_merge($criterias, $validator->getCriteria());\n }\n \n return $criterias;\n }", "public function getFiltroRefeicoes()\n {\n return Query::fetch('Busca/Filtros/QryBuscarRefeicoesComQuantidades');\n }", "public function getCreditRequests()\n {\n $search['q'] = request('q');\n\n $partner = auth()->user()->companies->first();\n\n $creditRequests = CreditRequest::search($search['q'])->with('quotation.user','user','credits')->paginate(10);\n\n return $creditRequests;\n /*$creditRequestsPublic = CreditRequest::search($search['q'])->where('public',1)->with('quotation.user','user','shippings')->get()->all();\n \n $creditRequestsPrivate = CreditRequest::search($search['q'])->where('public', 0)->whereHas('suppliers', function($q) use($partner){\n $q->where('shipping_request_supplier.supplier_id', $partner->id);\n })->get()->all();\n\n $creditRequests = array_collapse([$creditRequestsPublic, $creditRequestsPrivate]);\n\n // dd($creditRequests);\n \n \n $paginator = paginate($creditRequests, 10);\n \n return $paginator; */\n \n \n\n \n \n }", "public function getOtherRecruitmentList() {\n return $this->_get(5);\n }", "public function reservations()\n {\n return $this->hasMany('App\\Reservation', 'restaurant_id');\n }", "private function internal_get_restrictions() {\n global $DB;\n $where = '';\n $wherearray = array();\n if ($this->courseid) {\n $where .= \"\\nAND d.courseid = ?\";\n $wherearray[] = $this->courseid;\n }\n if ($this->plugin) {\n $where .= \"\\nAND d.plugin = ?\";\n $wherearray[] = $this->plugin;\n }\n $cmrestrictions = false;\n if ($this->coursemoduleid) {\n $where .= \"\\nAND d.coursemoduleid = ?\";\n $wherearray[] = $this->coursemoduleid;\n $cmrestrictions = array($this->coursemoduleid => true);\n }\n if ($this->cmarray) {\n // The courses restriction is technically unnecessary except\n // that we don't have index on coursemoduleid alone, so\n // it is probably better to use course.\n $uniquecourses = array();\n $cmrestrictions = array();\n foreach ($this->cmarray as $cm) {\n $cmrestrictions[$cm->id] = true;\n $uniquecourses[$cm->course] = true;\n }\n list ($cmwhere, $cmwherearray) =\n $DB->get_in_or_equal(array_keys($cmrestrictions));\n list ($coursewhere, $coursewherearray) =\n $DB->get_in_or_equal(array_keys($uniquecourses));\n $where .= \"\\nAND d.coursemoduleid \" . $cmwhere .\n \"\\nAND d.courseid \" . $coursewhere;\n $wherearray = array_merge($wherearray, $cmwherearray, $coursewherearray);\n }\n if (is_array($this->groupids)) {\n if ($this->groupids === self::NONE) {\n $where .= \"\\nAND d.groupid IS NULL\";\n } else {\n $where .= \"\\nAND\";\n if ($this->groupexceptions) {\n $gxcourses = array();\n $gxcms = array();\n foreach ($this->groupexceptions as $cm) {\n // If we are restricting to CMs, don't bother including\n // group exceptions for CMs that are not in that list.\n if ($cmrestrictions) {\n if (!array_key_exists($cm->id, $cmrestrictions)) {\n continue;\n }\n }\n $gxcms[$cm->id] = true;\n $gxcourses[$cm->course] = true;\n }\n if (!empty($gxcms)) {\n list ($cmwhere, $cmwherearray) =\n $DB->get_in_or_equal(array_keys($gxcms));\n list ($coursewhere, $coursewherearray) =\n $DB->get_in_or_equal(array_keys($gxcourses));\n\n $where .= \"\\n(\\n (\\n d.coursemoduleid \" . $cmwhere .\n \"\\n AND d.courseid \" . $coursewhere .\n \"\\n )\\n OR\";\n $wherearray = array_merge($wherearray, $cmwherearray, $coursewherearray);\n }\n }\n if (count($this->groupids) == 0) {\n $where .= \"\\n (\\n FALSE\";\n } else {\n list ($groupwhere, $groupwherearray) =\n $DB->get_in_or_equal($this->groupids);\n $where .= \"\\n (\\n d.groupid \" . $groupwhere;\n $wherearray = array_merge($wherearray, $groupwherearray);\n }\n if ($this->allownogroup) {\n $where .= ' OR d.groupid IS NULL';\n }\n if ($this->groupexceptions && !empty($gxcms)) {\n $where .= \"\\n )\\n)\";\n } else {\n $where .= \"\\n)\";\n }\n }\n }\n if (is_array($this->userids) && !empty($this->userids)) {\n if (reset($this->userids) == self::NONE) {\n $where .= \"\\nAND d.userid IS NULL\";\n } else {\n list ($userwhere, $userwherearray) = $DB->get_in_or_equal($this->userids);\n $where .= \"\\nAND (d.userid \" . $userwhere;\n $wherearray = array_merge($wherearray, $userwherearray);\n if ($this->allownouser) {\n $where .= ' OR d.userid IS NULL';\n }\n $where .= ')';\n }\n }\n return array($where, $wherearray);\n }", "public function get_restaurant_list_fees () {\n\t\t\n\t\t$restaurantIDString = $this->get_param('post.restaurant_id_list');\n\t\t$deliveryRegionID = $this->get_param('post.delivery_region_id');\n\t\t\n\t\t$extraFee = M('restaurant')\n\t\t\t->where('`id` in (' . $restaurantIDString . ')')\n\t\t\t->field('sum(`extra_fee`) as extra_fee')\n\t\t\t->find();\n\t\t\n\t\tif (!$extraFee) {\n\t\t\t$extraFee = \"0\";\n\t\t} else {\n\t\t\t$extraFee = $extraFee['extra_fee'];\n\t\t}\n\t\t\n\t\t\n\t\t$deliveryFee = M('restaurant_deliver_fee')\n\t\t\t->where(\"`region_id` = $deliveryRegionID and `restaurant_id` in ( $restaurantIDString ) \")\n\t\t\t->select();\n\t\t\n\t\t$this->return_data(['extra_fee' => $extraFee, 'delivery_fee' => $deliveryFee]);\n\t}", "public function getAddresses() {\n $table = new Yourdelivery_Model_DbTable_Locations();\n return $table->fetchAll('companyId = ' . $this->getId());\n }", "public function Restaurants()\n {\n return $this->belongsToMany('App\\Model\\Restaurants', 'restaurant_cuisines', 'restaurant_id', 'cuisine_id');\n }", "public function restaurant()\n {\n return $this->restaurant;\n }", "public static function getAllActiveRecurringCharges()\n\t{\n\t\t// Set the filter constraints (only retrieve the recurring adjusments that are awaiting approval)\n\t\t$arrFilter = array('recurringChargeStatus'\t=> array(\t'Type'\t=> self::SEARCH_CONSTRAINT_RECURRING_CHARGE_STATUS_ID,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Value'\t=> Recurring_Charge_Status::getIdForSystemName('ACTIVE')\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\n\t\t// Order by AccountId ascending\n\t\t$arrSort = array(Recurring_Charge::ORDER_BY_ACCOUNT_ID => true);\n\t\treturn self::searchFor($arrFilter, $arrSort);\n\t}", "function getHotelsPerTripOrganizer(Request $request)\n {\n $oUser=Auth::user();\n if ($oUser->role=='admin'){\n\n $aActiveTrips = Trip::where('is_active', true)->get();\n\n $aHotels = Hotel::get();\n\n if ($request->post('selectedActiveTrip') == null) {\n $iTripId = Trip::where('is_active', true)->first();\n } else {\n $iTripId = Trip::where('trip_id', $request->post('selectedActiveTrip'))->select('trip_id')->first();\n }\n $aHotelsid = HotelsPerTrip::whereIn('trip_id', $iTripId)->select('hotel_id')->get();\n\n $aHotelsPerTrip = HotelsPerTrip::whereIn('hotels.hotel_id', $aHotelsid)\n ->where('trip_id', $iTripId->trip_id)\n ->join('hotels', 'hotels_per_trips.hotel_id', '=', 'hotels.hotel_id')\n ->orderBy('hotel_start_date', 'asc')\n ->get();\n\n return view('organiser.HotelsAndRooms.hotels',\n [\n 'aHotelsPerTrip' => $aHotelsPerTrip,\n 'aHotels' => $aHotels,\n 'aActiveTrips' => $aActiveTrips,\n 'iTripId' => $iTripId\n ]);\n }\n else {\n foreach ($oUser->traveller->travellersPerTrip as $travellersPerTrip) {\n $is_organizer = $travellersPerTrip->is_organizer;\n if ($is_organizer) {\n $travellerId = $oUser->traveller->traveller_id;\n $aIsOrganizerOfTrip = TravellersPerTrip::where('traveller_id', $travellerId)->where('is_organizer', true)->select('trip_id')->get();\n\n if ($request->post('selectedActiveTrip') == null) {\n $iTripId = Trip::where('is_active', true)->whereIn('trip_id', $aIsOrganizerOfTrip)->first();\n } else {\n $iTripId = Trip::where('trip_id', $request->post('selectedActiveTrip'))->select('trip_id')->first();\n }\n $aHotelsid = HotelsPerTrip::whereIn('trip_id', $iTripId)->select('hotel_id')->get();\n\n $aHotelsPerTrip = HotelsPerTrip::whereIn('hotels.hotel_id', $aHotelsid)\n ->where('trip_id', $iTripId->trip_id)\n ->join('hotels', 'hotels_per_trips.hotel_id', '=', 'hotels.hotel_id')\n ->orderBy('hotel_start_date', 'asc')\n ->get();\n\n\n $aActiveTrips = Trip::where('is_active', true)->whereIn('trip_id', $aIsOrganizerOfTrip)->get();\n\n $aHotels = Hotel::get();\n\n return view('organiser.HotelsAndRooms.hotels',\n [\n 'aHotelsPerTrip' => $aHotelsPerTrip,\n 'aHotels' => $aHotels,\n 'aActiveTrips' => $aActiveTrips,\n 'iTripId' => $iTripId\n ]);\n }\n }\n return $this->getHotelsPerTripUser();\n }\n }", "function listarres()\n\t{\n\t\t$sql = \"call sp_s_restaurante_all\";\n\t\ttry {\n\t\t\t$PrepareStatement = $this->cnn->getPrepareStatement($sql);\n\t\t\t$PrepareStatement->execute();\n\t\t\treturn $PrepareStatement->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \" . $e;\n\t\t\treturn false;\n\t\t}\n\t}", "public function get_all($arrFilter = array()){ \n\t\treturn $this->call('GET', '/admin/customers.json', $arrFilter); \n\t}", "public function fetch_restaurant_on_condition($query)\n {\n $this->db->select('*')->from('restaurants');\n \n if (isset($query['restaurant_id']) && !empty($query['restaurant_id'])) {\n $this->db->where('restaurant_id', $query['restaurant_id']);\n }\n\n if (isset($query['restaurant_creator']) && !empty($query['restaurant_creator'])) {\n $this->db->where('restaurant_creator', $query['restaurant_creator']);\n\t\t}\n\t\t\n\t\tif (isset($query['restaurant_slug']) && !empty($query['restaurant_slug'])) {\n $this->db->where('restaurant_slug', $query['restaurant_slug']);\n }\n\n $query = $this->db->get()->result_array();\n // with restaurant info\n foreach ($query as $key => $restaurant) {\n // this metho dfetch all tags of a restaurant\n\t\t\t$tags = $this->tag_model->fetch_all_tags_of_restaurant($restaurant['restaurant_id']);\n $query[$key]['tags'] = $this->global_model->belong_to_many('restaurant_tags', 'tags', 'restaurant_id', $restaurant['restaurant_id'], 'tag_id');\n\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$categories = $this->global_model->has_many('categories', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['categories'] = $categories;\n\n\t\t\t// this metho dfetch all tags of a restaurant\n\t\t\t$ratings = $this->global_model->with('ratings', 'restaurant_id', $restaurant['restaurant_id']);\n\t\t\t$query[$key]['rating'] = '';\n\t\t\t// total rows\n\t\t\t$totalRows = count($ratings);\n\t\t\t// sum of rating points\n\t\t\t$sumOfRating = 0;\n\t\t\tforeach ($ratings as $rating) {\n\t\t\t\t$sumOfRating += $rating['rating'];\n\t\t\t}\n\t\t\t// if restaurant has rating\n\t\t\tif ($totalRows != 0) {\n\t\t\t\t// average of rating\n\t\t\t\t$query[$key]['totalRated'] = $totalRows;\n\t\t\t\t$query[$key]['rating'] = number_format($sumOfRating / $totalRows, 1, '.', '');\n\t\t\t}\n\n\t\t\t// this method fetch restaurant creator info\n\t\t\t$user = $this->global_model->with('users', 'id', $restaurant['restaurant_creator']);\n\t\t\t$query[$key]['creator'] = $user;\n }\n return $query;\n }", "public function getList(TCriteria $criterio = null, $retornar_array = FALSE, $order_by = null)\n {\n $conn = TTransaction::get();\n\n\n if ($conn) {\n\n $repo = new TRepository(get_class($this));\n\n if (is_null($criterio)) {\n $criterio = new TCriteria();\n $criterio->add(new TFilter(1, '=', 1));\n }\n\n $collection = $repo->load($criterio);\n\n if (count($collection)) {\n\n # se for para retornar como uma collection\n\n $array_list = array();\n # Recuperando descrição das chaves estrangeiras ex: _id\n foreach ($collection as &$object) {\n /** Verifica se possui método para atributos terminados com '_id' e chama o method **/\n\n foreach ($object->toArray() as $attribute => $value) {\n\n if (preg_match('/(_id)$/', $attribute)) {\n\n $colunaBanco = preg_replace('/(_id)$/', '', $attribute);\n\n $method = 'get' . ucwords($colunaBanco);\n\n if (method_exists($object, $method)) {\n $object->data[$colunaBanco] = $object->$method();\n }\n }\n }\n\n # Populando para o caso de ser retorno em array\n $array_list[] = $object->toArray();\n }\n\n if ($retornar_array) {\n return !is_null($order_by) ? $this->sortArrayByField($order_by, $array_list) : $array_list;\n } else {\n return !is_null($order_by) ? $this->sortCollectionByField($order_by, $collection) : $collection;\n }\n }\n }\n }", "public function listAllWithinRadius($options = array())\n {\n $this->logger->info(\"Search for consultants\");\n\n if (!isset($options['radius']))\n $options['radius'] = 20;\n\n $output = array(\n 'results' => array(),\n 'radius' => $options['radius'],\n );\n\n if (!isset($options['lat']))\n return $output;\n\n if (!isset($options['lng']))\n return $output;\n\n if ((is_null($options['lat'])) || (is_null($options['lng'])))\n return $output;\n\n while ((count($output['results']) <= 0) && ($options['radius'] <= 200)) {\n $output['results'] = $this->em\n ->getRepository('SkedAppCoreBundle:Consultant')\n ->getAllActiveConsultantsQueryWithinRadius($options);\n $output['radius'] = $options['radius'];\n $options['radius'] += 5;\n } //while\n\n return $output;\n }", "public function getContractors()\n {\n return $this->hasMany(User::className(), ['id' => 'contractor_id'])->viaTable('favorite_contractor', ['customer_id' => 'id']);\n }", "public function getPermissionAndRoleList()\n {\n $user = $this->user;\n\n if (!$user) {\n throw new RoleAndPriviledgeServiceException(\"The user is not defined\");\n }\n $permissions = $user->directPermissions;\n\n $user->loadMissing(\"roles\", \"roles.permissions\");\n\n $roles = $user->roles;\n\n // $roles = $user->roles()->with(\"permissions\")->get();\n\n $roles->each(function ($role) use (&$permissions) {\n $permissions = $permissions->merge($role->permissions);\n });\n\n $rv = [\n array_unique($permissions->pluck(\"name\")->all()),\n array_unique($roles->pluck(\"name\")->all())\n ];\n\n return $rv;\n }", "public static function getAllCandidatos()\n {\n $registros = array();\n $registros = self::obtenerRegistros(\n \"SELECT * from candidatos;\",\n array()\n );\n return $registros;\n }", "function cicleinscription_get_vacancies_remaning(){\n\t\n}", "public function getMultipleRevisitOrders()\n {\n return \\DB::select(\"SELECT a.id, a.propaddress1, a.propaddress2, a.propcity, a.propstate, a.propzip, s.descrip as status_name FROM appr_dashboard_delay_order d LEFT JOIN appr_order a ON (a.id=d.orderid) LEFT JOIN order_status s ON (a.status=s.id) WHERE d.created_date BETWEEN :from AND :to AND d.delay_date BETWEEN :t AND :b GROUP BY d.orderid HAVING COUNT(d.id) > 1\", [':from' => strtotime('today'), ':to' => strtotime('tomorrow'), ':t' => strtotime('today'), ':b' => strtotime('tomorrow')]);\n }", "public function getAccessoires()\n {\n if ($this->_oAccessoires === null) {\n $this->_oAccessoires = false;\n if ($oProduct = $this->getProduct()) {\n $this->_oAccessoires = $oProduct->getAccessoires();\n }\n }\n\n return $this->_oAccessoires;\n }", "protected function getDisallowedItemsByScope ()\n\t{\n\t\t// Check disallowed items baised on the scope\n\t\tforeach ( Authorizer::getScopes() as $scope )\n\t\t{\n\t\t\t// If the config for the scope is null, the scope has full access,\n\t\t\t// therfore the client has full access\n\t\t\tif ( !$scopeDisallowedItemsByScope[] = \n\t\t\t\t\tConfig::get( 'transformer_writehelper.disallowed_items.' . $this->type . '.scope.' . $scope->getId() ) )\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t\t}\n\n\t\t// if there is only one array no need to intersect the arrays\n\t\tif ( count( $scopeDisallowedItemsByScope ) == 1 )\n\t\t{\n\t\t\treturn $scopeDisallowedItemsByScope[0];\n\t\t}\n\t\t\n\t\t// Only keep the disallowed items that is in every scope the client has\n\t\treturn call_user_func_array( 'array_intersect', $scopeDisallowedItemsByScope );\n\t}", "abstract public function getAccessRights(): array;", "public function getReceivableGLAccountsList(): array\n {\n return $this->receivableGLAccountList;\n }", "function GetAllAcceptedPlacedOffers()\n {\n $placedOffersModel = new PlacedOffersModel();\n return $placedOffersModel->GetAllAcceptedPlacedOffers();\n }", "public function getCarriers(){\n\n\t\t\t$this->db->select('*')->from('carriers');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\treturn $query->result_array();\n\t}", "public function getFlightsCustomAll($start_date, $end_date, $origin, $destination, $update_date_only)\n {\n \n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT p FROM FlyingMainBundle:Flights p\n WHERE p.active = 1\n AND p.date >= :start_date AND p.date <= :end_date\n AND p.origin = :origin AND p.destination = :destination\n AND p.lastUpdated <= :update_date_only'\n )->setParameters(array('start_date' => $start_date, 'end_date' => $end_date, 'origin' => $origin, 'destination' => $destination, 'update_date_only' => $update_date_only));\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n\n }" ]
[ "0.703669", "0.6507204", "0.60332876", "0.60025", "0.60025", "0.58762485", "0.56468123", "0.5622", "0.56075335", "0.56053334", "0.55654913", "0.5565382", "0.5524607", "0.5508404", "0.5421273", "0.51989514", "0.51964456", "0.5178053", "0.5173234", "0.5121196", "0.5096752", "0.5092492", "0.508741", "0.50667214", "0.5054658", "0.503757", "0.50254315", "0.50187385", "0.5005375", "0.50047266", "0.49890667", "0.4979173", "0.49753454", "0.49686077", "0.49620444", "0.49600828", "0.4943269", "0.49431974", "0.49339098", "0.49334118", "0.49265122", "0.49143407", "0.4901769", "0.488781", "0.487256", "0.48653972", "0.48593372", "0.48569757", "0.4855471", "0.4852311", "0.48513696", "0.48372516", "0.48340967", "0.483392", "0.48319346", "0.4830963", "0.48291624", "0.48206025", "0.4810453", "0.48061687", "0.48059794", "0.48023438", "0.47969446", "0.47964302", "0.4786308", "0.47804216", "0.4766792", "0.47654843", "0.476255", "0.4748235", "0.47441772", "0.47412002", "0.4727382", "0.47197086", "0.4715304", "0.4708175", "0.4706571", "0.47044015", "0.47031003", "0.47011384", "0.46927223", "0.46778125", "0.4675303", "0.46450105", "0.4643169", "0.46398848", "0.46393818", "0.46391597", "0.4633461", "0.46324384", "0.46301994", "0.46295053", "0.46166557", "0.46155643", "0.46144164", "0.46069515", "0.46041378", "0.46026042", "0.45989853", "0.45974174" ]
0.58248115
6
set restaurant, having restriction on this company any company assigned to restaurant is only allowed to order
public function setRestaurantRestriction($restId, $exclusive=0) { return $this->getTable()->setRestaurantRestriction($restId, $exclusive); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function approveNewRestaurant(restaurant $res){\n\n\t\t$query = sprintf(\"INSERT INTO restaurant(\n\n\t\t\t\t\t\t\t\t\t\t\tlatitude,\n\t\t\t\t\t\t\t\t\t\t\tlongitude,\n\t\t\t\t\t\t\t\t\t\t\timage,\n\t\t\t\t\t\t\t\t\t\t\tlink,\n\t\t\t\t\t\t\t\t\t\t\tapproved\n\t\t\t\t\t\t\t\t\t\t)VALUES (\n\n\t\t\t\t\t\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t\t\t\t\t\t'%d'\n\t\t\t\t\t\t\t\t\t\t)\",\n\t\t\t\t\t\t\t\t\t\t\t$res->getLat(),\n\t\t\t\t\t\t\t\t\t\t\t$res->getLong(),\n\t\t\t\t\t\t\t\t\t\t\t$res->getImage(),\n\t\t\t\t\t\t\t\t\t\t\t$res->getLink(),\n\t\t\t\t\t\t\t\t\t\t\t$res->getApproved()\n\t\t\t\t\t);\n\n\t\tif (!$this->mysqli->query($query))\n\t\t\tdie($this->mysqli->error);\n\n\t}", "public function setRestaurant(Restaurant $restaurant)\n {\n $this->restaurant = $restaurant->getId();\n }", "public function restaurant_save_assignments($restaurant_id = '', $publisher_id = '') {\n\t global $foodbakery_plugin_options;\n\t $response = array('status' => false, 'msg' => esc_html__('An error occurred. Try again later.', 'foodbakery'));\n\t $get_restaurant_id = foodbakery_get_input('restaurant_id', 0);\n\t $is_updating = false;\n\t if ($get_restaurant_id != '' && $get_restaurant_id != 0 && $this->is_publisher_restaurant($get_restaurant_id)) {\n\t\t$is_updating = true;\n\t }\n\t $foodbakery_free_restaurants_switch = isset($foodbakery_plugin_options['foodbakery_free_restaurants_switch']) ? $foodbakery_plugin_options['foodbakery_free_restaurants_switch'] : '';\n\t $foodbakery_restaurant_default_expiry = isset($foodbakery_plugin_options['foodbakery_restaurant_default_expiry']) ? $foodbakery_plugin_options['foodbakery_restaurant_default_expiry'] : '';\n\t if ($foodbakery_free_restaurants_switch == 'on') {\n\t\t// Free Posting without any Membership\n\t\tif (!$is_updating) {\n\t\t if ($foodbakery_restaurant_default_expiry == '') {\n\n\t\t\t$foodbakery_trans_restaurant_expiry = current_time('Y-m-d H:i:s');\n\t\t } else {\n\n\t\t\t$foodbakery_trans_restaurant_expiry = $this->date_conv($foodbakery_restaurant_default_expiry, 'days');\n\t\t }\n\n\t\t // Assign expire date\n\t\t update_post_meta($restaurant_id, 'foodbakery_restaurant_expired', strtotime($foodbakery_trans_restaurant_expiry));\n\n\t\t // Add restaurant type in free posting\n\t\t update_post_meta($restaurant_id, 'foodbakery_restaurant_type', 'restaurant-settings');\n\n\t\t // Assign without package true\n\t\t update_post_meta($restaurant_id, 'foodbakery_restaurant_without_package', '1');\n\n\t\t // Assign Status of restaurant\n\t\t $this->restaurant_update_status($restaurant_id);\n\t\t //do_action( 'foodbakery_restaurant_add_assign_status', $restaurant_id );\n\t\t}\n\t\t$response['status'] = true;\n\t\t$response['msg'] = esc_html__('Restaurant added successfully and packages processed', 'foodbakery');\n\t } else {\n\t\t$new_pkg_check = foodbakery_get_input('foodbakery_restaurant_new_package_used', '');\n\t\tif ($new_pkg_check == 'on') {\n\n\t\t $package_id = foodbakery_get_input('foodbakery_restaurant_package', 0);\n\t\t if ($this->is_package($package_id)) {\n\t\t\tif ($is_updating) {\n\t\t\t // package subscribe\n\t\t\t // add transaction\n\t\t\t $transaction_detail = $this->foodbakery_restaurant_add_transaction('update-restaurant', $restaurant_id, $package_id, $publisher_id);\n\t\t\t echo force_balance_tags($transaction_detail);\n\t\t\t} else {\n\t\t\t // package subscribe\n\t\t\t // add transaction\n\t\t\t $transaction_detail = $this->foodbakery_restaurant_add_transaction('add-restaurant', $restaurant_id, $package_id, $publisher_id);\n\t\t\t echo force_balance_tags($transaction_detail);\n\t\t\t}\n\t\t }\n\n\t\t // end of using new package\n\t\t} else {\n\n\t\t $active_package_key = foodbakery_get_input('foodbakery_restaurant_active_package', 0);\n\t\t $active_package_key = explode('pt_', $active_package_key);\n\t\t $active_pckg_id = isset($active_package_key[0]) ? $active_package_key[0] : '';\n\t\t $active_pckg_trans_id = isset($active_package_key[1]) ? $active_package_key[1] : '';\n\t\t if ($this->is_package($active_pckg_id)) {\n\t\t\t$t_package_feature_list = get_post_meta($active_pckg_trans_id, 'foodbakery_transaction_restaurant_feature_list', true);\n\t\t\t$t_package_top_cat_list = get_post_meta($active_pckg_trans_id, 'foodbakery_transaction_restaurant_top_cat_list', true);\n\n\t\t\tif ($is_updating) {\n\t\t\t $foodbakery_package_id = get_post_meta($restaurant_id, 'foodbakery_restaurant_package', true);\n\t\t\t $foodbakery_trans_id = $this->restaurant_trans_id($restaurant_id);\n\t\t\t // update-restaurant\n\t\t\t $is_pkg_subs = $this->foodbakery_is_pkg_subscribed($active_pckg_id, $active_pckg_trans_id);\n\t\t\t if ($foodbakery_package_id != $active_pckg_id || $active_pckg_trans_id != $foodbakery_trans_id) {\n\t\t\t\t// if package subscribe\n\t\t\t\tif ($is_pkg_subs) {\n\n\t\t\t\t // update featured, top category\n\t\t\t\t // this change will be temporary\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", '');\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", '');\n\n\t\t\t\t // Get Transaction Restaurants array\n\t\t\t\t // Merge new Restaurant in Array\n\t\t\t\t $get_trans_restaurants = get_post_meta($active_pckg_trans_id, \"foodbakery_restaurant_ids\", true);\n\t\t\t\t $updated_trans_restaurants = $this->merge_in_array($get_trans_restaurants, $restaurant_id);\n\t\t\t\t update_post_meta($active_pckg_trans_id, \"foodbakery_restaurant_ids\", $updated_trans_restaurants);\n\n\t\t\t\t $active_pckg_trans_title = $active_pckg_trans_id != '' ? str_replace('#', '', get_the_title($active_pckg_trans_id)) : '';\n\n\t\t\t\t // updating package id in restaurant\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_package\", $active_pckg_id);\n\n\t\t\t\t // updating transaction title id in restaurant\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_trans_id\", $active_pckg_trans_title);\n\n\t\t\t\t // update restaurant subscription renew\n\t\t\t\t $get_subscripton_data = get_post_meta($restaurant_id, \"package_subscripton_data\", true);\n\t\t\t\t if (empty($get_subscripton_data)) {\n\t\t\t\t\t$package_subscripton_data = array(\n\t\t\t\t\t array(\n\t\t\t\t\t\t'type' => 'update_package',\n\t\t\t\t\t\t'transaction_id' => $active_pckg_trans_id,\n\t\t\t\t\t\t'title_id' => $active_pckg_trans_title,\n\t\t\t\t\t\t'package_id' => $active_pckg_id,\n\t\t\t\t\t\t'subscribe_date' => strtotime(current_time('Y-m-d H:i:s')),\n\t\t\t\t\t )\n\t\t\t\t\t);\n\t\t\t\t } else {\n\t\t\t\t\t$package_subscripton_data = array(\n\t\t\t\t\t 'type' => 'update_package',\n\t\t\t\t\t 'transaction_id' => $active_pckg_trans_id,\n\t\t\t\t\t 'title_id' => $active_pckg_trans_title,\n\t\t\t\t\t 'package_id' => $active_pckg_id,\n\t\t\t\t\t 'renew_date' => strtotime(current_time('Y-m-d H:i:s')),\n\t\t\t\t\t);\n\t\t\t\t }\n\t\t\t\t $merged_subscripton_data = $this->merge_in_array($get_subscripton_data, $package_subscripton_data, false);\n\t\t\t\t update_post_meta($restaurant_id, \"package_subscripton_data\", $merged_subscripton_data);\n\n\t\t\t\t // updating restaurant meta\n\t\t\t\t // as per transaction meta\n\t\t\t\t $this->restaurant_assign_meta($restaurant_id, $active_pckg_trans_id);\n\n\t\t\t\t // Assign Status of restaurant\n\t\t\t\t $this->restaurant_update_status($restaurant_id);\n\t\t\t\t}\n\t\t\t }\n\t\t\t if ($is_pkg_subs) {\n\t\t\t\t// update restaurant featured\n\t\t\t\tif ($t_package_feature_list == 'on') {\n\t\t\t\t // featured from form\n\t\t\t\t $get_restaurant_featured = foodbakery_get_input('foodbakery_restaurant_featured', '');\n\t\t\t\t // featured from meta\n\t\t\t\t $db_restaurant_featured = get_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", true);\n\n\t\t\t\t if ($get_restaurant_featured == 'on' && $db_restaurant_featured != 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", 'on');\n\t\t\t\t } else if ($get_restaurant_featured != 'on' && $db_restaurant_featured == 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", '');\n\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", '');\n\t\t\t\t}\n\n\t\t\t\t// update restaurant top category\n\t\t\t\tif ($t_package_top_cat_list == 'on') {\n\t\t\t\t // Top Cat from form\n\t\t\t\t $get_restaurant_top_cat = foodbakery_get_input('foodbakery_restaurant_top_cat', '');\n\t\t\t\t // Top Cat from meta\n\t\t\t\t $db_restaurant_top_cat = get_post_meta($restaurant_id, 'foodbakery_restaurant_is_top_cat', true);\n\n\t\t\t\t if ($get_restaurant_top_cat == 'on' && $db_restaurant_top_cat != 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", 'on');\n\t\t\t\t } else if ($get_restaurant_top_cat != 'on' && $db_restaurant_top_cat == 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", '');\n\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", '');\n\t\t\t\t}\n\t\t\t }\n\t\t\t} else {\n\t\t\t // if package subscribe\n\t\t\t if ($this->foodbakery_is_pkg_subscribed($active_pckg_id, $active_pckg_trans_id)) {\n\n\t\t\t\t// Get Transaction Restaurants array\n\t\t\t\t// Merge new Restaurant in Array\n\t\t\t\t$get_trans_restaurants = get_post_meta($active_pckg_trans_id, \"foodbakery_restaurant_ids\", true);\n\t\t\t\t$updated_trans_restaurants = $this->merge_in_array($get_trans_restaurants, $restaurant_id);\n\t\t\t\tupdate_post_meta($active_pckg_trans_id, \"foodbakery_restaurant_ids\", $updated_trans_restaurants);\n\n\t\t\t\t$active_pckg_trans_title = $active_pckg_trans_id != '' ? str_replace('#', '', get_the_title($active_pckg_trans_id)) : '';\n\t\t\t\t// updating package id in restaurant\n\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_package\", $active_pckg_id);\n\n\t\t\t\t// updating transaction title id in restaurant\n\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_trans_id\", $active_pckg_trans_title);\n\n\t\t\t\t// update restaurant subscription renew\n\t\t\t\t$get_subscripton_data = get_post_meta($restaurant_id, \"package_subscripton_data\", true);\n\n\t\t\t\tif (empty($get_subscripton_data)) {\n\t\t\t\t $package_subscripton_data = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'type' => 'update_package',\n\t\t\t\t\t 'transaction_id' => $active_pckg_trans_id,\n\t\t\t\t\t 'title_id' => $active_pckg_trans_title,\n\t\t\t\t\t 'package_id' => $active_pckg_id,\n\t\t\t\t\t 'subscribe_date' => strtotime(current_time('Y-m-d H:i:s')),\n\t\t\t\t\t)\n\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t $package_subscripton_data = array(\n\t\t\t\t\t'type' => 'update_package',\n\t\t\t\t\t'transaction_id' => $active_pckg_trans_id,\n\t\t\t\t\t'title_id' => $active_pckg_trans_title,\n\t\t\t\t\t'package_id' => $active_pckg_id,\n\t\t\t\t\t'renew_date' => strtotime(current_time('Y-m-d H:i:s')),\n\t\t\t\t );\n\t\t\t\t}\n\t\t\t\t$merged_subscripton_data = $this->merge_in_array($get_subscripton_data, $package_subscripton_data, false);\n\t\t\t\tupdate_post_meta($restaurant_id, \"package_subscripton_data\", $merged_subscripton_data);\n\n\t\t\t\t// update restaurant featured\n\t\t\t\tif ($t_package_feature_list == 'on') {\n\t\t\t\t // featured from form\n\t\t\t\t $get_restaurant_featured = foodbakery_get_input('foodbakery_restaurant_featured', '');\n\t\t\t\t // featured from meta\n\t\t\t\t $db_restaurant_featured = get_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", true);\n\n\t\t\t\t if ($get_restaurant_featured == 'on' && $db_restaurant_featured != 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", 'on');\n\t\t\t\t } else if ($get_restaurant_featured != 'on' && $db_restaurant_featured == 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", '');\n\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_is_featured\", '');\n\t\t\t\t}\n\n\t\t\t\t// update restaurant top category\n\t\t\t\tif ($t_package_top_cat_list == 'on') {\n\t\t\t\t // Top Cat from form\n\t\t\t\t $get_restaurant_top_cat = foodbakery_get_input('foodbakery_restaurant_top_cat', '');\n\t\t\t\t // Top Cat from meta\n\t\t\t\t $db_restaurant_top_cat = get_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", true);\n\n\t\t\t\t if ($get_restaurant_top_cat == 'on' && $db_restaurant_top_cat != 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", 'on');\n\t\t\t\t } else if ($get_restaurant_top_cat != 'on' && $db_restaurant_top_cat == 'on') {\n\t\t\t\t\tupdate_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", '');\n\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t update_post_meta($restaurant_id, \"foodbakery_restaurant_is_top_cat\", '');\n\t\t\t\t}\n\n\t\t\t\t// updating restaurant meta\n\t\t\t\t// as per transaction meta\n\t\t\t\t$this->restaurant_assign_meta($restaurant_id, $active_pckg_trans_id);\n\n\t\t\t\t// Assign Status of restaurant\n\t\t\t\t$this->restaurant_update_status($restaurant_id);\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t // end of using existing package\n\t\t}\n\t\t$response['status'] = true;\n\t\t$response['msg'] = esc_html__('Restaurant added successfully and packages processed', 'foodbakery');\n\t\t// end assigning packages\n\t\t// and payment processs\n\t }\n\t return $response;\n\t}", "public function getRestaurantRestrictions() {\n return $this->getTable()->getRestaurantRestrictions();\n }", "public function set_restriction($countries)\n\t{\n\t\t\n\t}", "public function testSetCollectionApproval()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function update(Request $request, Restaurant $restaurant, User $user)\n {\n\n if(array_key_exists('take_away',$request->all())){\n if($request->take_away === \"on\"){\n $request->merge(['take_away' => true]);\n }\n }else{\n $request->merge(['take_away' => false]);\n }\n \n if(array_key_exists('free_delivery',$request->all())){\n if($request->free_delivery === \"on\"){\n $request->merge(['free_delivery' => true]);\n }\n }else{\n $request->merge(['free_delivery' => false]);\n }\n\n $data = $request->all();\n\n $restaurantTypes = array();\n\n if (array_key_exists('restaurant-types', $data)) {\n foreach ($data['restaurant-types'] as $value) {\n $restaurantType = RestaurantType::where('name', $value)->firstOrFail();\n $restaurantTypes[] = $restaurantType->id;\n }\n }\n\n $request->validate($this->validationArray);\n\n $data['slug'] = Str::of($data['name'])->slug();\n\n if(array_key_exists('img_path', $data)){\n Storage::delete($restaurant->img_path);\n $data['img_path'] = Storage::put('restaurant_image', $data['img_path']);\n }\n\n $address = $restaurant->address;\n \n if(array_key_exists('restaurant-types',$data)){\n $restaurant->restaurantTypes()->sync($restaurantTypes);\n }\n\n $address->update($data);\n $restaurant->update($data);\n\n return redirect()\n ->route('owner.restaurants.show', $restaurant->id)\n ->with('updated', \"Il ristorante $restaurant->name è stato modificato con successo\"); \n }", "public function addRestaurant(User $user, Restaurant $restaurant)\n {\n return $this->authorized();\n }", "public function restaurant()\n {\n }", "public function setSponsoredRestaurant(?SponsoredRestaurant $sponsoredRestaurant): self\n {\n if ($sponsoredRestaurant === null && $this->sponsoredRestaurant !== null) {\n $this->sponsoredRestaurant->setUser(null);\n }\n\n // set the owning side of the relation if necessary\n if ($sponsoredRestaurant !== null && $sponsoredRestaurant->getUser() !== $this) {\n $sponsoredRestaurant->setUser($this);\n }\n\n $this->sponsoredRestaurant = $sponsoredRestaurant;\n\n return $this;\n }", "public function canChangeOrderWarehouse();", "function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}", "public function setRentals(array $rentals): void\n {\n $this->rentals = $rentals;\n }", "public function authorize()\n {\n // to do update verification and rules on the rights to create a company\n return true;\n }", "public function testGetOfficeWithRestrictionCheck()\n\t{\n\t\t// manually set phonelistRestrict on if its off;\n\t\t/** @var SystemConfigRepository $systemConfigRepo */\n\t\t$systemConfigRepo = self::$em->getRepository(SystemConfig::class);\n\t\t$currentPhonelistRestrictState = self::$originalPhonelistRestrictState;\n\t\tif (!$currentPhonelistRestrictState) {\n\t\t\t/** @var SystemConfig $dorEmployeeRestrict */\n\t\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorEmployeeRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t}\n\n\t\t//The office to get details from\n\t\t$officeId = 105;\n\n\t\t$headers = array(\n\t\t\t'HTTP_AUTHORIZATION' => HttpHeader::BEARER.' '.self::$token,\n\t\t);\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_GET,\n\t\t\t'/api/v1/offices/'.$officeId,\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is NOT FOUND\n\t\t$this->assertSame(Response::HTTP_NOT_FOUND, $response->getStatusCode());\n\n\t\t// manually set phonelistRestrict off if its on;\n\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t$dorEmployeeRestrict->setValue('no');\n\t\tself::$em->flush();\n\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t$currentPhonelistRestrictState = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT)->getNormalizedValue();\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_GET,\n\t\t\t'/api/v1/offices/'.$officeId,\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$office = json_decode($response->getContent(), true);\n\t\t$office = $office['data'];\n\n\t\t//Test that a office has at minimum the below values\n\t\t$this->assertArrayHasKey('id', $office);\n\t\t$this->assertArrayHasKey('name', $office);\n\t\t$this->assertArrayHasKey('departments', $office);\n\n\t\t//Test that an address has at minimum the below values\n\t\t$departments = $office['departments'];\n\t\t$this->assertTrue(sizeof($departments) > 0);\n\t\tforeach ($departments as $department) {\n\t\t\t$this->assertArrayHasKey('id', $department);\n\t\t\t$this->assertArrayHasKey('name', $department);\n\t\t}\n\n\t\t// return phonelist restrict to original state\n\t\tif ($currentPhonelistRestrictState !== self::$originalPhonelistRestrictState) {\n\t\t\t$dorEmployeeRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorEmployeeRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorEmployeeRestrict);\n\t\t}\n\t}", "public function setRoleSupervisor()\n {\n // $role = Role::where('name', 'supervisor')->first();\n // $permissions = Permission::where('name', 'like', 'blog-%')->get();\n // $role->syncPermissions($permissions);\n }", "public function rules($restaurant)\n {\n $properties = Property::pluck('id');\n $properties = $properties->join(',');\n\n $restaurantThemes = RestaurantTheme::pluck('id');\n $restaurantThemes = $restaurantThemes->join(',');\n\n $restaurantTypes = RestaurantType::pluck('id');\n $restaurantTypes = $restaurantTypes->join(',');\n\n $restaurantLocations = RestaurantLocation::pluck('id');\n $restaurantLocations = $restaurantLocations->join(',');\n\n return [\n 'name' => ['required', 'min:1', 'max:50', Rule::unique('restaurants','name')->ignore($restaurant)],\n 'property_id' => \"required|in:{$properties}\",\n 'restaurant_theme_id' => \"required|in:{$restaurantThemes}\",\n 'restaurant_type_id' => \"required|in:{$restaurantTypes}\",\n 'restaurant_location_id' => \"required|in:{$restaurantLocations}\",\n 'how_many_pax' => ['min:1', 'max:50'],\n 'open_time' => ['min:1', 'max:50'],\n 'closing_time' => ['min:1', 'max:50'],\n 'included' => ['min:1', 'max:50'],\n ];\n }", "public function allowDeliveryAddress()\n {\n $this->_data['DireccionEnvio'] = 1;\n }", "public function setTenantRestrictions(?CrossTenantAccessPolicyTenantRestrictions $value): void {\n $this->getBackingStore()->set('tenantRestrictions', $value);\n }", "public function set_data($r){\n if($r->stn_number == ''){ $this->complete = false; }\n\n //setting trip_id\n $this->trip_id = $r->trip_id;\n //calculating total_freight\n $this->total_freight += ($r->product_quantity * $r->freight_unit);\n //calculating total_freight_for_company\n $this->total_freight_for_company += ($r->company_freight_unit * $r->product_quantity);\n //setting tip_unique_data (this class variables)\n $this->customerId = $r->customer_id;\n $this->customerName = $r->customerName;\n\n $this->contractorId = $r->contractor_id ;\n $this->contractorName = $r->contractorName ;\n\n $this->companyId = $r->company_id ;\n $this->companyName = $r->companyName ;\n\n $this->tanker_id = $r->tanker_id ;\n $this->tanker_number = $r->tanker_number ;\n\n $this->entry_date = $r->entryDate ;\n $this->filling_date = $r->filling_date ;\n $this->receiving_date = $r->receiving_date ;\n $this->decanding_date = $r->decanding_date ;\n $this->stn_receiving_date = $r->stn_receiving_date ;\n $this->email_date = $r->email_date ;\n $this->invoice_date = $r->invoice_date ;\n\n $this->contractor_commission = $r->contractor_commission ;\n $this->contractor_commission_2 = $r->contractor_commission_2 ;\n $this->company_commission_1 = $r->company_commission_1 ;\n $this->company_commission_2 = $r->company_commission_2 ;\n $this->company_commission_3 = $r->company_commission_3 ;\n $this->company_freight = ($r->company_commission_1 +$r->company_commission_2+ $r->company_commission_3);\n\n $this->customer_freight = 100 - $this->contractor_commission;\n\n $this->driver_id_1 = $r->driver_id_1 ;\n $this->driver_name_1 = $r->driver_2_name ;\n\n $this->driver_id_2 = $r->driver_id_2 ;\n $this->driver_name_2 = $r->driver_2_name ;\n\n $this->driver_id_3 = $r->driver_id_3 ;\n $this->driver_name_3 = $r->driver_3_name ;\n\n $this->invoice_number = $r->invoice_number;\n\n $this->paid_to_customer = ($r->paid_to_customer != '')?$r->paid_to_customer:0;\n $this->payment_to_customer_date = $r->payment_to_customer_date;\n }", "public function setCompany($company)\n {\n $this->company = $company;\n }", "public function setOrigin($origin, $reassign = false);", "public function block_restaurant() {\n\n $restaurant = Restaurant::where('id',$_POST['restaurant_id'])->first();\n $restaurant->status = $_POST['status'];\n $restaurant->save();\n\n if(!$restaurant){\n $finalResult = array('msg' => 'error', 'response' => 'Something went');\n echo json_encode($finalResult);\n exit;\n }else{ \n $finalResult = array('msg' => 'success', 'response' => 'Restaurant has been blocked successfully.');\n echo json_encode($finalResult);\n exit;\n }\n }", "static function updateCompanyPolicy($companyno, $newpolicyno) {\n\t\t$sql = \"\";\n\t\t$sql=\"UPDATE Client SET Policy_No='$newpolicyno'\";\n\t\t$sql = $sql.\" WHERE Company='$companyno'\";\n\t\tmysql_query($sql) or die(mysql_error());\n\t\treturn true;//return true\n\t}", "protected function setOrganization() {}", "public function testIsApplicable()\n {\n $paymentMethod = $this->createMock(\\Magento\\Payment\\Model\\MethodInterface::class);\n $quote = $this->createPartialMock(\\Magento\\Quote\\Model\\Quote::class, ['getCustomerId']);\n $quote->expects($this->once())->method('getCustomerId')->willReturn(1);\n $paymentMethod->expects($this->once())->method('getCode')->willReturn('paymentCode');\n $this->assertTrue($this->hasCompanyPermission->isApplicable($paymentMethod, $quote));\n }", "public function update(Request $request, Restaurant $restaurant)\n {\n $request->validate([\n 'name' => 'required|string',\n 'country' => 'required|numeric',\n 'city' => 'required|numeric',\n 'type_food' => 'required',\n 'phone' => 'required|numeric',\n 'description' => 'required|string',\n 'menu' => 'mimes:jpg,jpeg,png,pdf',\n 'location' => 'required|url',\n 'manager_number' => 'nullable|numeric|min:8' , \n 'manager_email' => 'nullable|email|max:100'\n ]);\n if ($request->hasFile('menu')) {\n $newMenu = $request->file('menu');\n if (!(empty($restaurant->picture))) {\n $path = public_path() . '\\images\\res-images\\menu\\\\' . $restaurant->picture;\n unlink($path);\n $request['menu'] = $this->saveImage($request->file('menu'), 'images/res-images/menu');\n } else {\n $request['menu'] = $this->saveImage($request->file('menu'), 'images/res-images/menu');\n }\n }\n $restaurant->update([\n 'name' => $request->input('name'),\n 'country_id' => $request->input('country'),\n 'city_id' => $request->input('city'),\n 'type_food' => $request->input('type_food'),\n 'number' => $request->input('phone'),\n 'description' => $request->input('description'),\n 'manager_email' => $request->input('manager_email'),\n 'manager_number' => $request->input('manager_number'),\n 'picture' => $request['menu'] != '' ? $request['menu'] : $restaurant->picture,\n 'map_url' => $request->input('location')\n ]);\n if ($restaurant->appsDelivery()->exists()) {\n $restaurant->appsDelivery()->update(['mrsool' => $request->input('mrsool'), 'logmaty' => $request->input('logmaty'), 'hungerStation' => $request->input('hungerStation'), 'jahiz' => $request->input('jahiz'), 'careemNow' => $request->input('careemNow')]);\n } else {\n $restaurant->appsDelivery()->create(['mrsool' => $request->input('mrsool'), 'logmaty' => $request->input('logmaty'), 'hungerStation' => $request->input('hungerStation'), 'jahiz' => $request->input('jahiz'), 'careemNow' => $request->input('careemNow')]);\n }\n return redirect()->to(route('restaurant.index'))->with(['success' => \"Updated Restaurant $request->name Successfully\"]);\n }", "public function testSetRestrictAccesPieces() {\n\n $obj = new Collaborateurs();\n\n $obj->setRestrictAccesPieces(true);\n $this->assertEquals(true, $obj->getRestrictAccesPieces());\n }", "public function restaurant()\n {\n return $this->belongsTo('App\\Models\\Restaurant');\n }", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'title' => 'required',\n 'coupon_type' => 'required',\n 'coupon_code' => 'required|between:4,20|alpha_num',\n 'coupon_value' => 'required',\n 'coupon_count' => 'required',\n 'start_date' => 'required',\n 'end_date' => 'required',\n ]);\n\n // $res_id = Auth::guard('restaurant')->id();\n \n if(Auth::guard('restaurant')->id())\n {\n $res_id= Auth::guard('restaurant')->id();\n }\n else if(Auth::guard('manager')->id())\n {\n $manager = Auth::guard('manager')->user();\n $res_id=$manager->restaurant_id;\n $user_type=$manager->user_type;\n $perms=get_admin_module_permission($res_id,$user_type,'coupon');\n\n if(isset($perms))\n {\n if($perms->create)\n {}\n else{\n return view('admin.nopermission')->with('error', 'Permission Denied');\n } \n }\n }\n else{\n return redirect('admin');\n }\n\n $request['restaurant_id']=$res_id;\n $check_title = Coupon::where([\n ['title', ucwords(strtolower($request->title))],\n ['restaurant_id', $res_id],\n ])->first();\n \n $check_code = Coupon::where([\n ['coupon_code',$request->coupon_code],\n ['restaurant_id', $res_id],\n ])->first();\n\n if ($check_title) {\n return redirect()->back()->withInput($request->input())->with('error', 'Title already exists');\n }\n\n if ($check_code) {\n return redirect()->back()->withInput($request->input())->with('error', 'Coupon Code already exists');\n }\n \n $enabled = $request->enabled == 'on' ? 1 : 0;\n $request['title']=ucwords(strtolower($request->title));\n $request['enabled'] = $enabled;\n $request['count'] = $request->coupon_count;\n Coupon::insert($request->only('restaurant_id','title','description','coupon_code','coupon_value','coupon_type','count','max_discount','start_date','end_date','enabled'));\n\n return redirect('/coupon')->withInput($request->input())->with('success', 'Added Successfully');\n }", "public function setCanShipPartially($flag);", "public function restaurant()\n {\n return $this->belongsTo('App\\Models\\Local', 'riflocal', 'rif');\n }", "public function update(Request $request, Restaurant $restaurant)\n {\n // check phone number\n $telephone_check = new CheckFormData;\n if ($telephone_check -> checkPhoneNumber($request)) {\n return $telephone_check -> checkPhoneNumber($request);\n }\n \n // check categories array\n $categories = $request ->category_id;\n $allCateogories = Category::all();\n if(!$categories){\n \n return back() ->withErrors('Devi selezionare almeno una cateogoria per il tuo ristorante');\n }else{\n foreach ($categories as $category) {\n if ($category > count($allCateogories)){\n return back() ->withErrors('Devi selezionare almeno una cateogoria per il tuo ristorante');\n }\n }\n }\n \n // Check if in a text input field the user is using a special banned char\n $special_char_check = new CheckFormData;\n $fields_to_check = CheckFormData::restaurantsTextFields();\n $text_fields_values = $special_char_check -> getTextFieldsValues($fields_to_check, $request);\n if ($special_char_check -> checkSpecialChar($text_fields_values)) {\n return $special_char_check -> checkSpecialChar($text_fields_values);\n }\n\n $validateData = $request -> validate(MyValidation::validateRestaurant());\n $categories = $request ->get('category_id');\n\n if ($request ->file('img_cover')) {\n // delete old img\n $delete = new Images;\n $toDelete = $restaurant ->img_cover;\n $delete ->deleteRestaurantCover($toDelete);\n\n $image = new Images;\n $coverImgNewName = $image->getImgName($request, 'img_cover');\n $folderPath = '/images/restaurants/cover';\n $storedImg = ($request ->file('img_cover')) \n ->storeAs($folderPath, $coverImgNewName, 'public');\n $restaurant ->img_cover = $coverImgNewName;\n }\n\n if ($request ->file('logo')) {\n // delete old image\n $delete = new Images;\n $toDelete = $restaurant ->logo;\n $delete ->deleteRestaurantLogo($toDelete);\n\n $image = new Images;\n $logoimgNewName = $image->getImgName($request, 'logo');\n $folderPath = '/images/restaurants/logo';\n $storedImg = ($request ->file('logo')) \n ->storeAs($folderPath, $logoimgNewName, 'public');\n $restaurant ->logo = $logoimgNewName;\n }\n\n $restaurant ->update($validateData);\n $restaurant ->categories() ->sync($categories);\n $restaurant ->save();\n\n return redirect() -> route('restaurants.protectedShow', $restaurant -> id);\n }", "public function testModerationByCompany(): void\n {\n // Initial state\n $productSummaryArray = $this->getProductsSummary();\n\n static::assertSame(11, $productSummaryArray[3][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertSame(2, $productSummaryArray[3][ProductApprovalStatus::PENDING()->getKey()]);\n static::assertSame(1, $productSummaryArray[3][ProductApprovalStatus::REJECTED()->getKey()]);\n\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::PENDING()->getKey()]);\n\n // We approve all products of company 3\n $this->moderationService->moderateByCompany(3, 'approve');\n\n // Pending products of company 3 should now be approved\n $productSummaryArray = $this->getProductsSummary();\n\n static::assertSame(13, $productSummaryArray[3][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertArrayNotHasKey(ProductApprovalStatus::PENDING()->getKey(), $productSummaryArray[3]);\n static::assertSame(1, $productSummaryArray[3][ProductApprovalStatus::REJECTED()->getKey()]);\n\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::PENDING()->getKey()]);\n }", "private function setAccommodations()\n {\n // Localise stuff\n $con = $this->con;\n $ownerId = $this->id;\n\n // Get the accom id from db and create new accom objects\n $stmt = $con->prepare(\"SELECT \" . Accommodation::ID_COLUMN . \" FROM \" . Accommodation::TABLE_NAME . \" WHERE \" . Accommodation::FOREIGN_KEY_COLUMN . \" = $ownerId \");\n try\n {\n if(!$stmt->execute())\n {\n throw new Exception(\"Error getting accommodations for owner $ownerId\", 1);\n }\n $stmt->bindColumn(1, $accId);\n $accommodations = array();\n // Loop through every accommodation\n while($stmt->fetch())\n {\n $acc = new Accommodation($con, 'get', array('id' => $accId));\n if($acc->getError())\n {\n $this->errorMsg .= \" Error with accommodation $accId: \" . $acc->getError();\n continue;\n }\n array_push($accommodations, $acc);\n }\n // Set accom\n $this->accommodations = $accommodations;\n }// try\n catch(Exception $e)\n {\n $this->errorMsg = $e->getMessage();\n }\n }", "function setRetiro($monto, $cheque = DEFAULT_CHEQUE,\t$tipo_de_pago = \"cheque\", $recibo_fiscal = DEFAULT_RECIBO_FISCAL,\n\t\t\t\t\t\t$observaciones = \"\", $grupo = DEFAULT_GRUPO, $fecha = false, $recibo = false){\n\t\t$iduser\t\t= getUsuarioActual();\n\n\t\t/**\n\t\t * verifica el maximo Retirable\n\t\t * Si forzar es VERDADERO, el Maximo retirable es igual al SALDO\n\t\t */\n\t\t if ( $this->mForceOperations == true){\n\t\t \t$maximo_ret\t\t\t= $this->mSaldoActual;\n\t\t \t$this->mMessages \t.= \"WARN\\tLa Operacion sera FORZADA \\r\\n\";\n\t\t } else {\n\t\t\t$maximo_ret\t= $this->getMaximoRetirable($fecha);\n\t\t }\n\t\tif ( $monto > $maximo_ret) {\n\t\t\t$this->mMessages \t.= \"ERROR\\tEl Monto a Retirar($monto) es Mayor al Retirable($maximo_ret) \\r\\n\";\n\t\t\t$monto\t= 0;\n\t\t\t$recibo\t= false;\n\t\t}\n\t\tif ( $monto > 0){\n\t\t\t\tif ( in_array($this->mEstatusActual, $this->mEstatusNoOperativos) == true OR ($monto > $this->mSaldoActual) ){\n\n\t\t\t\t\t$this->mMessages \t.= \"ERROR\\tLa Cuenta no esta permitida para recibir Operacion, tiene estatus \" . $this->mEstatusActual .\" \";\n\t\t\t\t\t$this->mMessages \t.= \"o su saldo(\" . $this->mSaldoActual . \") es Mayor al Monto a retirar($monto) \\r\\n\";\n\t\t\t\t\t$this->mSucess\t\t= false;\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( setNoMenorQueCero($this->mPeriodoCuenta) == 0 ){ $this->mPeriodoCuenta\t= 1; }\n\t\t\t\t\tif ( setNoMenorQueCero($this->mSocioTitular) <= DEFAULT_SOCIO){\t$this->init();\t}\n\n\t\t\t\t\tif ($fecha == false ){\n\t\t\t\t\t\tif ( isset($this->mFechaOperacion) AND ($this->mFechaOperacion != false)) {\n\t\t\t\t\t\t\t$fecha = $this->mFechaOperacion;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$fecha = fechasys();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$fecha\t\t\t\t\t= setFechaValida($fecha);\n\t\t\t\t\t$this->mFechaOperacion\t= $fecha;\n\t\t\t\t\t$socio\t\t\t\t\t= $this->mSocioTitular;\n\n\t\t\t\t\t$CRecibo = new cReciboDeOperacion(8, true);\n\t\t\t\t\t//Set a Mvto Contable\n\t\t\t\t\t//Agregar recibo si no hay\n\t\t\t\t\tif ( setNoMenorQueCero($recibo) == 0 ){\n\t\t\t\t\t\t$recibo = $CRecibo->setNuevoRecibo($socio, $this->mNumeroCuenta,\n\t\t\t\t\t\t\t\t\t\t\t\t$this->mFechaOperacion, $this->mPeriodoCuenta, 8,\n\t\t\t\t\t\t\t\t\t\t\t\t$observaciones, $cheque, $tipo_de_pago, $recibo_fiscal, $grupo );\n\t\t\t\t\t\tif (setNoMenorQueCero( $recibo ) == 0 ){\n\t\t\t\t\t\t\t$this->mMessages\t.= \"OK\\tSe Agrego Exitosamente el Recibo [$recibo] de la Cuenta \" . $this->mNumeroCuenta . \" \\r\\n\";\n\t\t\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\t\t\t\t\t\t\t$this->mSucess\t\t= true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->mMessages\t.= \"ERROR\\tSe Fallo al Agregar el Recibo [$recibo] de la Cuenta \" . $this->mNumeroCuenta . \" \\r\\n\";\n\t\t\t\t\t\t\t$this->mSucess\t\t= false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\n\t\t\t\t\tif ( setNoMenorQueCero($recibo) > 0 ){\n\t\t\t\t\t//Agregar el Movimiento\n\t\t\t\t\t\t$CRecibo->setNumeroDeRecibo($recibo);\n\t\t\t\t\t\t$CRecibo->setNuevoMvto($fecha, $monto, $this->mOperacionRetiro, $this->mPeriodoCuenta, $observaciones, -1, TM_CARGO, $socio, $this->mNumeroCuenta);\n\t\t\t\t\t\t$CRecibo->setFinalizarRecibo(true);\n\t\t\t\t\t\t$CRecibo->setFinalizarTesoreria();\n\t\t\t\t\t\t$this->mNuevoSaldo\t= $this->mSaldoAnterior - $monto;\n\n\t\t\t\t\t\t$this->mSucess\t= true;\n\t\t\t\t\t\t///Actualizar el recibo\n\t\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\t\t\t\t\t\t//Actualizar la Cuenta\n\t\t\t\t\t\t$this->setUpdateSaldo();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->mMessages\t.= \"ERROR\\tNo Existe Recibo con el cual trabajar($recibo) \\r\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mMessages\t.= $CRecibo->getMessages();\n\t\t\t\t\t$this->mORec\t\t= $CRecibo;\n\t\t\t\t}\n\t\t}\n\n\t\treturn $recibo;\n\t}", "public function setCountryRestriction($country)\n\t {\n\t \t $this->json['params'][$this->account]['country_restriction'] = $country;\n\t \t \n\t \t return $this;\n\t }", "public function restaurant()\n {\n return $this->belongsTo('App\\Restaurant', 'restaurant_id');\n }", "public function setIsContractor(bool $isContractor) : self\n {\n $this->isContractor = $isContractor;\n return $this;\n }", "public function store(CreateRestaurantRequest $request)\n {\n $hash = bin2hex(random_bytes(25));\n $res = Restaurant::create([\n 'name' => $request->input('name'),\n 'country_id' => $request->input('country'),\n 'city_id' => $request->input('city'),\n 'type_food' => $request->input('type_food'),\n 'number' => $request->input('phone'),\n 'description' => $request->input('description'),\n 'approved' => '0',\n 'manager_number' => $request->input('manager_number'),\n 'manager_email' => $request->input('manager_email'),\n 'menu' => $this->saveImage($request->file('menu'), 'images/res-images/menu'),\n 'map_url' => $request->input('location')\n ]);\n $res->appsDelivery()->create(['mrsool' => $request->input('mrsool'), 'logmaty' => $request->input('logmaty'), 'hungerStation' => $request->input('hungerStation'), 'jahiz' => $request->input('jahiz'), 'careemNow' => $request->input('careemNow')]);\n $res->contract()->create(['hash' => $hash , 'approve_at\t' => NULL , 'signed_name' => NULL]);\n return redirect()->to(route('restaurant.index'))->with(['success' => \"Added Restaurant $request->name Successfully\"]);\n }", "public function update(Request $request){ \n $restaurant = Restaurant::find($request->user_id);\n $restaurant->active = $request->status;\n $restaurant->save();\n $user = $restaurant->user;\n $user->active = $request->status;\n $user->save();\n $response['restaurant'] = $restaurant;\n return response()->json($response, $this-> successStatus); \n }", "public function restaurant_update_status($restaurant_id = '') {\n\t global $foodbakery_plugin_options;\n\t $foodbakery_restaurants_review_option = isset($foodbakery_plugin_options['foodbakery_restaurants_review_option']) ? $foodbakery_plugin_options['foodbakery_restaurants_review_option'] : '';\n\n\t $get_restaurant_id = foodbakery_get_input('restaurant_id', 0);\n\t $is_updating = false;\n\t if ($get_restaurant_id != '' && $get_restaurant_id != 0 && $this->is_publisher_restaurant($get_restaurant_id)) {\n\t\t$is_updating = true;\n\t }\n\n\t $user_data = wp_get_current_user();\n\n\t if ($foodbakery_restaurants_review_option == 'on') {\n\t\tupdate_post_meta($restaurant_id, 'foodbakery_restaurant_status', 'awaiting-activation');\n\t\t// Restaurant not approved\n\t\tdo_action('foodbakery_restaurant_not_approved_email', $user_data, $restaurant_id);\n\t } else {\n\t\tupdate_post_meta($restaurant_id, 'foodbakery_restaurant_status', 'active');\n\t\t// Restaurant approved\n\t\tdo_action('foodbakery_restaurant_approved_email', $user_data, $restaurant_id);\n\n\t\t// social sharing\n\t\t$get_social_reach = get_post_meta($restaurant_id, 'foodbakery_transaction_restaurant_social', true);\n\t\tif ($get_social_reach == 'on') {\n\t\t do_action('foodbakery_restaurant_social_post', $restaurant_id);\n\t\t}\n\t }\n\n\t $foodbakery_free_restaurants_switch = isset($foodbakery_plugin_options['foodbakery_free_restaurants_switch']) ? $foodbakery_plugin_options['foodbakery_free_restaurants_switch'] : '';\n\n\t if ($foodbakery_free_restaurants_switch != 'on') {\n\n\t\t$foodbakery_package_id = get_post_meta($restaurant_id, 'foodbakery_restaurant_package', true);\n\t\tif ($foodbakery_package_id) {\n\t\t $foodbakery_package_data = get_post_meta($foodbakery_package_id, 'foodbakery_package_data', true);\n\n\t\t $restaurant_duration = isset($foodbakery_package_data['restaurant_duration']['value']) ? $foodbakery_package_data['restaurant_duration']['value'] : 0;\n\n\t\t // calculating restaurant expiry date\n\t\t $foodbakery_trans_restaurant_expiry = $this->date_conv($restaurant_duration, 'days');\n\t\t update_post_meta($restaurant_id, 'foodbakery_restaurant_expired', strtotime($foodbakery_trans_restaurant_expiry));\n\t\t}\n\t }\n\t}", "function beforeDelete($req, $roo)\n {\n if(!empty($this->is_system) && \n ($old->code != $this->code || $old->name != $this->name)\n ){\n $roo->jerr('This company is not allow to delete');\n }\n \n \n }", "public function setCanShipPartiallyItem($flag);", "function setMontoAhorroPreferente($monto){\n\t\t$xOP\t= new cPersonasCatalogoOtrosDatos();\n\t\t$this->addOtrosParametros($xOP->PERSONAS_MONTO_AHORRO_PREFERENTE, $monto);\n\t\t\n\t\t$this->setUpdate(array(\"descuento_preferente\" => $monto) );\n\t\t\n\t\tif(PERSONAS_COMPARTIR_CON_ASOCIADA == true){\n\t\t\t//ejecutar el url\n\t\t\t$this->getExportarAsociada(TPERSONAS_GENERALES);\n\t\t\t$this->getExportarAsociada(TPERSONAS_DIRECCIONES);\n\t\t\t$this->getExportarAsociada(TPERSONAS_ACTIVIDAD_ECONOMICA);\n\t\t\tif($this->getEsEmpresaConConvenio() == true){\n\t\t\t\t$this->getExportarAsociada(TCATALOGOS_EMPRESAS);\n\t\t\t}\n\t\t}\n\t}", "public function setCrit()\n {\n $this->_role->crit = 100;\n }", "public function setCompany(string $company): void\n {\n $this->_company = $company;\n }", "public function addRestaurantSuggest($data)\n {\n try {\n $this->name = $data['name'];\n $this->address = $data['address'];\n $this->telephone = $data['telephone'];\n $this->latitude = $data['latitude'];\n $this->longitude = $data['longitude'];\n $this->user_id = $data['user_id'];\n $this->cuisines = $data['cuisines'];\n $this->other_details = $data['other_details'];\n $this->save();\n\n return $this;\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'coupon_type' => 'required',\n 'coupon_code' => 'required|between:4,20|alpha_num',\n 'coupon_value' => 'required',\n 'coupon_count' => 'required',\n 'start_date' => 'required',\n 'end_date' => 'required',\n ]);\n \n if(Auth::guard('restaurant')->id())\n {\n $res_id= Auth::guard('restaurant')->id();\n }\n else if(Auth::guard('manager')->id())\n {\n $manager = Auth::guard('manager')->user();\n $res_id=$manager->restaurant_id;\n $user_type=$manager->user_type;\n $perms=get_admin_module_permission($res_id,$user_type,'coupon');\n\n if(isset($perms))\n {\n if($perms->update)\n {}\n else{\n return view('admin.nopermission')->with('error', 'Permission Denied');\n } \n }\n }\n else{\n return redirect('admin');\n }\n\n\n // $res_id = Auth::guard('restaurant')->id();\n $request['restaurant_id']=$res_id;\n $check_title = Coupon::where([\n ['title', ucwords(strtolower($request->title))],\n ['restaurant_id', $res_id],\n ['id','!=',$id]\n ])->first();\n \n $check_code = Coupon::where([\n ['coupon_code',$request->coupon_code],\n ['restaurant_id', $res_id],\n ['id','!=',$id]\n ])->first();\n\n if ($check_title) {\n return redirect()->back()->withInput($request->input())->with('error', 'Title already exists');\n }\n\n if ($check_code) {\n return redirect()->back()->withInput($request->input())->with('error', 'Coupon Code already exists');\n }\n \n $enabled = $request->enabled == 'on' ? 1 : 0;\n $request['title']=ucwords(strtolower($request->title));\n $request['enabled'] = $enabled;\n $request['count'] = $request->coupon_count;\n Coupon::where('id',$id)->update($request->only('restaurant_id','title','description','coupon_code','coupon_value','coupon_type','count','max_discount','start_date','end_date','enabled'));\n\n return redirect()->back()->with('success', 'Updated Successfully');\n }", "public function setCustomerCompany($company)\n\t {\n\t \t $this->json['params'][$this->customer]['name']['company'] = $company;\n\t \t \n\t \t return $this;\n\t }", "public function chekcingForMarketplaceSellerOrNot() {\n /**\n * Initilize customer and seller group id\n */\n $customerGroupIdVal = $sellerGroupIdVal = $customerStatusValue = '';\n /**\n * Get customer group id\n * @var int\n */\n $customerGroupIdVal = Mage::getSingleton ( 'customer/session' )->getCustomerGroupId ();\n $sellerGroupIdVal = Mage::helper ( 'marketplace' )->getGroupId ();\n /**\n * Get customer status\n * @var int\n */\n $customerStatusValue = Mage::getSingleton ( 'customer/session' )->getCustomer ()->getCustomerstatus ();\n /**\n * Checking for customer group id and seller group id\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn () && $customerGroupIdVal != $sellerGroupIdVal) {\n /**\n * add error message\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You must have a Seller Account to access this page' ) );\n $this->_redirect ( 'marketplace/seller/login' );\n return false;\n }\n /**\n * Checking whether customer approved or not\n */\n if ($customerStatusValue != 1) {\n /**\n * add error message\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'Admin Approval is required. Please wait until admin confirms your Seller Account' ) );\n $this->_redirect ( 'marketplace/seller/login' );\n return false;\n }\n }", "private function _applyEditableParam()\n {\n if ($this->editable) {\n // Limit the query to only the global sets the user has permission to edit\n $editableSetIds = Craft::$app->getGlobals()->getEditableSetIds();\n $this->subQuery->andWhere(['elements.id' => $editableSetIds]);\n }\n }", "private function _applyEditableParam()\n {\n if ($this->editable) {\n // Limit the query to only the global sets the user has permission to edit\n $editableSetIds = Craft::$app->getGlobals()->getEditableSetIds();\n $this->subQuery->andWhere(['elements.id' => $editableSetIds]);\n }\n }", "private function setEnableReviews() {\n $this->product->set_reviews_allowed($this->wcData->isEnableReviews());\n }", "public function owner_request()\n\t{\n//\t\tcheck user type\n\t\tif ($this->session->userdata('user')['role'] != 'superAdmin') redirect('admin/home');\n\n\t\t$data['user'] = $this->session->userdata('user');\n\t\t$data['title'] = \"Home\";\n\n\t\t$this->db->select(\"claim_your_business.*, restaurants.name as restaurant_name\");\n\t\t$this->db->join('restaurants', 'restaurants.id = claim_your_business.restaurant_id');\n\t\t$this->db->where('claim_your_business.status != ', 2);\n\t\t$this->db->order_by('id', 'DESC');\n\t\t$data['business'] = $this->db->get('claim_your_business')->result();\n\n\t\t$this->load->view('layouts/header.php', $data);\n\t\t$this->load->view('admin/owner_index.php');\n\t\t$this->load->view('layouts/footer.php');\n\t}", "public function restaurant()\n {\n return $this->restaurant;\n }", "public function setAuthorized() {}", "public function setCrit()\n {\n $this->_role->crit = 0;\n }", "public function saveNewRestaurant(Restaurant $res){\n\t\t$city = strtolower($res->getCity());\n\t\tif ($city == 'göteborg' || $city == 'goteborg' || $city == 'gÖteborg'){\n\t\t\t$city = 'gothenburg';\n\t\t}\n\t\t$res->setCity($city);\n\t\t/*\n\t\t * This is if we're going to add a search before the insert to check if the rest exists\n\t\t$query = \"SELECT id FROM restaurant WHERE name ='{$res->getName()}' LIMIT 1\";\n\n\t\tvar_dump($this->mysqli->query($query)); die();\n\t\tif (null == $this->mysqli->query($query)){\n\t\t\tvar_dump($this->mysqli->query($query)); die();\n\n\t\t\t\tdie($this->mysqli->error);\n\t\t\t\treturn false;}\n\t\t\telse {\n\t\t\t\tif ($this->mysqli->affected_rows == 0) {\n\t\t\t\t\t$row = $result->fetch_object();\n\t\t\t\t\t$city = $row->city;\n\t\t\t\t}\n\t\t\t}\n\t\t*/\n\n\t\t$query = \"SELECT id FROM city WHERE name = '$city' LIMIT 1\";\n\t\t$result = $this->mysqli->query($query);\n\t\t$row = $result->fetch_object();\n\n\t\tif(null == $row->id) {\n\t\t\techo \"We do not support this city yet, plz come back later. City name:\" . $city;\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$res->setCity($row->id);\n\t\t\t$query = sprintf(\"INSERT INTO restaurant(\n\n\t\t\t\tname,\n\t\t\t\tcity,\n\t\t\t\tzipcode,\n\t\t\t\tstreet,\n\t\t\t\tphone,\n\t\t\t\tfax,\n\t\t\t\twebsite,\n\t\t\t\tlatitude,\n\t\t\t\tlongitude,\n\t\t\t\thasbreakfast,\n\t\t\t\thaslunch,\n\t\t\t\thasdinner,\n\t\t\t\tapproved,\n\t\t\t\thittaId\n\t\t\t\t)VALUES (\n\t\t\t\t'%s',\n\t\t\t\t'%d',\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%s',\n\t\t\t\t'%d',\n\t\t\t\t'%d',\n\t\t\t\t'%d',\n\t\t\t\t'%d',\n\t\t\t\t'%d',\n\t\t\t\t'%d',\n\t\t\t\t'%s'\n\n\t\t\t\t)\",\n\t\t\t\t$res->getName(),\n\t\t\t\t$res->getCity(),\n\t\t\t\t$res->getZip(),\n\t\t\t\t$res->getStreet(),\n\t\t\t\t$res->getPhone(),\n\t\t\t\t$res->getFax(),\n\t\t\t\t$res->getWebsite(),\n\t\t\t\t$res->getLatitude(),\n\t\t\t\t$res->getLongitude(),\n\t\t\t\t$res->getHas_breakfast(),\n\t\t\t\t$res->getHas_lunch(),\n\t\t\t\t$res->getHas_dinner(),\n\t\t\t\t1,\n\t\t\t\t$res->getHittaId()\n\t\t\t\t);\n\n\t\t\t\tif (!$this->mysqli->query($query)) {\n\t\t\t\t\tdie($this->mysqli->error);\n\t\t\t\t} else {\n\t\t\t\t\t$rest_id = $this->mysqli->insert_id;\n\t\t\t\t\t$res->setId($rest_id);\n\t\t\t\t\t$query = \"SELECT id FROM restauranttype WHERE name = '{$res->getType()}' LIMIT 1\";\n\t\t\t\t\t$result = $this->mysqli->query($query);\n\t\t\t\t\t$row = $result->fetch_object();\n\n\t\t\t\t\tif(null == $row->id) {\n\t\t\t\t\t\techo \"We do not support this type yet, plz come back later. Type name:\" . $res->getType();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$query = sprintf(\"INSERT INTO restauranttype_join_restaurant (\n\t\t\t\t\t\trestauranttype_id,\n\t\t\t\t\t\trestaurant_id\n\n\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d'\n\t\t\t\t\t\t)\",\n\t\t\t\t\t\t$row->id,\n\t\t\t\t\t\t$rest_id\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (!$this->mysqli->query($query)) {\n\t\t\t\t\t\t\tdie($this->mysqli->error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t}\n\t}", "public function setCarRental(array $carRental)\r\n {\r\n $this->_carRental = $carRental;\r\n }", "public function testOrderReassign() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'default',\n 'unit_price' => [\n 'number' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n /** @var \\Drupal\\commerce_order\\Entity\\OrderInterface $order */\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'uid' => $this->loggedInUser->id(),\n 'order_items' => [$order_item],\n 'store_id' => $this->store,\n ]);\n\n $this->assertNotEmpty($order->hasLinkTemplate('reassign-form'));\n\n $this->drupalGet($order->toUrl('reassign-form'));\n $this->getSession()->getPage()->fillField('customer_type', 'new');\n $this->waitForAjaxToFinish();\n\n $values = [\n 'mail' => '[email protected]',\n ];\n $this->submitForm($values, 'Reassign order');\n\n $this->assertEquals($order->toUrl('collection', ['absolute' => TRUE])->toString(), $this->getSession()->getCurrentUrl());\n\n // Reload the order.\n \\Drupal::service('entity_type.manager')->getStorage('commerce_order')->resetCache([$order->id()]);\n $order = Order::load($order->id());\n $this->assertEquals($order->getCustomer()->getEmail(), '[email protected]');\n $this->assertEquals($order->getEmail(), '[email protected]');\n }", "public function edit(User $user, Restaurant $restaurant){\n return $user->id === $restaurant->user_id;\n }", "public function update(Request $request, Restaurant $restaurant)\n {\n\t\t$validated = request()->validate([\n\t\t\t'user_id' => ['required', 'integer'],\n 'name' => ['required'],\n\t\t\t'kvk' => ['required','integer'],\n 'address' => [''],\n\t\t\t'zipcode' => [''],\n\t\t\t'city' => [''],\n\t\t\t'phone' => ['integer'],\n\t\t\t'email' => ['required','email'],\n\t\t\t'open' => ['required',''],\n\t\t\t'close' => ['required',''],\n\n ]);\n $restaurant->update($validated);\n\t\treturn redirect()->back();\n }", "protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }", "public function update(Request $request, Restaurant $restaurant)\n {\n //\n }", "private function savePermissions(): void\n {\n $this->client->isPayor = $this->isPayor;\n $this->client->isAgencyBankAccountSetup = $this->isAgencyBankAccountSetup;\n $this->client->canViewDocumentation = $this->canViewDocumentation;\n }", "function cancel_distributor_order($distributor_order_id){\r\n $this->db->query(\"UPDATE `distributor_orders` SET status_id = 14 WHERE id = ?\", array($distributor_order_id));\r\n //check if we have multiple distributors on this order.\r\n $query = $this->db->query(\"SELECT order_id FROM `distributor_orders` WHERE id = ?\", array($distributor_order_id));\r\n $result = $query->row_array();\r\n $order_id = $result['order_id']; \r\n\r\n //if there is only one dist_order cancel the main order also.\r\n $query = $this->db->query(\"SELECT order_id FROM `distributor_orders` WHERE id = ?\", array($distributor_order_id));\r\n if($query->num_rows() == 1){\r\n $this->cancel_order($order_id);\r\n }\r\n\r\n return true;\r\n }", "function SetAccessRestriction($ip,$user,$endtime,$attempt) {\r\n /*\r\n Create access restriction by username. IP is for logging only\r\n */\r\n global $dbUser;\r\n global $dbPass;\r\n global $dbName;\r\n global $connection;\r\n\r\n $id=rand(0,1000);\r\n if ($attempt==1) {\r\n $dbquery=$connection->query(\"insert into accessres values('$id','$ip','$endtime','$user','$attempt')\") or die(json_encode(array(\"err\"=>mysqli_error($connection))));\r\n }\r\n elseif ($attempt==2){ \r\n $dbquery=$connection->query(\"update accessres set attempt=2 where username='$user'\") or die(json_encode(array(\"err\"=>mysqli_error($connection))));\r\n }\r\n \r\n }", "private function setOther() {\n if (Request::has(\"include-other-read\") && Request::input(\"include-other-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-other-write\") && Request::input(\"include-other-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-other-execute\") && Request::input(\"include-other-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }", "public function setFullRights() {\n $this->canView = true;\n $this->canRule = true;\n $this->canDeal = true;\n \n return $this;\n }", "public function getRestaurant()\n {\n return $this->hasOne(Restaurant::className(), ['restaurantId' => 'restaurantId']);\n }", "public function _setFirma($Firma)\n {\n $this->Firma = $Firma;\n\n }", "protected function setCustomerFromAccountOrUser(): self\n {\n return $this->setCustomer($this->getCustomerFromAccountOrUser());\n }", "public function setCountryRestriction()\n\t {\n\t \t throw new OutOfBoundsException(\"Country restriction parameter is not availbale for PaySafeCard CreateDisposition\");\n\t }", "public function testGetOfficesWithRestrictionCheckWithSuperUser()\n\t{\n\t\t// manually set phonelistRestrict on if its off;\n\t\t/** @var SystemConfigRepository $systemConfigRepo */\n\t\t$systemConfigRepo = self::$em->getRepository(SystemConfig::class);\n\t\t$currentPhonelistRestrictState = self::$originalPhonelistRestrictState;\n\t\tif (!$currentPhonelistRestrictState) {\n\t\t\t/** @var SystemConfig $dorPhonelistRestrict */\n\t\t\t$dorPhonelistRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorPhonelistRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorPhonelistRestrict);\n\t\t\t$currentPhonelistRestrictState = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT)->getNormalizedValue();\n\t\t}\n\n\t\t$headers = array(\n\t\t\t'HTTP_AUTHORIZATION' => HttpHeader::BEARER.' '.self::$superUserToken,\n\t\t);\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_GET,\n\t\t\t'/api/v1/offices',\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$offices = json_decode($response->getContent(), true);\n\n\t\t//Test that the association array is not empty\n\t\t$this->assertTrue(sizeof($offices) > 0);\n\n\t\t//Test if exactly x offices are returned\n\t\t$this->assertTrue(8 === count($offices['data']));\n\n\t\t//Test that a offices has at minimum the below values\n\t\tforeach ($offices['data'] as $office) {\n\t\t\t$this->assertArrayHasKey('id', $office);\n\t\t\t$this->assertArrayHasKey('name', $office);\n\t\t}\n\n\t\t// manually set phonelistRestrict off if its on;\n\t\t$dorPhonelistRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t$dorPhonelistRestrict->setValue('no');\n\t\tself::$em->flush();\n\t\tself::$em->refresh($dorPhonelistRestrict);\n\t\t$currentPhonelistRestrictState = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT)->getNormalizedValue();\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_GET,\n\t\t\t'/api/v1/offices',\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is OK\n\t\t$this->assertSame(Response::HTTP_OK, $response->getStatusCode());\n\n\t\t// Test that response is not empty\n\t\t$this->assertNotEmpty($response->getContent());\n\n\t\t// Test if Content-Type is valid application/json\n\t\t$this->assertSame(HttpHeader::APPLICATION_JSON, $response->headers->get(HttpHeader::CONTENT_TYPE));\n\n\t\t//Deserialize response\n\t\t$offices = json_decode($response->getContent(), true);\n\n\t\t//Test that the association array is not empty\n\t\t$this->assertTrue(sizeof($offices) > 0);\n\n\t\t//Test if exactly x offices are returned\n\t\t$this->assertTrue(8 === count($offices['data']));\n\n\t\t//Test that a offices has at minimum the below values\n\t\tforeach ($offices['data'] as $office) {\n\t\t\t$this->assertArrayHasKey('id', $office);\n\t\t\t$this->assertArrayHasKey('name', $office);\n\t\t}\n\n\t\t// return phonelist restrict to original state\n\t\tif ($currentPhonelistRestrictState !== self::$originalPhonelistRestrictState) {\n\t\t\t$dorPhonelistRestrict = $systemConfigRepo->findOneByKey(SystemConfigKey::DOR_PHONELIST_RESTRICT);\n\t\t\t$dorPhonelistRestrict->setValue('yes');\n\t\t\tself::$em->flush();\n\t\t\tself::$em->refresh($dorPhonelistRestrict);\n\t\t}\n\t}", "function setSyncWarranty()\n {\n }", "function canEdit($user) {\n return $user->isCompanyManager($this);\n }", "public function setIsContractor(?bool $isContractor): self\n {\n $this->initialized['isContractor'] = true;\n $this->isContractor = $isContractor;\n\n return $this;\n }", "protected function makeBillingAreaRequired() {\n $user = new User();\n if ($user->hasRole('Company Administrator')) {\n $this->setElementPropertyValue('billing_area', '#required', TRUE);\n }\n }", "public function actionSaveRestaurantDetails() {\n //validate webservice\n $requiredParams = ['user_id', 'name', 'restaurant_lat', 'restaurant_long'];\n\n CommonApiHelper::validateRequestParameters($requiredParams);\n\n $response = [];\n\n try {\n //Get request parameters.\n $post = Yii::$app->request->bodyParams;\n $post = array_map('trim', $post);\n\n $user_id = $post['user_id'];\n $name = $post['name'];\n $mobile = !empty($post['mobile']) ? $post['mobile'] : null;\n $address = !empty($post['address']) ? $post['address'] : null;\n $country_code = !empty($post['country_code']) ? $post['country_code'] : 'US';\n $restaurant_google_id = !empty($post['restaurant_google_id']) ? $post['restaurant_google_id'] : null;\n $restaurant_lat = $post['restaurant_lat'];\n $restaurant_long = $post['restaurant_long'];\n\n //Fetch country details\n $countryDetails = Countries::findOne([\"code\" => $country_code]);\n\n //Fetch logged in user details\n $userdata = Users::find()->where(['user_id' => $user_id])->one();\n\n //update user type to restaurant user\n $userdata->user_type = Yii::$app->params['USER_TYPE']['restaurant'];\n $userdata->save(false);\n\n //Check if Restaurannt exist or not\n //If exist then Update Restaurant details\n //If not exist then Add Restaurant details\n $restaurants = Restaurants::find()->where(['user_id' => $user_id])->one();\n if (empty($restaurants)) {\n $restaurants = new Restaurants();\n }\n $restaurants->user_id = $user_id;\n $restaurants->name = !empty($post['name']) ? trim($post['name']) : '';\n $restaurants->restaurant_google_id = !empty($post['restaurant_google_id']) ? trim($post['restaurant_google_id']) : '';\n $restaurants->country_id = $countryDetails->id;\n $restaurants->mobile = !empty($post['mobile']) ? trim($post['mobile']) : '';\n $restaurants->address = !empty($post['address']) ? trim($post['address']) : '';\n $restaurants->restaurant_lat = !empty($post['restaurant_lat']) ? trim($post['restaurant_lat']) : '';\n $restaurants->restaurant_long = !empty($post['restaurant_long']) ? trim($post['restaurant_long']) : '';\n $restaurants->save(false);\n\n //send email to owner about restaurant registration\n if (!empty(Yii::$app->params['SITE_OWNER_EMAIL'])) {\n $emailformatemodel = EmailFormat::findOne([\"id\" => Yii::$app->params['EMAIL_TEMPLATE_ID']['restaurant_registered'], \"status\" => '1']);\n if ($emailformatemodel) {\n //create email body\n $AreplaceString = array(\n '{site_owner_name}' => Yii::$app->params['SITE_OWNER_NAME'],\n '{restaurant_name}' => $restaurants->name,\n '{restaurant_owner_name}' => $userdata->name,\n '{phone_number}' => $restaurants->mobile,\n '{email}' => $userdata->email,\n '{address}' => $restaurants->address\n );\n $body = CommonApiHelper::MailTemplate($AreplaceString, $emailformatemodel->body);\n $ssSubject = $emailformatemodel->subject;\n //send email to new registered user\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])\n ->setTo(Yii::$app->params['SITE_OWNER_EMAIL'])\n ->setSubject($ssSubject)\n ->setHtmlBody($body)\n ->send();\n }\n }\n\n //Prepare response\n $restaurantDetails = [\n 'name' => $restaurants->name,\n 'restaurant_google_id' => $restaurants->restaurant_google_id,\n 'mobile' => $restaurants->mobile,\n 'address' => $restaurants->address,\n 'restaurant_lat' => $restaurants->restaurant_lat,\n 'restaurant_long' => $restaurants->restaurant_long\n ];\n $response[] = [\n 'user_id' => $userdata->user_id,\n 'user_type' => $userdata->user_type,\n 'name' => $userdata->name,\n 'email' => $userdata->email,\n 'profile_pic' => !empty($userdata->profile_pic) ? $userdata->profile_pic : '',\n 'is_otp_verified' => $userdata->is_otp_verified,\n 'restaurant_details' => $restaurantDetails\n ];\n\n return CommonApiHelper::return_success_response(\"Restaurant details has been saved.\", \"\", $response);\n } catch (\\Exception $e) {\n return CommonApiHelper::return_error_response('Sorry, Please try again.');\n }\n }", "public function limitScopesToGrants($limit = false)\n {\n $this->limitScopesToGrants = $limit;\n }", "protected function setOfferApplicablePricing ()\n {\n $offerApplicableAccountHeads = $this->getOfferApplicableAccountHeads();\n\n foreach ( $this->request->pricing as $accountHead => $amount ) {\n if ( in_array($accountHead, $offerApplicableAccountHeads) ) {\n $this->offerApplicablePricing[ $accountHead ] = $amount;\n $this->offerApplicableAmount += $amount;\n }\n }\n }", "function useAvoir($orderlineors){\n $traceline = $orderlineors['KOID'].' '.$orderlineors['LNKREDUC'].' '.$orderlineors['LNKORDER'];\n Xlogs::notice(get_class($this), '::useAvoir '.$traceline);\n list($ok, $mess) = $this->modcustomer->useAvoir($orderlineors);\n if (!$ok)\n XLogs::critical(get_class($this), '::useAvoir erreur utilisation avoir'.$traceline.' '.$mess);\n }", "public function testIsApplicableWithNonAuthorizedUser()\n {\n $paymentMethod = $this->createMock(\\Magento\\Payment\\Model\\MethodInterface::class);\n $quote = $this->createPartialMock(\\Magento\\Quote\\Model\\Quote::class, ['getCustomerId']);\n $quote->expects($this->once())->method('getCustomerId')->willReturn(null);\n $this->assertTrue($this->hasCompanyPermission->isApplicable($paymentMethod, $quote));\n }", "public function testSetInterdireModifDepot() {\n\n $obj = new Collaborateurs();\n\n $obj->setInterdireModifDepot(true);\n $this->assertEquals(true, $obj->getInterdireModifDepot());\n }", "protected function beforeSave(){\n if ($this->predeterminada) {\n $sql = \"UPDATE clientes_direcciones\n SET predeterminada = 0\n WHERE user_id = \" . $this->user_id;\n if (!$this->isNewRecord)\n $sql .= \" AND cliente_direccion_id <>\".$this->cliente_direccion_id;\n Yii::app()->db->createCommand($sql)->execute();\n\n }\n\n // Cuando una direccion se marca como predeterminada se sobreescriben los campos de cliente.\n if ($this->predeterminada) {\n $cliente = $this->obtenerCliente();\n $cliente->provincia_id = $this->provincia_id;\n $cliente->ciudad_id = $this->ciudad_id;\n $cliente->domicilio = $this->getFullDomicilio();\n $cliente->cpostal = $this->cpostal;\n $cliente->telefono1 = $this->prefijo . ' ' . $this->telefono;\n\n if (!$cliente->save()){\n $this->addError('ClientesDirecciones.predeterminada','Error al actualizar datos principales de direcion del cliente');\n return false;\n }\n }\n\n return parent::beforeSave();\n }", "public function assignTicketToAvailableStaff() {\n $assignableStaff = $this->unit->getAssignableStaff();\n\n if($assignableStaff) {\n $this->assignTicket($assignableStaff->id);\n }\n }", "public function testAssociationClienteVehiculoRuta()\n {\n\n $this->assertTrue($vehiculo->rutas->contains(['origen'=>'calle 1','destino'=>'calle 2']));\n $this->assertTrue($cliente->rutas->contains(['origen'=>'calle 1','destino'=>'calle 2']));\n\n }", "public function update(Request $request, Restaurant $restaurant)\n {\n\n $request->validate([\n 'title' => 'required',\n 'customers' => 'required',\n 'employees' => 'required',\n ]);\n\n $restaurant->fill($request->all());\n $restaurant->save();\n return redirect()->route('restaurant.index');\n\n }", "public function setShippingCompany($companyName = '') {\n $company = array(\n 'x_ship_to_company'=>$this->truncateChars($companyName, 50),\n );\n $this->NVP = array_merge($this->NVP, $company); \n }", "public function setOrganismeRetraite($organismeRetraite) {\n $this->organismeRetraite = $organismeRetraite;\n return $this;\n }", "public function approveByUser() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n $this->admin_id = NULL;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n \n return $this->save(false);\n }", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "public function rol_conductor_only_access()\n {\n if ($this->rol != 3) {\n exit($this->httpResponse(\"error\", \"forbbiden\", \"Your role do not have permission\", 403)->json());\n }\n }", "public function testRecurringReassign() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'product_variation',\n 'unit_price' => [\n 'amount' => '100',\n 'currency_code' => 'USD',\n ],\n ]);\n /** @var \\Drupal\\commerce_recurring\\Entity\\RecurringInterface $recurring */\n $recurring = $this->createEntity('commerce_recurring', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'uid' => $this->loggedInUser->id(),\n 'order_items' => [$order_item],\n ]);\n\n $this->assertTrue($recurring->hasLinkTemplate('reassign-form'));\n\n $this->drupalGet($recurring->toUrl('reassign-form'));\n $this->getSession()->getPage()->fillField('customer_type', 'new');\n $this->waitForAjaxToFinish();\n\n $values = [\n 'mail' => '[email protected]',\n ];\n $this->submitForm($values, 'Reassign recurring');\n\n $this->assertEquals($recurring->toUrl('collection', ['absolute' => TRUE])->toString(), $this->getSession()->getCurrentUrl());\n\n // Reload the recurring.\n \\Drupal::service('entity_type.manager')->getStorage('commerce_recurring')->resetCache([$recurring->id()]);\n $recurring = Recurring::load($recurring->id());\n $this->assertEquals($recurring->getOwner()->getEmail(), '[email protected]');\n $this->assertEquals($recurring->getEmail(), '[email protected]');\n }", "function addHotelRoom(Request $request){\n $oUser = Auth::user();\n $is_organizer=false;\n\n if($oUser->role!='admin'){\n foreach($oUser->traveller->travellersPerTrip as $travellersPerTrip) {\n $is_organizer=$travellersPerTrip->is_organizer;\n }\n }\n if (($oUser->role == 'guide'&& $is_organizer)||($oUser->role=='admin'))\n {\n $oRoom=new RoomsPerHotelPerTrip();\n $oRoom->hotels_per_trip_id=$request->post('hotels_per_trip_id');\n $oRoom->size=$request->post('AantalPersonen');\n $oRoom->save();\n\n return redirect()->back();\n }\n else{\n return redirect()->back();\n }\n }", "public function authorize()\n {\n// return Gate::allows('admin.discount.delete', $this->discount);\n return true;\n }", "public function create_contracts_for_one_legal_client()\n {\n $client_id = factory(Legal::class, 'active')->create()->client_id;\n factory(Contract::class, 'in_progress_legal', 2)->create(['client_id' => $client_id]);\n factory(Contract::class, 'finished_legal', 2)->create(['client_id' => $client_id]);\n }", "public function menuRestaurant() //--> funkcijos vardas menuRestaurant nieko nereiskia, pasirenkam i koki sugalvojam\n {\n return $this->belongsTo('App\\Models\\Menu', 'menu_id', 'id');\n \n }", "private function grantAdminAccess()\n {\n if ($this->checkColumn(\"shopgate\", TABLE_ADMIN_ACCESS)) {\n // Create column shopgate in admin_access...\n xtc_db_query(\n \"alter table \" . TABLE_ADMIN_ACCESS\n . \" ADD shopgate INT( 1 ) NOT NULL\"\n );\n\n // ... grant access to to shopgate for main administrator\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate=1 where customers_id=1 LIMIT 1\"\n );\n\n if (!empty($_SESSION['customer_id'])\n && $_SESSION['customer_id'] != 1\n ) {\n // grant access also to current user\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 1 where customers_id='\"\n . $_SESSION['customer_id']\n . \"' LIMIT 1\"\n );\n }\n\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 5 where customers_id = 'groups'\"\n );\n }\n }" ]
[ "0.57021207", "0.5621411", "0.53726816", "0.53401136", "0.5248676", "0.51060903", "0.50361985", "0.4981023", "0.49366984", "0.49023402", "0.48730832", "0.48726502", "0.4861729", "0.48549318", "0.4843774", "0.4808629", "0.48054048", "0.47951898", "0.477107", "0.47586006", "0.47489652", "0.47389808", "0.47318625", "0.47288603", "0.472774", "0.4723205", "0.47081316", "0.4704932", "0.46923134", "0.46888742", "0.46883592", "0.4688252", "0.46843654", "0.46788955", "0.46762288", "0.46522558", "0.46521226", "0.46510428", "0.46480078", "0.4641813", "0.46393168", "0.46376064", "0.4634589", "0.46335828", "0.46311736", "0.46163264", "0.46103674", "0.46066868", "0.46029526", "0.4602469", "0.4600442", "0.45776966", "0.45776966", "0.45748377", "0.45740366", "0.45729336", "0.45701176", "0.45696667", "0.45568028", "0.454686", "0.45454153", "0.45401466", "0.4539083", "0.45382068", "0.4535742", "0.4531608", "0.45265082", "0.45208982", "0.45160234", "0.4509258", "0.45057288", "0.45052564", "0.45021868", "0.44976923", "0.44947198", "0.44922847", "0.4490256", "0.44797483", "0.4474884", "0.44746107", "0.4470311", "0.44695422", "0.44672135", "0.44628555", "0.4460941", "0.445983", "0.4454178", "0.44529393", "0.44469836", "0.4442433", "0.4442399", "0.443991", "0.44395888", "0.44376284", "0.4437221", "0.44367036", "0.44350836", "0.4431203", "0.442964", "0.4426498" ]
0.5305844
4
remove restriction relationship with this restaurant
public function removeRestaurantRestriction($restId) { return $this->getTable()->removeRestaurantRestriction($restId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRemoveFromRelationship();", "public function forceDeleted(Remission $remission)\n {\n //\n }", "public function clearSolicitacaoResgatesRelatedBySolicitanteId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function destroy(Restaurant $restaurant)\n {\n //\n }", "public function removeIsolated()\n {\n $isolated_types = $this->type->doesntHave('movies')->get();\n\n foreach ($isolated_types as $type) {\n $this->delete($type->id);\n }\n }", "public function clearSolicitacaoResgatesRelatedByAprovadorId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedByAprovadorId = null; // important to set this to NULL since that means it is uninitialized\n\t}", "protected function removeAllRelationships($type){\n // dettach all\n $response = $this->resourceService()->reattach($this->getId(), $type, [\n []\n ]);\n // add to relationships\n $this->relationships[$type] = new LaravelCollection([]);\n // update cache\n $this->cacheSelf();\n }", "public function removeUsageRights() {}", "public function actionRevoke()\n\t{\n\t\t// We only allow deletion via POST request\n\t\tif( Yii::app()->request->isPostRequest===true )\n\t\t{\n\t\t\t$model = $this->loadModel();\n\t\t\t$childName = $this->getChildName();\n\n\t\t\tif( $childName!==null && $model->hasChild($childName)===true )\n\t\t\t\t$model->removeChild($childName);\n\n\t\t\t// if AJAX request, we should not redirect the browser\n\t\t\tif( isset($_POST['ajax'])===false )\n\t\t\t\t$this->redirect(array('authItem/permissions'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(400, Rights::t('core', 'Invalid request. Please do not repeat this request again.'));\n\t\t}\n\t}", "public function clearPartnerssRelatedByPatientId()\n {\n $this->collPartnerssRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearPartnerssRelatedByAgentId()\n {\n $this->collPartnerssRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }", "public function actionDeleteUserRestriction($id) {\n $model = UserRestriction::findOne($id);\n if ($model && $model->delete())\n return ['result' => true];\n else\n return ['result' => false];\n }", "public function clearAssignedPrayersRelatedByAgentId()\n {\n $this->collAssignedPrayersRelatedByAgentId = null; // important to set this to NULL since that means it is uninitialized\n }", "public function deleted(Remission $remission)\n {\n //\n }", "public function clearAssignedPrayersRelatedByPatientId()\n {\n $this->collAssignedPrayersRelatedByPatientId = null; // important to set this to NULL since that means it is uninitialized\n }", "public function destroy(Rental $rental)\n {\n //\n }", "abstract public function mass_remove();", "public function getRestaurantRestrictions() {\n return $this->getTable()->getRestaurantRestrictions();\n }", "public function delete() {\n// 'missionServiceUsers' => array(self::HAS_MANY, 'MissionServiceUser', 'id_service_user'),\n// //'serviceUserConditions' => array(self::MANY_MANY, 'Condition', 'tbl_service_user_condition(id_service_user, id_condition)'),\n// 'serviceUserConditions' => array(self::HAS_MANY, 'ServiceUserCondition', 'id_service_user'),\n\n\n parent::delete();\n }", "public function deleteResidence($residence) {\n\t\t\n\t\t$where = $this->quoteInto('id = ? ', $residence->id);\n $this->delete($where);\n\t}", "public function delete()\n {\n $this->abilities()->detach();\n parent::delete();\n }", "public function destroy(Request $request, $id)\n {\n $restriction = Restriction::findOrFail($id);\n\n if($restriction->delete()) {\n\n $restrictionExclusion = new RestrictionExclusion();\n $restrictionExclusion->people_id = Auth::user()->id;\n $restrictionExclusion->restriction_id = $id;\n $restrictionExclusion->description = $request->description;\n $restrictionExclusion->save();\n\n $this->addFlash('Restrição removida com sucesso!', 'success');\n } else {\n $this->addFlash('Erro ao remover restrição!', 'danger');\n }\n\n return redirect()->route('restricoes.index');\n }", "public function destroy($id) {\n $recette = Recette::find($id);\n //on supprime les relations de la recette\n $recette->ingredients()->detach();\n //peu importe si la recette fait partie d'un planning utilisateur\n $recette->plannings()->detach();\n $recette->delete();\n return redirect('recettes');\n }", "public function unlinkRelationship(RelationshipInterface $relationship)\n\t{\n\t\t$relationship->setNode();\n\t\t$relationship->setOtherNode();\n\t}", "public function unfriend() {\n $existed_relation_status = $this->get_relation_by_status(\"F\");\n if($existed_relation_status) {\n $this->delete_relation(\"F\");\n\n $relation = new UserRelation();\n $relation->set_property(\"from\", $this->to);\n $relation->set_property(\"to\", $this->from);\n\n $relation->delete_relation(\"F\");\n return true;\n }\n\n return false;\n }", "public function removeRelation(RelationInterface $relation);", "public function clearRelationCache();", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "function delete ($relationshipName)\n {\n if ($relationship = $this->get ( $relationshipName ))\n {\n $this->removeFieldsFromUndeployedLayouts ( $relationship ) ;\n unset ( $this->relationships [ $relationshipName ] ) ;\n }\n }", "public static function delete_reset_specific_ip_restrictions($restriction = FALSE)\n {\n global /* Need global database object. */ $wpdb;\n\n do_action(\"ws_plugin__s2member_before_delete_reset_specific_ip_restrictions\", get_defined_vars());\n\n $prefix /* s2Member Transient prefix for all IP Restrictions. */ = \"s2m_ipr_\";\n $transient_entries = $prefix.md5(\"s2member_ip_restrictions_\".(string)$restriction.\"_entries\");\n $transient_security_breach = $prefix.md5(\"s2member_ip_restrictions_\".(string)$restriction.\"_security_breach\");\n\n $wpdb->query(\"DELETE FROM `\".$wpdb->options.\"` WHERE `option_name` LIKE '%\".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape($transient_entries)).\"'\");\n $wpdb->query(\"DELETE FROM `\".$wpdb->options.\"` WHERE `option_name` LIKE '%\".esc_sql(c_ws_plugin__s2member_utils_strings::like_escape($transient_security_breach)).\"'\");\n\n do_action(\"ws_plugin__s2member_after_delete_reset_specific_ip_restrictions\", get_defined_vars());\n\n return apply_filters(\"ws_plugin__s2member_delete_reset_specific_ip_restrictions\", true, get_defined_vars());\n }", "public function removeRelation($name)\n\t{\n\t\tunset($this->relations[$name]);\n\t}", "public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "function del_access_grant_to_invited_group($event, $type, $object) {\n\tif ($object->relationship == 'invited') {\n\t\tremove_entity_relationship($object->guid_one, 'access_grant', $object->guid_two);\n\t}\n}", "public function clearPermissaosRelatedByCoUsuarioAlteracao()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioAlteracao = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function removeRequest($type, PosterInterface $poster, PosterInterface $parent)\n {\n app()->table('platform_invitation')\n ->delete()\n ->where('type_id=?', $type)\n ->where('poster_id=?', $poster->getId())\n ->where('parent_id=?', $parent->getId())\n ->execute();\n }", "public function revokePermissionTo($permission){\n\n $permission = collect($permission)\n ->filter(fn($permission) => $this->permissions->contains(fn($val) => $val->id === $permission || $val->name === $permission))\n ->transform(fn($permission) => Permission::findMatches(['id' => $permission, 'fields' => 'id|name']))\n ->pluck('id')\n ->unique()\n ->toArray();\n\n $this->permissions()->detach($permission);\n return $this;\n }", "public function destroy($id)\n {\n \n /* $n_room = reserve::where('id',$id)\n ->join ('room','reserve.id_room','=','room.id')\n ->first();\n\n $person= $n_room ->person;*/\n\n room::where('id',$id )\n ->update(['available' => 0, 'vacancies' => $person->person ]); \n\n\n\n\n reserve::where('id',$id)->delete();\n return redirect()->back();\n }", "public function destroy(Reviewer $reviewer)\n {\n //\n }", "public function allowRemoving()\n\t{\n\t\t$this->removable = TRUE;\n\t\treturn $this;\n\t}", "function delete(){\n // Delete subclauses\n foreach($this->subClause as $clause){\n $clause->delete();\n }\n \n mysql_query(\"DELETE FROM resolution WHERE id='$this->clauseId'\") or die(mysql_error());\n }", "public function restaurant()\n {\n return $this->belongsTo('App\\Restaurant', 'restaurant_id');\n }", "public function deleteOrganiser() {\n $this->organiser = NULL;\n }", "function liveitchina_user_relationships_ui_remove_ajax($account, $relationship) {\r\n //#382668 makes sure a valid relationship id was supplied\n if (!$relationship->rid) {\n if (isset($_GET['ajax'])) {\r\n print '';\r\n }\r\n drupal_goto();\r\n }\r\n $form = drupal_get_form('user_relationships_ui_remove', $account, $relationship);\r\n if (isset($_GET['ajax'])) {\r\n print drupal_render($form);\r\n }\r\n else {\r\n return $form;\r\n }\r\n}", "public function remove_friend()\n {\n //delete from db;\n $this->Friend_model->remove_friend_model();\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function restaurant()\n {\n return $this->belongsTo('App\\Models\\Restaurant');\n }", "public function remove() {}", "public function remove() {}", "public function dissociate()\n {\n $this->farChild->setAttribute($this->firstKey, null);\n\n return $this->farChild->setRelation($this->relation, null);\n }", "public function deleteRrule() : static\n {\n $this->rrule = null;\n return $this;\n }", "public function removalRequests()\n {\n return $this->hasMany(RemovalRequest::class);\n }", "public function removePending(Request $request)\n {\n User::removePending($request->only('friendid'));\n }", "public static function remove($id)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('restaurant_commission', 'id = ' . $id);\n }", "public function revokeAllPermissions(){\n\n $this->permissions()->detach();\n return $this;\n }", "abstract protected function doRemoveConclusion(ConclusionInterface $conclusion);", "function removePerson(){\n\t\t \n\t\t $this->getMakeMetadata();\n\t\t $changesMade = false;\n\t\t $requestParams = $this->requestParams;\n\t\t if(isset($requestParams[\"uri\"]) && isset($requestParams[\"role\"])){\n\t\t\t\t\n\t\t\t\t$personURI = $requestParams[\"uri\"];\n\t\t\t\tif($requestParams[\"role\"] == \"creator\"){\n\t\t\t\t\t $persons = $this->rawCreators;\n\t\t\t\t\t unset($persons[$personURI]);\n\t\t\t\t\t $this->rawCreators = $persons;\n\t\t\t\t\t $changesMade = true;\n\t\t\t\t}\n\t\t\t\telseif($requestParams[\"role\"] == \"contributor\"){\n\t\t\t\t\t $persons = $this->rawContributors;\n\t\t\t\t\t unset($persons[$personURI]);\n\t\t\t\t\t $this->rawContributors = $persons;\n\t\t\t\t\t $changesMade = true;\n\t\t\t\t}\n\t\t\t\telseif($requestParams[\"role\"] == \"person\"){\n\t\t\t\t\t $persons = $this->rawLinkedPersons;\n\t\t\t\t\t unset($persons[$personURI]);\n\t\t\t\t\t $this->rawLinkedPersons = $persons;\n\t\t\t\t\t $changesMade = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t if($changesMade){\n\t\t\t\t$this->saveMetadata(); //save the results\n\t\t }\n\t\t return $changesMade;\n\t }", "public function removeProduct(Product $product){\n $product->allergieëns()->detach();\n $product->delete();\n return redirect()->back();\n }", "public function forceDeleted(ReservationPayment $ReservationPayment)\n {\n //\n }", "public function action_remove(){\n $abuse = ORM::factory('BoardAbuse', $this->request->param('id'));\n if($abuse->loaded()){\n if($abuse->ad->loaded())\n $abuse->ad->delete();\n $abuse->delete();\n }\n $this->redirect('admin/boardAbuses' . URL::query());\n }", "public function testRelationshipsAreDeletedWithTheirUser(): void\n {\n $user = User::factory()->create([\n 'created_at' => now()->subYear(),\n ]);\n\n $booking = Booking::factory()->for($user)->create();\n $identifier = $user->identifiers()->create(['value' => 'test-value']);\n $subscription = $user->subscription()->create();\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n $this->assertModelMissing($booking);\n $this->assertModelMissing($identifier);\n $this->assertModelMissing($subscription);\n }", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "public function removeAllRelatedPosts() {}", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function destroy(Rezervation $rezervation)\n {\n //\n }", "public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\n }", "public function restaurateur()\n {\n return $this->belongsTo('App\\Restaurateur', 'restaurateur_id');\n }", "public function clearInterests() {\n\t\treturn parent::clearRelated();\n\t}", "public function delete(){\n\t\t$landlord= new Core_Model_Landlord( $this->dto );\n\t\tif( is_numeric( $company->id) && (int)$company->id > 0) {\n\t\t\t$company->delete( array( \"id\" => $this->dto->id) );\n\t\t\t}\n\t}", "public function testRemoveReviewer()\n {\n $user = new User;\n $user->setId('joe')->setEmail('joe')->setFullName('joe')->save();\n $user->setId('jane')->setEmail('jane')->setFullName('jane')->save();\n\n $review = new Review($this->p4);\n $review->setParticipants(array('joe', 'nonadmin', 'jane'))\n ->set('author', 'jane')\n ->save();\n\n $this->getRequest()\n ->setMethod(\\Zend\\Http\\Request::METHOD_POST)\n ->setQuery(new Parameters(array('_method' => 'delete')));\n\n $this->dispatch('/reviews/1/reviewers/nonadmin');\n\n $this->assertResponseStatusCode(200);\n\n $review = Review::fetch(1, $this->p4);\n $this->assertSame(array('joe'), $review->getReviewers());\n }", "public static function invalidate_restriction_cache($rebuild = true) {\n\t\tdelete_transient(self::$ARTICLES_CACHE_KEY);\n\t\tdelete_transient(self::$TOPICS_CACHE_KEY);\n\t}", "public function remove() {\n\n // Updates DB (data & metadata)\n $this->attributes->removeAll($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_USERS, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }", "public function destroy(Resturant $resturant)\n {\n //\n }", "public function remove() {\n\t\t$this->DispositionManager->remove();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "public function menuRestaurant() //--> funkcijos vardas menuRestaurant nieko nereiskia, pasirenkam i koki sugalvojam\n {\n return $this->belongsTo('App\\Models\\Menu', 'menu_id', 'id');\n \n }", "public function isReplaceRelationship();", "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "public function removeSpecialisation(){\n\n\t\t$user_id = Input::get('user_id');\n\t\t\n\t\t$redirectTo = ( $user_id != 0 ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n\t\t$this->adresse->removeSpecialisation(Input::get('specialisation_id'),Input::get('adresse_id'));\n\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'La spécialisation a été supprimé'));\n\n\t}", "public static function abandonRelationships( $caller, $relationship, $subsite = 0, $removeObjects = false ) {\n\t\t$relatedObjects = $caller->{$relationship}();\n\n\t\tif( $relatedObjects && $relatedObjects->exists() ) {\n\t\t\tSubsite::temporarily_set_subsite(is_object($subsite) ? $subsite->ID : $subsite);\n\n\t\t\t// something-to-many or 1-to-1 relationship?\n\t\t\t$manyRelationship = (gettype($relatedObjects) == 'ComponentSet');\n\t\t\tif( !$manyRelationship )\n\t\t\t\t$callerID = \"{$caller->ClassName}ID\";\n\n\t\t\tforeach( $relatedObjects as $object ) {\n\t\t\t\tif( $manyRelationship )\n\t\t\t\t\t$caller->{$relationship}()->remove($object);\n\t\t\t\telseif( !$removeObjects ) {\n\t\t\t\t\t$object->$callerID = NULL;\n\t\t\t\t\t$object->write();\n\t\t\t\t}\n\t\t\t\tif( $removeObjects )\n\t\t\t\t\t$object->delete();\n\t\t\t}\n\n\t\t\tSubsite::restore_previous_subsite();\n\t\t}\n\t}", "public function clearPermissionsCollection(): void\n {\n $this->permissions = null;\n }", "private function declineMeetingRequest(\\App\\Request $request)\n {\n $user = Auth::user();\n //if sender or receiver of meeting request\n if($request->users->contains($user)){\n foreach($request->invites as $invite){\n $invite->delete();\n }\n $request->delete();\n }\n }", "public function clearPolicy() : void\n {\n $this->model->clearPolicy();\n }", "function roles_dashboard_delete_relationship($event, $type, $relationship) {\n\n\tif ($relationship->relationship !== 'has_role') {\n\t\treturn;\n\t}\n\n\t$user = get_entity($relationship->guid_one);\n\t$role = get_entity($relationship->guid_two);\n\tif (!$role instanceof ElggRole || !$user instanceof ElggUser) {\n\t\treturn;\n\t}\n\n\t$ia = elgg_set_ignore_access(true);\n\n\t$dashboards = elgg_get_entities_from_relationship(array(\n\t\t'types' => 'object',\n\t\t'subtypes' => MultiDashboard::SUBTYPE,\n\t\t'owner_guid' => $user->guid,\n\t\t'relationship' => 'dashboard_for',\n\t\t'relationship_guid' => $role->guid,\n\t\t'inverse_relationship' => true,\n\t\t'limit' => 0,\n\t));\n\n\tif ($dashboards) {\n\t\tforeach ($dashboards as $dashboard) {\n\t\t\t$dashboard->delete();\n\t\t}\n\t}\n\n\telgg_set_ignore_access($ia);\n}", "public function restaurant()\n {\n return $this->belongsTo('App\\Models\\Local', 'riflocal', 'rif');\n }", "public function isModifyRelationship();", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function deleteFriend(User $user) {\n // attach the users id to friendOf\n $this->friendOf()->detach($user->id);\n //$this->friendsOfMine()->detach($user->id);\n }", "public function destroy(Religion $religion)\n {\n $religion->delete();\n Session::flash('flash_message', 'Data have been deleeted.');\n Session::flash('urgent', true);\n return redirect('religion');\n }", "public function delete()\n {\n if($this->contactable!=null)\n {\n $this->contactable->delete(); \n }else\n {\n parent::delete(); \n } \n }", "public function clearArticleHasIngredients()\n {\n $this->collArticleHasIngredients = null; // important to set this to NULL since that means it is uninitialized\n }", "public function reservations()\n {\n return $this->hasMany('App\\Reservation', 'restaurant_id');\n }", "public function removeAssignments()\n {\n return Yii::$app->authManager->revokeAll($this->user->id);\n }", "public function clearPermissaosRelatedByCoUsuarioCadastro()\n\t{\n\t\t$this->collPermissaosRelatedByCoUsuarioCadastro = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function destroy(Restaurant $restaurant, Request $request)\n {\n $restaurant->delete();\n return redirect()->route('restaurant.index', ['menu_id'=> $request->input('menu_id')]);\n }" ]
[ "0.64327925", "0.57864064", "0.56470966", "0.5631549", "0.56004405", "0.55966175", "0.5472318", "0.54350007", "0.5413572", "0.5368477", "0.53367895", "0.5331748", "0.53108424", "0.5308024", "0.5305767", "0.5303304", "0.5297125", "0.52759314", "0.5268652", "0.52540505", "0.5251384", "0.5243506", "0.5228632", "0.52110076", "0.5172141", "0.51657724", "0.5155019", "0.5146287", "0.51454544", "0.5131379", "0.5125338", "0.51209056", "0.5120246", "0.5116488", "0.51115656", "0.50973225", "0.5093534", "0.5090085", "0.5050334", "0.5036784", "0.5033353", "0.50331646", "0.50251985", "0.5010227", "0.5002768", "0.50004244", "0.50004244", "0.50004244", "0.50004244", "0.49993777", "0.49934968", "0.4992188", "0.4987543", "0.4987523", "0.49848148", "0.49729064", "0.496143", "0.49612394", "0.494462", "0.49395323", "0.49339163", "0.49302948", "0.49291685", "0.49212655", "0.49201313", "0.49135426", "0.4910722", "0.4910722", "0.4910722", "0.49100262", "0.49082485", "0.49000642", "0.4892303", "0.48897785", "0.48885238", "0.48775533", "0.48642537", "0.48627988", "0.4860767", "0.48596445", "0.48547646", "0.48487648", "0.48436633", "0.48335975", "0.4831952", "0.48291692", "0.48228186", "0.48225176", "0.48211622", "0.4814962", "0.48133093", "0.47992983", "0.47968882", "0.47939518", "0.4791817", "0.47898784", "0.47888628", "0.4788546", "0.47875693", "0.47873583" ]
0.60813874
1
returns count of orders of the company's employees
public function getOrdersCount() { return $this->getTable()->getOrdersCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countEmployee(){\n\t\t\t\t\t return count($this->listeEmployee());\n\t\t\t\t\t }", "public function getEmployeesCount() {\n return $this->getTable()->getEmployeesCount();\n }", "public function countCompanyContacts()\n {\n \n $db = $this->getDb();\n \n $sql = <<<SQL\nSELECT\n count(contact.rowid) as number\nFROM\n core_contact_r contact\nJOIN core_person_r person\n ON contact.id_person = person.rowid\nWHERE person.type = 2;\nSQL;\n \n return $db->select($sql)->getField('number');\n \n }", "public function getCompanyCount($filter){\n $regulatorToCompanyModel = new Model_Jiafuyun_RegulatorToCustomer();\n $count = $regulatorToCompanyModel->getCount($filter);\n return $count;\n }", "public function getUserOrderCounts() {\n\n $this->load->model('account/order');\n $count = $this->model_account_order->getTotalOrders();\n\n return $count;\n }", "function get_all_empresas_count()\n {\n $this->db->from('empresas');\n return $this->db->count_all_results();\n }", "public function countOrder(): int;", "public function getOrderCount()\n {\n return $this->count(self::order);\n }", "static function customerCount( )\n {\n $db = eZDB::instance();\n $countArray = $db->arrayQuery( \"SELECT count( DISTINCT email) AS count FROM ezorder WHERE is_temporary='0'\" );\n return $countArray[0]['count'];\n }", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "protected function getOrderCount()\n {\n $customer = $this->customerSession->getCustomer();\n if($customer->getId())\n {\n $orders = $this->orderCollectionFactory->create()->addFieldToSelect(\n '*'\n )->addFieldToFilter(\n 'customer_id',\n $customer->getId()\n )->setOrder(\n 'created_at',\n 'desc'\n );\n return count($orders);\n }\n return 0;\n }", "public function getOrdersCount() {\n\t\t$summary = $this->getMarketSummary();\n\n\t\treturn [ 'BUY' => $summary['OpenBuyOrders'], 'SELL' => $summary['OpenSellOrders'] ];\n\n\t}", "public static function employees(Company $company): array\n {\n // number of employees in total\n $totalNumberOfEmployees = $company->employees()->notLocked()->count();\n\n // 10 random employees\n $tenRandomEmployeesCollection = collect([]);\n $allEmployees = $company->employees()\n ->notLocked()\n ->with('picture')\n ->inRandomOrder()\n ->take(10)\n ->get();\n\n foreach ($allEmployees as $employee) {\n $tenRandomEmployeesCollection->push([\n 'id' => $employee->id,\n 'name' => $employee->name,\n 'avatar' => ImageHelper::getAvatar($employee, 32),\n 'url' => route('employees.show', [\n 'company' => $company,\n 'employee' => $employee,\n ]),\n ]);\n }\n\n // ten random employees\n\n // number of employees hired in the current year\n $employeesHiredInTheCurrentYear = $company->employees()\n ->notLocked()\n ->whereYear('hired_at', (string) Carbon::now()->year)\n ->count();\n\n return [\n 'employees_hired_in_the_current_year' => $employeesHiredInTheCurrentYear,\n 'ten_random_employees' => $tenRandomEmployeesCollection,\n 'number_of_employees_left' => $totalNumberOfEmployees - $tenRandomEmployeesCollection->count(),\n 'view_all_url' => route('employees.index', [\n 'company' => $company,\n ]),\n ];\n }", "function getNrEmployeesBranch($username){\n\n global $db;\n\n $stmt=$db->prepare('SELECT count(*) as nrEmployees from employee\n WHERE employee_branch_id=(\n SELECT client_branch\n FROM client\n JOIN\n (\n SELECT client_id AS client\n FROM person\n JOIN\n client ON client_id = person_id\n WHERE username = ?\n )\n ON client_id = client)');\n \n $stmt->execute(array($username));\n return $stmt->fetch();\n }", "public function getOrderIdCount()\n {\n return $this->count(self::order_id);\n }", "public function getCompanyEmployees();", "public function getAllDataEmployees(){\n\t\t\t$this->db->select('*')->from('tbl_employees');\n\t\t\treturn $this->db->count_all_results();\n\t\t}", "public function countByEmpID($emp_id){\n return $this->count('emp_id=:emp_id', array(':emp_id' => $emp_id));\n }", "function invoices_count()\n {\n $this->company_db->from('tbl_invoice_header');\n return $this->company_db->count_all_results();\n }", "public function count_items() {\n\t\treturn SalesHistoryDetailQuery::create()->filterByOrdernumber($this->oehhnbr)->count();\n\t}", "public function countEntities(): int;", "public function countWorkOrdersByEmployee($employeeIOID, $start = '', $end = '')\n\t{\n\t\t$where = '';\n\t\tif($start && $end)\n\t\t{\n\t\t\t$where .= sprintf('AND \n\t\t\t\tpbt.NgayBatDau >= %1$s\n\t\t\t\tAND \n\t\t\t\t(ifnull(pbt.Ngay, \\'\\') = \\'\\' OR pbt.Ngay <= %2$s)'\n\t\t\t, $this->_o_DB->quote($start)\n\t\t\t, $this->_o_DB->quote($end));\n\t\t}\n\t\t\n\t\t$sql = sprintf('\n\t\t\tSELECT count(1) AS TotalWorkOrders\n\t\t\tFROM OPhieuBaoTri AS pbt\n\t\t\tINNER JOIN qsiforms AS f ON pbt.IFID_M759 = f.IFID\n\t\t\tWHERE \n\t\t\t\tpbt.Ref_NguoiThucHien = %1$d\n\t\t\t\tAND ifnull(f.Status, 1) < 3\n\t\t\t\t%2$s'\n\t\t, $employeeIOID, $where\n\t\t);\n\t\t\n\t\t$dataSql = $this->_o_DB->fetchOne($sql);\n\t\treturn $dataSql?(int)$dataSql->TotalWorkOrders:0;\n\t}", "function count_all(){\n\t $this->db->count_all($this->tbl_Employeeinfo);\n\t \n return $this->db->count_all($this->tbl_Employeeinfo);\n }", "function getCompanyCount($connection)\n{\n $companyCountQuery = \"SELECT COUNT(company_ID) as companyCount FROM company\";\n $companyCount = $connection->query($companyCountQuery);\n $comCount = $companyCount->fetch_assoc();\n echo $comCount['companyCount'];\n}", "public function getNumOfOrdersInBasket() {\n\n $basketUser = $this->getBasketUserFromAuth();\n\n $result = 0;\n if ($basketUser != null) {\n $basketDetailModel = new Application_Model_BasketDetail();\n\n\n $result = $basketDetailModel->getNumOfOrdersInBasket($basketUser);\n }\n\n return $result;\n }", "function getEmpCount(){\n\t\t$con = connect();\t\t\n\t\t$sql = \"SELECT count(*) FROM employee\"; //count emp from view\n\t\t$stmt = $con->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchColumn();\n\t\techo $result;\n\t}", "public function employees() \r\n\t{\r\n\t\t$query = \"SELECT count(id_radnik) as Zaposlenih FROM \" . $this->table;\r\n\r\n\t\t$stmt = $this->conn->prepare($query);\r\n\t\t$stmt->execute();\r\n\r\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\t\t$zaposlenih = $row['Zaposlenih'];\r\n\t\treturn $zaposlenih;\r\n\t}", "public static function get_nb_orders(){\n $return = array();\n $sql = \"SELECT count(mo.id)\n FROM miki_person mp, miki_order mo\n WHERE mp.id = mo.id_person\";\n $result = mysql_query($sql);\n\n $row = mysql_fetch_array($result);\n return $row[0];\n }", "public function getOrderTrackingCount()\n {\n return $this->count(self::order_tracking);\n }", "public function findCount()\n {\n return $this->getEntityManager()\n ->createQuery(\"SELECT t.number, COUNT(f.id) as cnt\n FROM GazMainBundle:Finance f\n LEFT JOIN f.terminal t\n LEFT JOIN f.clientSale cs\n\t\t\t\t\t\t\tLEFT JOIN f.clientBuy cb\n\t\t\t\t\t\t\tWHERE f.financeType = FALSE\n\t\t\t\t\t\t\tGROUP BY t.number\n\t\t\t\t\t\t\tORDER BY t.number ASC\n \")\n ->getResult();\n }", "public function getUserCount($name, $companyId = null)\n {\n }", "public function getOrdersCount ( \\Maven\\Core\\Domain\\OrderFilter $filter ) {\n\t\t//\tthrow new \\Maven\\Exceptions\\MissingParameterException( \"Plugin Key is required\" );\n\n\t\treturn $this->mapper->getOrdersCount( $filter );\n\t}", "public function count()\r\n\t{\r\n\t\t$countModel = clone $this->model;\r\n\t\t$countQuery = $countModel->getQuery();\r\n\t\t$countQuery->orders = null;\r\n\t\t$countModel->setQuery($countQuery);\r\n\r\n\t\treturn $countModel->count();\r\n\t}", "public function get_count_company_invoice_foreigner() {\n $invoice_id = $this->input->post('invoice');\n $subsidy = $this->input->post('subsidy');\n \n $result = $this->classtraineemodel->get_company_invoice_foreigner($invoice_id);\n \n echo count($result);\n }", "function assign_subordinate_count($employee) {\n\t$count = 0;\n\t//Get subordinate employees of current employee\n\t$employees = $employee->getSubordinates();\n\t//Add to count\n\t$count += count($employees);\n\t//Recursively add all subordinate employees number of employees to current employees count\n\tforeach($employees AS $emp) {\n\t\t$count += assign_subordinate_count($emp);\n\t}\n\t//Update number of subordinate employees for this employee\n\t$employee->setNumSubordinates($count);\n\t//Destroy the subordinates attribute so returned data will be flat array/chop off multidimensional array\n\t$employee->destroySubordinates();\n\treturn $count;\n}", "public function count() {\n\t\treturn $this->field('Cart.order_item_count', $this->cartConditions());\n\t}", "function exeGetTotalEmp() { \n $exeGetTotalEmp = $this->db->query(\"SELECT *\n FROM employees\n WHERE status = 1\n ORDER BY firstname ASC, lastname ASC\");\n \n return $exeGetTotalEmp->num_rows(); \n }", "public function getNumberOfEmployees(): ?int;", "public function getTotalOrdersAm()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getTotalOrdersMo()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(oc_po_product.id) as total_orders FROM oc_po_order \nLEFT JOIN oc_po_product \nON(oc_po_order.id = oc_po_product.order_id)\nWHERE oc_po_order.user_id='103' AND oc_po_product.item_status <> 0\");\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function getTotalOrdersWs()\n\t{\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as total_orders FROM oc_po_order WHERE delete_bit = \" . 1);\n\t\t$results = $query->row;\n\t\treturn $results['total_orders'];\n\t}", "public function orderCount($days)\n {\n \n switch ($days) {\n \n case \"today\":\n //get Todays Date\n $fromDate = Mage::helper('magemobapp')->getTodaysDate();\n break;\n case \"lastWeek\":\n //get 1 week Back date\n $fromDate = Mage::helper('magemobapp')->getLastWeekDate();\n break;\n case \"lastMonth\":\n //get 1 month Back date\n $fromDate = Mage::helper('magemobapp')->getMonthBackDate();\n break;\n default:\n //get reporting date\n $fromDate = Mage::helper('magemobapp')->getReportingDate();\n \n }\n \n $storeInfo = Mage::getModel('magemobapp/storeinfo');\n // store id\n $storeId = $storeInfo->getStoreId();\n // store id array\n $storeIds = $storeInfo->getStoreIds($storeId);\n\n $orderCollection = Mage::getModel('sales/order')->getCollection();\n\n if (isset($storeId) && $storeId != '') {\n $orderCollection->addAttributeToFilter('store_id', array(\n 'in' => $storeIds,\n ));\n \n }\n \n $orderCollection->addAttributeToFilter('created_at', array(\n 'from' => $fromDate\n ));\n $orderCount = $orderCollection->count(); //orders count\n \n return $orderCount;\n }", "private function _countPurchaseOrders()\n {\n $data = [];\n for ($i = 1; $i < 13; $i++) {\n $data[$i] = Purchase::whereYear('created_at', Date('Y'))\n ->whereMonth('created_at', (string) $i)\n ->count('id');\n }\n return implode(', ', $data);\n }", "public function testCustomersAndTheirOrderCounts() {\n // filter criteria\n $filter = array(\"page\" => 1, \"limit\" => 15);\n // get the customer order data\n $customerArray = $this->customerOrderService->getCustomersAndTheirOrderCounts($filter);\n // assert that 15 customers are returned based on the limit specified in filter.\n $this->assertTrue(sizeof($customerArray) == $filter['limit']);\n }", "public function countBy($criteria);", "public function all_ActiveOrdersCount_get() {\n $result = $this->feeds_model->all_ActiveOrdersCount();\n return $this->response($result);\n }", "function get_entradas_boni_list_count($ubicacion)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select count(distinct(e.pr_facturas_id)) as total from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.espacios_fisicos_id=$ubicacion and e.estatus_general_id=1 and ctipo_entrada=9\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows == 1){\n\t\t\treturn $u->total;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "private function _countOrders($year, $month)\n {\n return Purchase::whereYear('created_at', $year)\n ->whereMonth('created_at', $month)\n ->get();\n }", "function record_count_posdelivery_filer($company,$location,$grade,$salary,$posstatus,$consul,$focus,$closure)\n\t{\n\t\t $sql = \"SELECT COUNT(pof.pof_id) As cnt FROM pof LEFT JOIN pof_candidates ON pof.pof_id=pof_candidates.pofid LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN pof_cons ON pof.pof_id=pof_cons.pos_id WHERE pof.is_allocated='1' AND pof.not_pursue='0' AND pof.jobtitle LIKE '%\".$jobtitle.\"%' AND synonym.parentname LIKE '%\".$company.\"%' AND pof.pos_status LIKE '%\".$posstatus.\"%' AND pof_cons.consuls LIKE '%\".$consul.\"%' GROUP BY pof.pof_id\";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t}", "public function listarCount($id_empleador, $WHERE) {\n $query = \"\n SELECT\n count(*) as counteo\n FROM prestamos \n WHERE id_empleador = ?\n -- AND estado = 1\n $WHERE\n \";\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $id_empleador);\n $stm->execute();\n $lista = $stm->fetchAll();\n $stm = null;\n return $lista[0]['counteo'];\n }", "function get_entradas_general_list_count()\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select count(distinct(e.pr_facturas_id)) as total from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.estatus_general_id=1 and ctipo_entrada=1\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows == 1){\n\t\t\treturn $u->total;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM aluno '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "public function countContractors()\n\t{\n\t\t$farmer = \"select id from users_roles where name = 'Contractor' \";\n\t\t$f = DB::query($farmer)->execute()->as_array();\n\t\t$f_id = @$f[0]['id']; \n\t\t\n\t\t//got it, lets proceed\n\t\tif(!is_null($f_id)){\n\t\t\t\n\t\t\t//lets count number of users subscribed to the contractor role\n\t\t\t$pple = \"select count(distinct(user_id)) as tmpvar from users_user_roles\nwhere role_id = $f_id \";\n\n\t\t\t$tmp \t= DB::query($pple)->execute()->as_array();\n\t\t\t$fcount = @$tmp[0]['tmpvar'];\n\t\t\treturn $fcount;\n\t\t}\n\t\treturn 0;\n\t\n\t\t\n\t}", "public function getDepartmentsCount(): int\n {\n list($filters, $bindings) = $this->createFilters('dep');\n\n return DB::selectOne(\n \"SELECT \n count(*) as count \n FROM $this->table dep WHERE 1 $filters\",\n $bindings\n )->count ?? 0;\n }", "public function countEnderecos(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collEnderecos || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collEnderecos) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\t$query = EnderecoQuery::create(null, $criteria);\n\t\t\t\tif($distinct) {\n\t\t\t\t\t$query->distinct();\n\t\t\t\t}\n\t\t\t\treturn $query\n\t\t\t\t\t->filterByCidade($this)\n\t\t\t\t\t->count($con);\n\t\t\t}\n\t\t} else {\n\t\t\treturn count($this->collEnderecos);\n\t\t}\n\t}", "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}", "public function getEquipmentCountForCompany($companyID)\n {\n $query = \"SELECT count(equipment_id) as count \" .\n \"FROM \" . TB_EQUIPMENT . \" WHERE department_id IN \" .\n \"(SELECT d.department_id \" .\n \"FROM \" . TB_DEPARTMENT . \" d , \" . TB_FACILITY . \" f \" .\n \"WHERE f.company_id = '$companyID' \" .\n \"AND f.facility_id = d.facility_id ) \" .\n \" LIMIT 1\";\n $this->db->query($query);\n return $this->db->fetch(0)->count;\n }", "public function emailCounts($email);", "function CountCustomerEmail($argWhere = '')\n {\n $arrNum = $this->getNumRows(TABLE_CUSTOMER, 'CustomerEmail', $argWhere);\n return $arrNum;\n }", "public function getJobsCount()\n {\n }", "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM grupo_usuario_tabelas '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "public function countEtablissements($criteria = null, $distinct = false, PropelPDO $con = null)\n {\n if (null === $this->collEtablissements || null !== $criteria) {\n if ($this->isNew() && null === $this->collEtablissements) {\n return 0;\n } else {\n $query = EtablissementQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByEvent($this)\n ->count($con);\n }\n } else {\n return count($this->collEtablissements);\n }\n }", "public function filteredDataEmployees(){\n\t\t\t$this->ajaxEmployeeList();\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->num_rows();\n\t\t}", "public function count()\n {\n return count($this->entities);\n }", "public function count()\n {\n return count($this->entities);\n }", "function get_entradas_boni_gral_list_count($ubicacion)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select count(distinct(e.pr_facturas_id)) as total from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.estatus_general_id=1 and ctipo_entrada=9\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows == 1){\n\t\t\treturn $u->total;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getCentresCount()\n {\n return $this->manager->createQuery('SELECT COUNT(c) FROM App\\Entity\\CentreEtatCivil c')\n ->getSingleScalarResult();\n }", "function vcn_get_career_count() {\t\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry(), 'ignoreworktype' => 'Y'), 'json');\r\n\treturn count($data);\r\n}", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "private function get_num_total_orders()\n\t{\n\t\treturn wp_count_posts('order_paysera')->publish;\n\t}", "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM compra_coletiva '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "function erp_hr_count_departments() {\n\n return \\WeDevs\\ERP\\HRM\\Models\\Department::count();\n}", "public function display_order_to_deliver_count(){\n $getOrderToDeliverCount = Order::join('order_invoice', ['orders.invoice_id' => 'order_invoice.id'])\n ->where('is_approved',1)\n ->where('delivery_date', '=', date('Y-m-d'))\n ->groupBy('orders.invoice_id') \n ->get()\n ->count();\n\n return response()->json([\n 'count' => $getOrderToDeliverCount,\n 'status' => 200\n ]);\n }", "function Company_Count($doName, $siName){\n// from MV_LIST AS ML\n// LEFT JOIN MV_LIST_OTHER_INFO ON ML.MV_LIST_ID = MV_LIST_OTHER_INFO.MV_LIST_ID\n// LEFT OUTER JOIN\n// (SELECT MV_REGI_FK_LIST, MV_REGI_CHOOSE FROM MV_REGI WHERE (MV_REGI_CHOOSE = 0 or MV_REGI_CHOOSE = 1) GROUP BY MV_REGI_FK_LIST) AS T\n// ON T.MV_REGI_FK_LIST = ML.MV_LIST_ID\n// WHERE ML.USEYN = 'Y' AND ML.MV_LIST_SI_NAME='\".$doName.\"' AND ML.MV_LIST_GU_NAME='\".$siName.\"'\n// AND T.MV_REGI_FK_LIST IS NOT NULL ;\";\n\n $query = \"SELECT COUNT(1) AS COUNT\nfrom (\nselect ML.MV_LIST_ID from MV_LIST AS ML\nLEFT OUTER JOIN MV_REGI AS MR ON ML.MV_LIST_ID = MR.MV_REGI_FK_LIST\nWHERE MR.MV_REGI_DO = '\".$doName.\"'\nAND MR.MV_REGI_SI = '\".$siName.\"'\nAND MR.MV_REGI_CHOOSE < 4\nAND ML.USEYN = 'Y'\nAND ( ML.MV_LIST_TYPE = 0 OR ML.MV_LIST_TYPE = 1 OR ML.MV_LIST_TYPE = 3 )\nGROUP BY ML.MV_LIST_ID\nORDER BY ML.MV_LIST_NAME ) AS T;\";\n\n $query = DB::select( DB::raw( $query ) );\n\n if(count($query)){\n $count = $query[0]->COUNT;\n\n return $count;\n }\n }", "public function count_post()\n{\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n\n // if(isset($data['company_id']))\n // {\n // $id = $data['company_id'];\n // }\n\n $totalCustomer = $this->model->getcount('users', array(\n 'user_role' => '2'));\n $todayOrders = $this->model->getcount('orders', array(\n 'DATE(created_at)' => date('Y-m-d')));\n $order_list = $this->model->GetJoinRecord('orders', 'user_id', 'users', 'id', 'COUNT(orders.id) as total_orders',array('orders.id!='=>'0'));\n\n $totalOrders = !empty($order_list) ? $order_list[0]->total_orders : 0;\n $pending_order = $this->model->getcount('orders',array('status='=>'placed'));\n $delivered_order = $this->model->getcount('orders',array('status='=>'delivered'));\n $cancel_order = $this->model->getcount('orders',array('status='=>'Cancel'));\n $processing_order = $this->model->getcount('orders',array('status='=>'Progress'));\n $dispatch_order = $this->model->getcount('orders',array('status='=>'Dispatched'));\n \n $resp = array(\n 'rccode' => 200,\n 'message' =>'success',\n 'total_customer' =>$totalCustomer,\n 'today_order' =>$todayOrders,\n 'total_order' => $totalOrders,\n 'pending_order' => $pending_order,\n 'delivered' =>$delivered_order,\n 'Cancel' => $cancel_order,\n 'Packing' => $processing_order,\n 'shipping' => $dispatch_order\n );\n$this->response($resp);\n}", "public function display_order_to_approve_count_for_client(){\n // if(env(\"DB_CONNECTION\") == \"pgsql\"){\n // $getOrderToApproveCount = DB::select('SELECT COUNT(*) as data FROM orders WHERE is_approved = \"0\" AND client_id = \"'.Auth::user()->id.'\" ');\n // }else{\n // $getOrderToApproveCount = DB::select('SELECT COUNT(*) as data FROM orders WHERE is_approved = 0 AND client_id = \"'.Auth::user()->id.'\" ');\n // }\n\n $getOrderToApproveCount = Order::join('order_invoice', ['orders.invoice_id' => 'order_invoice.id'])\n ->where('is_approved',0)\n ->where('client_id', Auth::user()->id)\n ->groupBy('orders.invoice_id') \n ->get()\n ->count();\n \n return response()->json([\n 'count' => $getOrderToApproveCount,\n 'status' => 200\n ]);\n }", "function get_entradas_contabilidad_sin_list_count($estatus)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select count(distinct(e.pr_facturas_id)) as total from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.estatus_general_id=1 and ctipo_entrada=1\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows == 1){\n\t\t\treturn $u->total;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getCount()\n {\n if (null === $this->count) {\n $qb = clone $this->getQueryBuilder();\n $query = $qb->addSelect('count(e.id) as total_count');\n $result = $query->getQuery()->execute();\n $this->count = $result[0]['total_count'];\n }\n return $this->count;\n }", "public function totalCount();", "public function totalCount();", "public function countEm()\n {\n $qb = $this->createQueryBuilder('g');\n $qb->select('count(g.id) AS counter');\n $query = $qb->getQuery();\n return $query->getSingleScalarResult();\n }", "public function qtdTotalChamadosAbertosCustomer() {\n $tickets = Yii::app()->dbFRAPORT->createCommand()\n ->select(\"COUNT(t.id) as qtd \")\n ->from(\"ticket AS t \")\n ->join(\"ticket_history AS th\", \"t.id = th.ticket_id \")\n ->where(\"t.create_time BETWEEN :dtIni and :dtFim AND history_type_id = 1 AND th.queue_id = 1 AND (th.state_id = 1 OR th.state_id = 4) \"\n , array(':dtIni' => FksFormatter::StrToDate($this->dtInicio),\n ':dtFim' => FksFormatter::StrToDate($this->dtTermino),\n ))\n ->queryAll();\n return $tickets[0]['qtd'];\n }", "public function count()\n\t{\n\t\t// Get a \"count all\" query\n $db = $this->getDbo();\n\n $query = $this->buildQuery(true);\n\n $query->clear('select')->clear('order')->select('COUNT(*)');\n\n\t\t// Run the \"before build query\" hook and behaviours\n $this->triggerEvent('onBuildCountQuery', array(&$query));\n\n $total = $db->setQuery($query)->loadResult();\n\n\t\treturn $this->count = $total;\n\t}", "public function count(){\n return count($this->accounts);\n }", "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM ano_letivo '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM negociacao_contas '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "public function display_order_to_approve_count(){\n // if(env(\"DB_CONNECTION\") == \"pgsql\"){\n // $getOrderToApproveCount = DB::select(\"SELECT COUNT(*) as data FROM orders WHERE is_approved = '0'\");\n // }else{\n // $getOrderToApproveCount = DB::select('SELECT COUNT(*) as data FROM orders WHERE is_approved = 0');\n // }\n \n // return response()->json([\n // 'count' => $getOrderToApproveCount[0],\n // 'status' => 200\n // ]);\n $getOrderToApproveCount = Order::join('order_invoice', ['orders.invoice_id' => 'order_invoice.id'])\n ->where('is_approved',0)\n ->groupBy('orders.invoice_id') \n ->get()\n ->count();\n\n return response()->json([\n 'count' => $getOrderToApproveCount,\n 'status' => 200\n ]);\n }", "private static function ordersFrequencyQuery( $companyId ): string\n {\n return 'select count(*) as charge_count, chargers.location, chargers.code from chargers '\n .'left join charger_connector_types on charger_connector_types.charger_id = chargers.id '\n .'left join orders on orders.charger_connector_type_id = charger_connector_types.id '\n .'where chargers.company_id = ' . $companyId . ' '\n .'group by chargers.code, chargers.location order by charge_count desc limit 10';\n }", "public function serviceCount(){\n $this->getDataAccessObject()->daoCount();\n }", "function ProjetosRealizadosCliente($empresa = null) {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos WHERE id_projetos_empresas_id = {$empresa}\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd2 = 1;\n }else{\n $qtd2 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd2);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "public function f_get_hod_comp($emp_cd){\n\n $sql = $this->db->query(\"select count(*) lv_comp_count \n from td_comp_apply \n where recommendation_status = 0\n and emp_code in (select managed_emp\n from md_manager\n where manage_by = '$emp_cd')\");\n return $sql->row();\n }", "public function GetSaldoTotalClientes()\n {\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Cliente c');\n \t\n \t$cli\t=\t$q->execute();\n \t$total = 0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \t\n \treturn $total;\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}", "public function qtdTotalChamadosAbertosAgenteProcesso() {\n $tickets = Yii::app()->dbFRAPORT->createCommand()\n ->select(\"COUNT(t.id) as qtd \")\n ->from(\"ticket AS t \")\n ->join(\"ticket_history AS th\", \"t.id = th.ticket_id \")\n ->where(\"t.create_time BETWEEN :dtIni and :dtFim AND history_type_id = 1 AND th.queue_id = 23 AND th.state_id = 4\"\n , array(':dtIni' => FksFormatter::StrToDate($this->dtInicio),\n ':dtFim' => FksFormatter::StrToDate($this->dtTermino),\n ))\n ->queryAll();\n return $tickets[0]['qtd'];\n }", "public function getCountEnviado() \n\t{\n\t\t$query = \"SELECT COUNT(enviado) as Enviado FROM mensagem WHERE email_origem = :email_origem AND enviado = 1\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue(':email_origem', $this->__get('email_origem'));\n\t\t$stmt->execute();\n\t\treturn $stmt->fetch(\\PDO::FETCH_ASSOC);\n\t}", "public function verCantidadEmpresas()\n {\n $query = \"SELECT COUNT(*) as cantidad_empresa FROM empresa\";\n $stmt = $this->conexion->prepare($query);\n if (!$stmt->execute()) {\n $stmt->closeCursor();\n return 0;\n } else {\n $cantidad = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $cantidad;\n }\n }", "public function record_count() {\r\n return $this->db->count_all(\"administradores\");\r\n }" ]
[ "0.6851074", "0.68161017", "0.65668994", "0.653747", "0.63619584", "0.624123", "0.6234315", "0.6188292", "0.6108969", "0.60911006", "0.60602534", "0.6058136", "0.60307544", "0.60292596", "0.60176474", "0.600572", "0.5969853", "0.5951251", "0.5941757", "0.587485", "0.587299", "0.5856575", "0.58541775", "0.58168685", "0.58029693", "0.57916975", "0.5787453", "0.57786506", "0.5752184", "0.57423943", "0.5742241", "0.57410467", "0.5738009", "0.5735133", "0.57301164", "0.572127", "0.571296", "0.57059515", "0.5698325", "0.56571156", "0.5656901", "0.5593909", "0.55875254", "0.55743104", "0.5550043", "0.55299044", "0.5523931", "0.5515444", "0.5509523", "0.54912645", "0.5484504", "0.54720926", "0.54651135", "0.5464611", "0.5462951", "0.54415345", "0.54402006", "0.54389524", "0.5434612", "0.54342407", "0.54317635", "0.54210633", "0.5420435", "0.5409914", "0.5409914", "0.54000807", "0.5394981", "0.53847754", "0.5368217", "0.5368217", "0.5368217", "0.53673154", "0.5363239", "0.53604096", "0.53591216", "0.5351404", "0.534971", "0.5339627", "0.5338044", "0.5329409", "0.5326605", "0.5326605", "0.5318227", "0.53128225", "0.5311985", "0.5304972", "0.53038603", "0.52949864", "0.52847433", "0.52817947", "0.52621883", "0.5257583", "0.5256308", "0.5251385", "0.5248209", "0.5247979", "0.5245421", "0.52428436", "0.52421904", "0.52296376" ]
0.62171054
7
create html for tree ( recursive )
private function _traverse($elems) { $html = ""; foreach ($elems as $elem) { $html .= "<li>" . $elem->getName(); if ($elem->getBilling() == 0) { $html .= $this->_appendDepartmentOptions($elem); } else { $html .= "( " . $elem->getIdentNr() . " )"; } if ($elem->hasChilds()) { $html .= "<ul>"; $html .= $this->_traverse($elem->getChilds()); $html .= "</ul>"; } $html . "</li>"; } return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "private function createTree() {\n\t\t$html = $this->getSpec();\n\t\t$html .= '<div class=\"tal_clear\"></div>';\n\t\t$html .= $this->getSkills();\n\n\t\treturn $html;\n\t}", "function renderTree($arvore) {\n $lastLevel = 0;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore->fetchTree() as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "public function build()\n {\n\n if ($this->html)\n return $this->html;\n\n if (count($this->data) == 0) {\n $this->html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n $this->html .= '</ul>'.NL;\n\n return $this->html;\n }\n\n $html = '';\n\n $html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n\n\n foreach ($this->data as $id => $row) {\n\n $entry = $this->buildTreeNode($row);\n\n $html .= <<<HTML\n<li id=\"{$this->id}_{$id}\" >\n\n {$entry}\n <ul id=\"{$this->id}_{$id}_tree\" ></ul>\n\n</li>\n\nHTML;\n\n\n }\n\n $html .= '</ul>'.NL;\n\n\n $this->html = $html;\n\n return $this->html;\n\n }", "public function generateTreeHtml()\n {\n $htmlWriter = new Writer();\n\n return $htmlWriter->render( $this->mapRedisSchema(), $this->getNamespaceSeparator() );\n }", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$c = count($this->children);\n\n\t\tif ($this->link)\n\t\t{\n\t\t\t$title = \"<a href='{$this->link}' target='{$this->target}'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = \"<a href='#' onclick='\";\n\t\t\t\n\t\t\tif ($_activeTree->onSelect)\n\t\t\t{\n\t\t\t\t$title .= \"{$_activeTree->onSelect}(\\\"{$this->value}\\\");\";\n\t\t\t}\n\t\t\t\n\t\t\t$title .= \"; return false'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\t\n\t\tif ($c == 0 && !$this->onDemand)\n\t\t{\n\t\t\t// Leaf node\n\t\t\techo \"<div class='{$this->leafStyle}'>\";\n\n\t\t\tif (isset($this->value) && $this->value !== \"\" && $_activeTree->selectMode != 'navigation')\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\"<? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n\t\t\n\t\t\techo \"$title</div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->open)\n\t\t\t{\n\t\t\t\t$style = $this->openStyle;\n\t\t\t\t$display = \"block\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$style = $this->closedStyle;\n\t\t\t\t$display = \"none\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($this->onDemand)\n\t\t\t{\n\t\t\t\t$cmd = \"Tree.loadOnDemand('{$this->id}', '{$this->onDemand}');\";\n\t\t\t\t\n\t\t\t\tif ($this->open)\n\t\t\t\t{\n?>\n<script type=\"text/javascript\">\n\twindow.addEvent('domready', function() {Tree.loadOnDemand('<?echo $this->id?>', '<?echo $this->onDemand?>');});\n</script>\n<?\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t$cmd .= \"Tree.toggleFolder('{$this->id}', '{$this->openStyle}', '{$this->closedStyle}');\";\n?>\n\t\t<div id='<?echo $this->id?>' class='<?echo $style?>' onclick=\"<?echo $cmd ?>\">\n<?\n\t\t\tif (isset($this->value) && $this->value !== \"\")\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\" <? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n?>\n\t\t<?echo $title?></div>\n\t\t<div id='<?echo $this->id?>_contents' style='padding-left: <?echo $_activeTree->indent ?>; display: <? echo $display?>'>\n\t\t\t\n<?\t\t\t\n\t\t\tfor($i = 0; $i < $c; ++$i)\n\t\t\t{\n\t\t\t\t$this->children[$i]->writeHTML();\n\t\t\t}\n?>\n\t\t</div>\n<?\n\t\t}\n\t}", "function renderTreeOrgaos($arvore) {\n $lastLevel = 1;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "public function renderTree()\n {\n $structure = $this->_module->treeStructure + $this->_module->dataStructure;\n extract($structure);\n $nodeDepth = $currDepth = $counter = 0;\n $jsSelect = '$('.$this->id.').treeview(\"collapseAll\");';\n $out = Html::beginTag('ul', ['class' => 'kv-tree']) . \"\\n\";\n foreach ($this->_nodes as $node) {\n /**\n * @var Tree $node\n */\n if (!$this->isAdmin && !$node->isVisible() || !$this->showInactive && !$node->isActive()) {\n continue;\n }\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeDepth = $node->$depthAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeLeft = $node->$leftAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeRight = $node->$rightAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeKey = $node->$keyAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeName = $node->$nameAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIcon = $node->$iconAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIconType = $node->$iconTypeAttribute;\n\n $isChild = ($nodeRight == $nodeLeft + 1);\n $indicators = '';\n\n if (isset($this->nodeLabel)) {\n $label = $this->nodeLabel;\n $nodeName = is_callable($label) ? $label($node) :\n (is_array($label) ? ArrayHelper::getValue($label, $nodeKey, $nodeName) : $nodeName);\n }\n if ($nodeDepth == $currDepth) {\n if ($counter > 0) {\n $out .= \"</li>\\n\";\n }\n } elseif ($nodeDepth > $currDepth) {\n $out .= Html::beginTag('ul') . \"\\n\";\n $currDepth = $currDepth + ($nodeDepth - $currDepth);\n } elseif ($nodeDepth < $currDepth) {\n $out .= str_repeat(\"</li>\\n</ul>\", $currDepth - $nodeDepth) . \"</li>\\n\";\n $currDepth = $currDepth - ($currDepth - $nodeDepth);\n }\n if (trim($indicators) == null) {\n $indicators = '&nbsp;';\n }\n $nodeOptions = [\n 'data-key' => $nodeKey,\n 'data-lft' => $nodeLeft,\n 'data-rgt' => $nodeRight,\n 'data-lvl' => $nodeDepth,\n 'data-readonly' => static::parseBool($node->isReadonly()),\n 'data-movable-u' => static::parseBool($node->isMovable('u')),\n 'data-movable-d' => static::parseBool($node->isMovable('d')),\n 'data-movable-l' => static::parseBool($node->isMovable('l')),\n 'data-movable-r' => static::parseBool($node->isMovable('r')),\n 'data-removable' => static::parseBool($node->isRemovable()),\n 'data-removable-all' => static::parseBool($node->isRemovableAll()),\n ];\n\n $css = [];\n if (!$isChild) {\n $css[] = 'kv-parent ';\n }\n if (!$node->isVisible() && $this->isAdmin) {\n $css[] = 'kv-invisible';\n }\n if ($this->showCheckbox && in_array($node->id, $this->selected)) {\n $css[] = 'kv-selected ';\n $jsSelect .= '$('.$this->id.').treeview(\"checkNode\", \"'.$node->id.'\");';\n }\n if ($node->isCollapsed()) {\n $css[] = 'kv-collapsed ';\n }\n if ($node->isDisabled()) {\n $css[] = 'kv-disabled ';\n }\n if (!$node->isActive()) {\n $css[] = 'kv-inactive ';\n }\n $indicators .= $this->renderToggleIconContainer(false) . \"\\n\";\n $indicators .= $this->showCheckbox ? $this->renderCheckboxIconContainer(false) . \"\\n\" : '';\n if (!empty($css)) {\n Html::addCssClass($nodeOptions, $css);\n }\n $out .= Html::beginTag('li', $nodeOptions) . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-tree-list']) . \"\\n\" .\n Html::beginTag('div', ['class' => 'kv-node-indicators']) . \"\\n\" .\n $indicators . \"\\n\" .\n '</div>' . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-node-detail']) . \"\\n\" .\n $this->renderNodeIcon($nodeIcon, $nodeIconType, $isChild) . \"\\n\" .\n Html::tag('span', $nodeName, ['class' => 'kv-node-label']) . \"\\n\" .\n '</div>' . \"\\n\" .\n '</div>' . \"\\n\";\n ++$counter;\n }\n if (isset($jsSelect)) {\n $this->view->registerJs(\n $jsSelect,\n View::POS_READY,\n 'treeviewinput-selected'\n );\n }\n $out .= str_repeat(\"</li>\\n</ul>\", $nodeDepth) . \"</li>\\n\";\n $out .= \"</ul>\\n\";\n return Html::tag('div', $this->renderRoot() . $out, $this->treeOptions);\n }", "function renderTree($tree, $options)\n {\n $current_depth = 0;\n $counter = 0;\n $result = '';\n $folders = isset($options['folders']);\n $plans = isset($options['plans']);\n\n foreach($tree as $node)\n {\n $curr = $node['Category'];\n $node_depth = $curr['level'];\n $node_name = $curr['title'];\n $node_id = $curr['cat_id'];\n $node_count = $curr['listing_count'];\n\n if($node_depth == $current_depth)\n {\n if($counter > 0) $result .= '</li>';\n }\n elseif($node_depth > $current_depth)\n {\n $result .= '<ul'.($folders ? ' class=\"filetree\"' : '').'>';\n $current_depth = $current_depth + ($node_depth - $current_depth);\n }\n elseif($node_depth < $current_depth)\n {\n $result .= str_repeat('</li></ul>',$current_depth - $node_depth).'</li>';\n $current_depth = $current_depth - ($current_depth - $node_depth);\n }\n $result .= '<li class=\"jr-tree-cat-'.$node_id.' closed\"';\n $result .= '>';\n $folders and $result .= '<span class=\"folder\">&nbsp;';\n $result .= !$plans ?\n $this->Routes->category($node)\n :\n $this->Routes->category($node,array(\"onclick\"=>\"JRPaid.Plans.load({'cat_id':\".$node_id.\"});return false;\"))\n ;\n $this->Config->dir_cat_num_entries and $result .= ' (' .$node_count . ')';\n $folders and $result .= '</span>';\n ++$counter;\n }\n\n $result .= str_repeat('</li></ul>',$node_depth);\n\n return $result;\n }", "static function getHTMLForTree( $data ){\n\t\tglobal $wgOut;\n\t\t$wgOut->addModules( 'ext.DataVisualizer' );\n\n\t\treturn '<div class=\"dv_d3_tree\" style=\"text-align:center;\" dv_data=' . json_encode($data) .'></div>';\n\t}", "function smarty_function_randgen_generator_tree($params, &$smarty)\n{\n $tree = $params['tree'];\n $htmltag = '<div class=\"well\"><em class=\"title\">%s</em> : %s';\n $depth = 0;\n $html = '';\n foreach(array_keys($tree['description']) as $key){\n $currentDepth = $tree['depth'][$key];\n $description = nl2br(htmlspecialchars($tree['description'][$key], ENT_QUOTES, 'UTF-8'));\n if($depth == $currentDepth){\n $html .= \"</div>\";\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n }\n elseif($depth > $currentDepth){\n for($i=0;$i<$depth-$currentDepth;$i++){\n $html .= \"</div>\";\n }\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n elseif($depth < $currentDepth){\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n }\n for($i=0;$i<$currentDepth;$i++){\n $html .= \"</div>\";\n }\n\n return $html;\n}", "public function getTree() {\n\t\t// Affichage de la page\n\t\t$html = '<div id=\"tal_box\">';\n\t\t$html .= '<p>You can still use <span id=\"skillPoints\">23</span> points.</p>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div id=\"tal_linkBox\">';\n\t\t$html .= '<button onClick=\"createLink()\">Create a link</button>';\n\t\t$html .= '<p id=\"tal_buildLink\"></p>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "private function generateTree ( &$tree, $parentId = null ) {\r\n\t\tif ( !isset ( $parentId ) ) $parentId = 0;\r\n\t\t$param = array(\r\n\t\t\t'conditions' => array('parent_id' => $parentId, 'is_node' => 1),\r\n\t\t\t'fields' => array('id','lorder','rorder','CategoryDetail.name','CategoryDetail.icon_name'),\r\n\t\t\t'order' => array('CategoryDetail.name')\r\n\t\t );\r\n\t\t$arrRes = $this->Category->find('all', $param);\r\n\t\t\r\n\t\t$isFirst = false;\r\n\t\tif (!isset($tree) || empty($tree)) {\r\n\t\t\t$isFirst = true; \r\n\t\t\t$tree .= \"<ul class='menubar'>\";\r\n\t\t} else {\r\n\t\t\t$tree .= \"<ul><li class='li_top'></li>\";\r\n\t\t}\r\n\r\n \tforeach ( $arrRes as $key=>$node ) {\r\n \t\t$tree .= \"<li class='li_node \" . ($key == 0 ? 'first' : '') . \"' onmouseover='mover(this);' onmouseout='mout(this);'>\" .\r\n \t\t\t\t\t \"<a href='\" . SITE_URL . \"/category/\".$node['Category']['id'].\"' class='\" . \r\n \t\t\t\t\t $node['CategoryDetail']['icon_name'] . \"'>\".\r\n \t\t $node['CategoryDetail']['name'].\"</a>\";\r\n \t\tif ( $node['Category']['rorder'] - $node['Category']['lorder'] == 1 ) $tree .= \"</li>\";\r\n \t\telse {\r\n \t\t$this->generateTree ( $tree, $node['Category']['id'] );\r\n \t\t$tree .= \"</li>\";\r\n \t\t}\r\n \t}\r\n \tif (!$isFirst) $tree .= \"<li class='li_bottom'></li>\";\r\n \t\t$tree .= \"</ul>\";\r\n\t}", "public function asHtmlRecursive()\n {\n $html = $this->asHtml() . '<ul id=\"' . $this->getPrefix() . '__'\n . $this->getId() . '__children\" class=\"rule-param-start\">';\n foreach ($this->getConditions() as $cond) {\n $html .= '<li>' . $cond->asHtmlRecursive() . '</li>';\n }\n $html .= '<li>' . $this->getNewChildElement()->getHtml() . '</li></ul>';\n\n return $html;\n }", "private function prepareRecursiveHTML($obj){\n\t$myarr=$obj->getAppendedChildrenArray();\n\tfor($i=0; $i<count($myarr); $i++){\n\t\t$a=\"\";\n\t if($myarr[$i]->getAClass()!=\"\") $a.=\" class=\\\"\".$myarr[$i]->getAClass().\"\\\"\";\n\t if($myarr[$i]->getAId()!=\"\") $a.=\" id=\\\"\".$myarr[$i]->getAId().\"\\\"\";\n\t $ul=\"\";\n\t if($myarr[$i]->getUlClass()!=\"\") $ul.=\" class=\\\"\".$myarr[$i]->getUlClass().\"\\\"\";\n\t if($myarr[$i]->getUlId()!=\"\") $ul.=\" id=\\\"\".$myarr[$i]->getUlId().\"\\\"\";\n\t $li=\"\";\n\t if($myarr[$i]->getLiClass()!=\"\") $li.=\" class=\\\"\".$myarr[$i]->getLiClass().\"\\\"\";\n\t if($myarr[$i]->getLiId()!=\"\") $li.=\" id=\\\"\".$myarr[$i]->getLiId().\"\\\"\";\n\t\n\t\tif($i==0)$this->html = $this->replace_last_occurence($this->html, \"</a>\", \n\t\t\"</a>\\n<ul>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$myarr[0]->getLink().\"\\\">\".$myarr[0]->getText().\"</a></li>\\n</ul>\");\n\t\t\n\t\telse $this->html = $this->replace_last_occurence($this->html, \"</a></li>\\n</ul>\", \n\t\t\"</a></li>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$myarr[$i]->getLink().\"\\\">\".$myarr[$i]->getText().\"</a></li>\\n</ul>\");\n\n if(count($myarr[$i]->getAppendedChildrenArray())) $this->prepareRecursiveHTML($myarr[$i]);\n\t}\n\t\t\n}", "function generate($data, $settings = null) {\n if (is_null($settings)) {\n $settings = array();\n }\n $this->__settings = array_merge(array(\n 'model' => null,\n 'title' => 'name',\n 'depth' => 0,\n 'link' => true,\n 'div' => 'tree',\n 'controller' => null,\n 'action' => null,\n 'ajaxtarget' => null,\n 'additional' => null,\n ), (array) $settings);\n extract($this->__settings);\n\n $html = \"\\n\";\n $html .= $this->__generate($data, $settings);\n\n // inject the additional items before the end of the list\n if (is_array($additional)) {\n $html = substr($html, 0, strrpos($html, '</ul>'));\n foreach ($additional as $item) {\n $html .= \"<li>$item</li>\\n\";\n }\n $html .= \"</ul>\\n\";\n }\n\n $js = '';\n $js .= '$(function() {';\n $js .= '$(\"#tree\").treeview({';\n $js .= 'collapsed: true,';\n $js .= 'animated: \"medium\",';\n $js .= 'control:\"#sidetreecontrol\",';\n $js .= 'persist: \"location\"';\n $js .= '});';\n $js .= '})';\n $this->Html->scriptBlock($js, array('inline' => false));\n\n return $html;\n }", "function renderDirectory($tree)\n {\n $current_depth = 0;\n $counter = 0;\n $result = '';\n\n\t\t$columns = $this->Config->dir_columns ? $this->Config->dir_columns : 2;\n\t\t$width = (int) (99/$columns);\n\t\t$first_level_count = 0;\n\n foreach($tree as $node)\n {\n $curr = $node['Category'];\n $node_depth = $curr['level'];\n $node_name = $curr['title'];\n $node_id = $curr['cat_id'];\n $node_count = $curr['listing_count'];\n\n if($node_depth == $current_depth)\n {\n if($counter > 0) $result .= '</div></li>';\n\n }\n elseif($node_depth > $current_depth)\n {\n $result .= '<ul>';\n $current_depth = $current_depth + ($node_depth - $current_depth);\n\n }\n elseif($node_depth < $current_depth)\n {\n $result .= str_repeat('</div></li></ul>',$current_depth - $node_depth).'</div></li>';\n $current_depth = $current_depth - ($current_depth - $node_depth);\n }\n\n\t\t\tif ($current_depth == 1)\n\t\t\t{\n\t\t\t\t$params = json_decode($node['Category']['params'],true);\n\t\t\t\tif (!empty($params['image'])) {\n\t\t\t\t\t$image_container = '<div class=\"jrListingThumbnail\">'. $this->Routes->category($node,array('image'=>true)) . '</div>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$image_container = '';\n\t\t\t\t}\n\n\t\t\t\tif ($first_level_count == $columns)\n\t\t\t\t{\n\t\t\t\t\t$result .= '<li class=\"jrCatLevel' . $current_depth . '\" style=\"width: '. $width .'%; clear: both;\">' . $image_container;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$result .= '<li class=\"jrCatLevel' . $current_depth . '\" style=\"width: '. $width .'%;\">' . $image_container;\n\t\t\t\t}\n\t\t\t\t$first_level_count++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result .= '<li class=\"jrCatLevel' . $current_depth . '\">';\n\t\t\t}\n\t\t\t$result .= '<div class=\"jrContentDiv\">';\n $result .= $this->Routes->category($node);\n $this->Config->dir_cat_num_entries and $result .= ' (' .$node_count . ')';\n ++$counter;\n }\n\n\t\t$result .= str_repeat('</div></li></ul>',$node_depth);\n\n return $result;\n }", "abstract public function tree_encoder();", "function html_tree($proj, $tree, $repos) {\n $t = git_ls_tree(get_repo_path($proj, $repos), $tree);\n\n echo '<div class=\"gitbrowse\"><table>';\n\n foreach ($t as $t) {\n $plain = \"\";\n $perm = permissions_string($t['perm']);\n if ($t['type'] == 'tree')\n $objlink = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&t={$t['hash']}\\\">{$t['file']}</a>\";\n else if ($t['type'] == 'blob') {\n $plain = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&dl=plain&h={$t['hash']}\\\">plain</a>\";\n $objlink = \"<a class=\\\"blob\\\" href=\\\"\" . sanitized_url() . \"p=$proj&b={$t['hash']}\\\">{$t['file']}</a>\";\n }\n\n echo \"<tr><td>$perm</td><td>$objlink</td><td>$plain</td></tr>\";\n }\n echo '</table></div>';\n}", "private function _getHtmlTree($tree)\n {\n //obudowujemy sztucznym rootem\n $html = '<ul><li id=\"0\" data-jstree=\\'{\"type\":\"root\", \"opened\":true, \"selected\":false}\\'>' . self::ROOT;\n $html = $this->_generateTree(['children' => $tree], $html);\n $html .= '</li></ul>';\n return $html;\n }", "function BuildRecursiveTree(&$data, $node_id, &$xmlWriter){\n for ($i=0; $i<count($data);$i++){\n if (is_array($data[$i])) {\n if($data[$i][$this->parent_field_name] == $node_id){\n // drawing node\n $xmlWriter->WriteStartElement(\"node\");\n $xmlWriter->WriteAttributeString(\"id\", $data[$i][$this->key_field_name]);\n $xmlWriter->WriteElementString(\"caption\", addslashes($data[$i][$this->caption_field_name]));\n $xmlWriter->WriteElementString(\"url\", $data[$i][$this->url_name]);\n // drawing sub-nodes\n $xmlWriter->WriteStartElement(\"sub_node_list\");\n $this->BuildRecursiveTree($data, $data[$i][$this->key_field_name], $xmlWriter);\n $xmlWriter->WriteEndElement();\n $xmlWriter->WriteEndElement();\n\n }\n }\n }\n }", "private function buildTree ( &$tree, $parentId = null ) {\r\n\t\tif ( !isset ( $parentId ) ) $parentId = 0;\r\n\t\t$param = array(\r\n\t\t\t'conditions' => array('parent_id' => $parentId),\r\n\t\t\t'fields' => array('id','lorder','rorder','CategoryDetail.name'),\r\n\t\t\t'order' => array('CategoryDetail.name')\r\n\t\t );\r\n\t\t$arrRes = $this->Category->find('all', $param);\r\n $tree .= \"<ul>\";\r\n foreach ( $arrRes as $node ) {\r\n \t$tree .= \"<li><a id='\".$node['Category']['id'].\"' ctrl='categories'>\".\r\n \t\t $node['CategoryDetail']['name'].\"</a>\";\r\n if ( $node['Category']['rorder'] - $node['Category']['lorder'] == 1 ) $tree .= \"</li>\";\r\n else {\r\n $this->buildTree ( $tree, $node['Category']['id'] );\r\n $tree .= \"</li>\";\r\n }\r\n\t /*if ( $node['Category']['rorder'] - $node['Category']['lorder'] > 1 ) {\r\n\t \t\t$tree .= \"<li><a id='\".$node['Category']['id'].\"' ctrl='categories'>\".\r\n \t\t $node['CategoryDetail']['name'].\"</a>\";\r\n\t\t\t\r\n\t\t\t $this->buildTree ( $tree, $node['Category']['id'] );\r\n\t $tree .= \"</li>\";\r\n\t }*/\r\n }\r\n $tree .= \"</ul>\";\r\n\t}", "private function __generate($data) {\n extract($this->__settings);\n $html = '';\n\n $id = '';\n if ($depth == 0) {\n $id = ' id=\"' . $div . '\"';\n }\n\n $whitespace = str_repeat(\"\\t\", $depth);\n\n $html .= \"<ul\" . $id . \">\\n\";\n foreach ($data as $item) {\n $html .= \"<li>\";\n if ($link) {\n\n if ($ajaxtarget == null) {\n $html .= $this->Html->link(\n $item[$model][$title], array(\n 'controller' => $controller,\n 'action' => $action,\n $item[$model]['id']\n ));\n } else {\n $html .= $this->Js->link(\n $item[$model][$title], array(\n 'controller' => $controller,\n 'action' => $action,\n $item[$model]['id']\n ), array(\n 'update' => '#' . $ajaxtarget,\n 'before' => $this->Js->get('#' . $ajaxtarget)->effect('fadeOut'),\n 'complete' => $this->Js->get('#' . $ajaxtarget)->effect('fadeIn'),\n )\n );\n }\n } else {\n $html .= $item[$model][$title];\n }\n if (count($item['children']) > 0) {\n $this->__settings['depth'] = $depth + 1;\n $html .= $this->__generate($item['children'], $this->__settings);\n }\n $html .= \"</li>\\n\";\n }\n $html .= \"</ul>\\n\";\n $html = str_replace(\"\\n\", \"\\n\" . $whitespace, $html);\n return $html;\n }", "public function render_tree(tree $tree) {\n $return = \\html_writer::start_tag('div', array('class' => 'profile_tree'));\n $categories = $tree->categories;\n foreach ($categories as $category) {\n $return .= $this->render($category);\n }\n $return .= \\html_writer::end_tag('div');\n return $return;\n }", "function printCollectionTree(){\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "function parseTree($files, $icons, $nested = 0){\n $tree = '';\n $padding = $nested * 16 + 6;\n\n foreach ($files as $path => $value) {\n $parts = explode('/',$path);\n\n /* Sanitize name, http://stackoverflow.com/questions/2103797/url-friendly-username-in-php */\n $name = 'folder-'.strtolower(trim(preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($path, ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8')), '-'));\n\n if (is_array($value)) {\n $tree .= \"<li><input type='checkbox' name ='$name' id='$name'>\".\n \"<label for='$name' style='padding-left:\".$padding.\"px'><svg xmlns='http://www.w3.org/2000/svg' width='14' height='16' viewBox='0 0 14 16' class='folder icon'><path d='M13 4H9V3c0-.66-.31-1-1-1H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zM8 4H1V3h7z'/><path class='open' d='M1 3v4.094h12V4.97H8V3H1z'/></svg>\". end($parts) . \"</label>\".\n '<ul>'.parseTree($value, $icons, $nested + 1).'</ul></li>';\n } else {\n $class_name = $icons->getClassWithColor($value);\n // ($match = $icons->matchName($value)) ? $match->getClass(1) : 'text-icon';\n $tree .= \"<li><label style='padding-left:\".$padding.\"px'><a target='iframe' href='index.php/$path' onmouseup='document.getElementById(\\\"content\\\").scrollTop = 0'><i class='icon $class_name'></i>$value</a></label></li>\";\n }\n } \n return $tree; \n }", "public function createTree($name, array $opts = array())\n {\n global $injector, $registry;\n\n $opts = array_merge(array(\n 'parent' => null,\n 'render_params' => array(),\n 'render_type' => 'Javascript'\n ), $opts);\n\n $this->_unseen = 0;\n $view = $registry->getView();\n\n if ($name instanceof Horde_Tree_Renderer_Base) {\n $tree = $name;\n $parent = $opts['parent'];\n } else {\n $tree = $injector->getInstance('Horde_Core_Factory_Tree')->create($name, $opts['render_type'], array_merge(array(\n 'alternate' => true,\n 'lines' => true,\n 'lines_base' => true,\n 'nosession' => true\n ), $opts['render_params']));\n $parent = null;\n }\n\n foreach ($this as $val) {\n $after = '';\n $elt = $this->getElement($val);\n $params = array();\n\n switch ($opts['render_type']) {\n case 'IMP_Tree_Flist':\n if ($val->vfolder_container) {\n continue 2;\n }\n\n $is_open = true;\n $label = $params['orig_label'] = empty($opts['basename'])\n ? $val->abbrev_label\n : $val->basename;\n break;\n\n case 'IMP_Tree_Jquerymobile':\n $is_open = true;\n $label = $val->display_html;\n $icon = $val->icon;\n $params['icon'] = $icon->icon;\n $params['special'] = $val->inbox || $val->special;\n $params['class'] = 'imp-folder';\n $params['urlattributes'] = array(\n 'id' => 'imp-mailbox-' . $val->form_to\n );\n\n /* Force to flat tree so that non-polled parents don't cause\n * polled children to be skipped by renderer (see Bug\n * #11238). */\n $elt['c'] = 0;\n break;\n\n case 'IMP_Tree_Simplehtml':\n $is_open = $this->isOpen($val);\n if ($tree->shouldToggle($val->form_to)) {\n if ($is_open) {\n $this->collapse($val);\n } else {\n $this->expand($val);\n }\n $is_open = !$is_open;\n }\n $label = htmlspecialchars(Horde_String::abbreviate($val->display, 30 - ($elt['c'] * 2)));\n break;\n\n case 'Javascript':\n $is_open = $this->isOpen($val);\n $label = empty($opts['basename'])\n ? htmlspecialchars($val->abbrev_label)\n : htmlspecialchars($val->basename);\n $icon = $val->icon;\n $params['icon'] = $icon->icon;\n $params['iconopen'] = $icon->iconopen;\n break;\n }\n\n if (!empty($opts['poll_info']) && $val->polled) {\n $poll_info = $val->poll_info;\n\n if ($poll_info->unseen) {\n switch ($opts['render_type']) {\n case 'IMP_Tree_Jquerymobile':\n $after = $poll_info->unseen;\n break;\n\n default:\n $this->_unseen += $poll_info->unseen;\n $label = '<strong>' . $label . '</strong>&nbsp;(' .\n $poll_info->unseen . ')';\n }\n }\n }\n\n if ($this->isContainer($val)) {\n $params['container'] = true;\n } else {\n switch ($view) {\n case $registry::VIEW_MINIMAL:\n $params['url'] = IMP_Minimal_Mailbox::url(array('mailbox' => $val));\n break;\n\n case $registry::VIEW_SMARTMOBILE:\n $url = new Horde_Core_Smartmobile_Url();\n $url->add('mbox', $val->form_to);\n $url->setAnchor('mailbox');\n $params['url'] = strval($url);\n break;\n\n default:\n $params['url'] = $val->url('mailbox')->setRaw(true);\n break;\n }\n\n if ($this->_showunsub && !$this->isSubscribed($val)) {\n $params['class'] = 'mboxunsub';\n }\n }\n\n $checkbox = empty($opts['checkbox'])\n ? ''\n : '<input type=\"checkbox\" class=\"checkbox\" name=\"mbox_list[]\" value=\"' . $val->form_to . '\"';\n\n if ($val->nonimap) {\n $checkbox .= ' disabled=\"disabled\"';\n }\n\n if ($val->vfolder &&\n !empty($opts['editvfolder']) &&\n $this->isContainer($val)) {\n $after = '&nbsp[' .\n $registry->getServiceLink('prefs', 'imp')->add('group', 'searches')->link(array('title' => _(\"Edit Virtual Folder\"))) . _(\"Edit\") . '</a>'.\n ']';\n }\n\n $tree->addNode(array(\n 'id' => $val->form_to,\n 'parent' => ($elt['c']) ? $val->parent->form_to : $parent,\n 'label' => $label,\n 'expanded' => isset($opts['open']) ? $opts['open'] : $is_open,\n 'params' => $params,\n 'right' => $after,\n 'left' => empty($opts['checkbox']) ? null : $checkbox . ' />'\n ));\n }\n\n return $tree;\n }", "public function tree()\n {\n// try {\n $root = $this->model->root();\n if ($root) {\n $items = $root->getDescendants();\n }\n\n $items = $this->recursiveNestable($items->toArray(), $root->id);\n\n return view('admin.menus.tree', compact('items', 'root'))->with('parentId', $root->id);\n// } catch (Exception $e) {\n// return $this->returnWithError($e->getMessage());\n// }\n }", "function show_tree(){\n\t\t\t\t\tswitch(LINK_TYPE){\n\t\t\t\t\t\tcase \"static\":\n\t\t\t\t\t\t\treturn $this->show_tree_static();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"burc\":\n\t\t\t\t\t\tcase \"dynamic\":\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn $this->show_tree_dynamic();\n\t\t\t\t\t}\n\t\t\t\t}", "public function build_javascript_tree( $tree_name, $page, $parameter, $target = '', $recursive = true,\n $show_root = false, $root_name = 'Oberste Ebene',\n $root_expand = true, $root_is_link = true)\n {\n $javascript = array();\n $javascript[] = '<script type=\"text/javascript\">';\n $javascript[] = \"$tree_name = new dTree('$tree_name');\";\n\n if ($show_root)\n {\n // the root node is visible\n if ($this->get_id() > 0)\n $root_name = $this->get_name();\n\n if ($root_is_link)\n $root_link = $page .\"?\". $parameter .\"=\".$this->get_id();\n else\n $root_link = '';\n\n if ($root_expand)\n {\n // we need a second (invisible) root node\n $javascript[] = \"$tree_name.add(\". strval($this->get_parent_id()+1).\",-1, '');\";\n $javascript[] = \"$tree_name.add(\". strval($this->get_id()+1) .\",\". strval($this->get_parent_id()+1) .\n \",'\". $root_name .\"', '\".$root_link.\"', '', '\".$target.\"');\";\n }\n else\n {\n $javascript[] = \"$tree_name.add(\". strval($this->get_id()+1) .\",-1,'\". $root_name .\"', '\".\n $root_link.\"', '', '\".$target.\"');\";\n }\n }\n else\n {\n // the root node is invisible\n $javascript[] = \"$tree_name.add(\". strval($this->get_id()+1).\",-1, '');\";\n }\n\n // get all subelements\n $subelements = $this->get_subelements($recursive);\n\n foreach ($subelements as $element)\n {\n $javascript[] = $tree_name.'.add('.strval($element->get_id()+1).','.strval($element->get_parent_id()+1).\n \",'\".addslashes(htmlentities($element->get_name(), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')).\"','\".\n $page.'?'.$parameter.'='.$element->get_id().\"','','\".$target.\"');\";\n }\n\n $javascript[] = \"document.write($tree_name);\";\n $javascript[] = '</script>';\n $javascript[] = '<br>';\n $javascript[] = '<a href=\"javascript:'. $tree_name .'.openAll();\">Alle Anzeigen</a> | ';\n $javascript[] = '<a href=\"javascript:'. $tree_name .'.closeAll();\">Alle Schliessen</a>';\n\n return implode(\"\\n\", $javascript);\n }", "public function getTreeHtml()\n {\n if ($this->getMenu()) {\n return $this->_getTreeHtmlLevel(0, $this->getMenu()->getMenuTreeObjects());\n }\n\n return '';\n }", "function generate_tree_list($array, $parent = 0, $level = 0)\n\t{\n\t\t$has_children = false;\n\n\t\t// Loop through each item of the list array\n\t\tforeach($array as $key => $value)\n\t\t{\n\t\t\t// For the first run, get the first item with a parent_id of 0 (= root category)\n\t\t\t// (or whatever id is passed to the function)\n\t\t\t//\n\t\t\t// For every subsequent run, look for items with a parent_id matching the current item's key (id)\n\t\t\t// (eg. get all items with a parent_id of 2)\n\t\t\t//\n\t\t\t// This will return false (stop) when it find no more matching items/children\n\t\t\t//\n\t\t\t// If this array item's parent_id value is the same as that passed to the function\n\t\t\t// eg. [parent_id] => 0 == $parent = 0 (true)\n\t\t\t// eg. [parent_id] => 20 == $parent = 0 (false)\n\t\t\t//\n\t\t\tif ($value['cat_parent'] == $parent) \n\t\t\t{\n\t\t\t\t// Only print the wrapper ('<ul>') if this is the first child (otherwise just print the item) \n\t\t\t\t// Will be false each time the function is called again\n\t\t\t\tif ($has_children === false)\n\t\t\t\t{\n\t\t\t\t\t// Switch the flag, start the list wrapper, increase the level count\n\t\t\t\t\t$has_children = true; \n\t\t\t\t\tif($level==0)\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<ul id=\"browser\" class=\"filetree\">\n\t\t\t\t\t\t';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\\n\".'<ul>';\n\t\t\t\t\t}\n\t\t\t\t\t$level++;\n\t\t\t\t}\n\t \t\t// Print the list item\n\t\t\t\techo \"\\n\".'<li><span class=\"folder\">' . $value['cat_name'] . '</span>';\n\t\t\t\techo $this->get_articles($value['cat_id'], $value['cat_uri']);\n\t\t\t\t// Repeat function, using the current item's key (id) as the parent_id argument\n\t\t\t\t// Gives us a nested list of subcategories\n\t\t\t\t$this->generate_tree_list($array, $key, $level); \n\t\t\t\t// Close the item\n\t\t\t\techo \"</li>\\n\";\n\t \t}\n\t\t}\n\t\t// If we opened the wrapper above, close it.\n\t \tif ($has_children === true) echo '</ul>'.\"\\n\";\n\t}", "function build_tree($pages){\n\t\tforeach ($pages as $page){\n\t\t\t$this->add_node($page);\n\t\t}\n\t\t$this->add_children();\n\t\n\t}", "private function prepareHTML(){\n\t$first=true;\n\t\t\n\tforeach($this->objarr as $key=>$val){\n\t\t$a=\"\";\n\t if($val->getAClass()!=\"\") $a.=\" class=\\\"\".$val->getAClass().\"\\\"\";\n\t if($val->getAId()!=\"\") $a.=\" id=\\\"\".$val->getAId().\"\\\"\";\n\t $ul=\"\";\n\t if($val->getUlClass()!=\"\") $ul.=\" class=\\\"\".$val->getUlClass().\"\\\"\";\n\t if($val->getUlId()!=\"\") $ul.=\" id=\\\"\".$val->getUlId().\"\\\"\";\n\t $li=\"\";\n\t if($val->getLiClass()!=\"\") $li.=\" class=\\\"\".$val->getLiClass().\"\\\"\";\n\t if($val->getLiId()!=\"\") $li.=\" id=\\\"\".$val->getLiId().\"\\\"\";\n\t\n\t\tif(!$val->getIntegrated()){ //se l' oggetto non è stato integrato come figlio di qualche altro oggetto\n\t if($first){\n\t $this->html.=\"<ul>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$val->getLink().\"\\\">\".$val->getText().\"</a></li>\\n</ul>\";\n\t $first=false;\n\t\t }else{\n\t\t \t$this->html=$this->replace_last_occurence($this->html, \"</ul>\", \n\t\t \t\"<li\".$li.\"><a\".$a.\" href=\\\"\".$val->getLink().\"\\\">\".$val->getText().\"</a></li>\\n</ul>\");\n\t\t }\n\t\t \t\n\t\t $this->prepareRecursiveHTML($val);\n\t\t}//close if(!$val->getIntegrated())\n\t}//close foreach\n\t\n}", "function _calculateTree() {\n include_once(\"bitlib/SQL/Tree.php\");\n include_once(\"bitlib/functions/common.php\");\n $db = common::getDB($GLOBALS[\"BX_config\"][\"dsn\"]);\n $t = new SQL_Tree($db);\n $t->FullPath=\"fulluri\";\n $t->Path=\"uri\";\n $t->FullTitlePath=\"fulltitlepath\";\n $t->Title=\"title_de\";\n \n $t->importTree(1);\n }", "private function _getTree($create = false) {}", "function createMenu($data, $htmlOptions = array()) {\r\n $this->htmlTree .= Html::beginTag('ul', $htmlOptions);\r\n foreach ($data as $item) {\r\n $this->htmlTree .= Html::beginTag('li') . Html::a($item['title'], $item['url']);\r\n if (isset($item['children']) AND !empty($item['children']))\r\n $this->createMenu($item['children']);\r\n $this->htmlTree .= Html::endTag('li');\r\n }\r\n $this->htmlTree .= Html::endTag('ul');\r\n return $this->htmlTree;\r\n }", "function _build_tree_select($params)\n\t{\n\t\t$params = array_merge(array(\n\t\t\t'tree'\t\t\t=> array(),\n\t\t\t'parent_id'\t\t=> 0,\n\t\t\t'current_parent'=> 0,\n\t\t\t'current_id'\t=> 0,\n\t\t\t'level'\t\t\t=> 0\n\t\t), $params);\n\n\t\textract($params);\n\n\t\tif ( ! $tree)\n\t\t{\n\t\t\tif ($pages = $this->db->select('id, parent_id, title')->get('pages')->result())\n\t\t\t{\n\t\t\t\tforeach($pages as $page)\n\t\t\t\t{\n\t\t\t\t\t$tree[$page->parent_id][] = $page;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset($tree[$parent_id]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$html = '';\n\n\t\tforeach ($tree[$parent_id] as $item)\n\t\t{\n\t\t\tif ($current_id == $item->id)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$html .= '<option value=\"' . $item->id . '\"';\n\t\t\t$html .= $current_parent == $item->id ? ' selected=\"selected\">': '>';\n\n\t\t\tif ($level > 0) \n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < ($level*2); $i++)\n\t\t\t\t{\n\t\t\t\t\t$html .= '&nbsp;';\n\t\t\t\t}\n\n\t\t\t\t$html .= '-&nbsp;';\n\t\t\t}\n\n\t\t\t$html .= $item->title . '</option>';\n\n\t\t\t$html .= $this->_build_tree_select(array(\n\t\t\t\t'tree'\t\t\t=> $tree,\n\t\t\t\t'parent_id'\t\t=> (int) $item->id,\n\t\t\t\t'current_parent'=> $current_parent,\n\t\t\t\t'current_id'\t=> $current_id,\n\t\t\t\t'level'\t\t\t=> $level + 1\n\t\t\t));\n\t\t}\n\n\t\treturn $html;\n\t}", "static function to_tree($data)\n {\n //Cap 1\n for ($i = 3; $i >= 1; $i--)\n {\n //echo $i . \"============<br/>\";\n foreach ($data as $key=>$value)\n {\n //if ($key == 1485 || $key == 192 || $key == 193 || $key == 29)\n //echo \"$key = \" . $data[$key][\"ten\"] . \"<br/>\";\n \n //if (!isset($data[$key][\"tree\"])) $data[$key][\"tree\"] = false;\n //if ($value[\"parent\"] > 0 && !$data[$key][\"tree\"])\n if ($value[\"cap\"] == $i)\n {\n //if (!isset($data[$value[\"parent\"]][\"child\"])){\n //\t$data[$value[\"parent\"]][\"child\"] = array();\n //}\n $data[$value[\"parent\"]][\"child\"][$key] = $value;\n //if ($key == 1485 || $key == 192 || $key == 193 || $key == 29)\n //echo \"&nbsp;&nbsp;&nbsp;&nbsp;Dua \" . $value[\"ten\"] . \" vao \" . $value[\"parent\"] . \" \" . $data[$value[\"parent\"]][\"ten\"] . \" <br/>\";\n //$data[$key][\"tree\"] = true;\n //$data[$value[\"parent\"]][\"tree\"] = false;\n }\n }\n }\n //Khu bo\n foreach ($data as $key=>$value)\n {\n if ($value[\"parent\"] > 0)\n {\n unset($data[$key]);\n }\n }\n \n return $data;\n }", "public function actionAreaTree()\n {\n $html = $this->renderPartial('tree', array(), true);\n Yii::app()->getClientScript()->renderBodyBegin($html);\n Yii::app()->getClientScript()->renderBodyEnd($html);\n echo $html;\n Yii::app()->end();\n }", "function print_node($allowed_pages_t, $v, $padding_left=1)\r\n{\r\n $ret = '';\r\n\r\n $node = $v['node'];\r\n $children = $v['children'];\r\n\r\n if(!empty($allowed_pages_t))\r\n {\r\n $allowed_pages = explode(', ', $allowed_pages_t);\r\n }\r\n\r\n\r\n $ret.= \"<div style='padding-left:{$padding_left}px; padding-bottom:10px;'>\r\n <input type=\\\"checkbox\\\" onclick=\\\"ori_node=0; set_acl('{$node['id']}');\\\" class=\\\"checkbox\\\" name=\\\"acl[]\\\" id=\\\"acl_sections_{$node['id']}\\\"\r\n \";\r\n\r\n if( !empty($allowed_pages_t) && (in_array($node['title'], $allowed_pages)) ) $ret.= \"checked='checked'\";\r\n\r\n $ret.= \"value='{$node['title']}' /><label for=\\\"acl_sections_{$node['id']}\\\">{$node['display_name']}</label>\r\n </div>\";\r\n\r\n if(!empty($children))\r\n {\r\n foreach($children as $ch)\r\n $ret.= print_node($allowed_pages_t, $ch, ($padding_left+20));\r\n }\r\n\r\n return $ret;\r\n\r\n}", "function display_children($parent, $level) {\n $result = mysql_query('SELECT * FROM treeview_items WHERE parent_id=\"'.$parent.'\";'); \n while ($row = mysql_fetch_array($result)) { \n echo \"<option value='\".$row['id'].\"'>\".str_repeat('--',$level).$row['name'].\"</option>\" .\"<br>\"; \n display_children($row['id'], $level+1); \n\n } \n\n }", "function v2_mumm_menu_tree__menu_doormat(&$variables) {\n return $variables['tree'];\n}", "function minorite_menu_tree($variables) {\n return '<ul class=\"nav meganav\">' . $variables['tree'] . '</ul>';\n}", "function generateXML( $node,&$strArr,$level ){\r\n\r\n\t$i=0;\r\n\t$tabs=\"\";\r\n\twhile( $i<$level ){\r\n\t\t$tabs .= \"\t\";\r\n\t\t$i++;\r\n\t}\r\n\t//print_r($node);\r\n\tif( isset($node['childs']) && is_array( $node['childs'] ) && count( $node['childs'] )>0 ){\r\n\t\t$strArr[] = $tabs.\"<\".$node['name'].\">\";\r\n\t\t$i=0;\r\n\t\tforeach ( $node['childs'] as $k=>$c ) {\r\n\t\t\tgenerateXML( $c,$strArr,$level+1 );\r\n\t\t}\r\n\t\t$strArr[] = $tabs.\"</\".$node['name'].\">\";\r\n\t}\r\n\telse{\r\n\t\t$strArr[] = $tabs.\"<\".$node['name'].\">\".$node['value'].\"</\".$node['name'].\">\";\r\n\t}\r\n}", "public function treeAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n /** @var CategoryRepository $repo */\n $repo = $em->getRepository('SowpBudgetBundle:Category');\n $categories = $repo->childrenHierarchy();\n\n return $this->render('SowpBudgetBundle:CategoryAdmin:tree.html.twig', array(\n 'categories' => $categories,\n ));\n }", "function tree($parent, $ident, $tree) {\n global $tree;\n $database = &JFactory::getDBO();\n\n $database->setQuery(\"SELECT * FROM #__jdownloads_cats WHERE parent_id =\".$parent.\" ORDER BY ordering\");\n \n $rows = $database->loadObjectList();\n if ($database->getErrorNum()) {\n echo $database->stderr();\n return false;\n }\n foreach ($rows as $v) {\n $v->cat_title = $ident.\".&nbsp;&nbsp;<sup>L</sup>&nbsp;\".$v->cat_title;\n $v->cat_title = str_replace('.&nbsp;&nbsp;<sup>L</sup>&nbsp;','.&nbsp;&nbsp;&nbsp;&nbsp;',$v->cat_title);\n $x = strrpos($v->cat_title,'.&nbsp;&nbsp;&nbsp;&nbsp;');\n $v->cat_title = substr_replace($v->cat_title, '.&nbsp;&nbsp;<sup>L</sup>&nbsp;', $x,7);\n $tree[] = $v;\n \n tree($v->cat_id, $ident.\".&nbsp;&nbsp;<sup>L</sup>&nbsp;\", $tree);\n }\n}", "private function htmlFromArray($hierarchicalArray) {\n $html = '';\n foreach($hierarchicalArray as $item) {\n $html .= \"<ul>\";\n $html .= \"<li style='color: \". ( ($item['status'] == 1) ? \"green\" : \"red\" ) .\"'>\". $item['title'] . \"<span style='color:black;'> --- \". $item['total_points'] .\"</span></li>\";\n if(count($item['children']) > 0) {\n $html .= $this->htmlFromArray($item['children']);\n }\n $html .= \"</ul>\";\n }\n return $html;\n }", "function BuildTree($items)\r\n\t{\r\n\t\tif (!empty($items))\r\n\t\t{\r\n\t\t\t# Columns\r\n\t\t\t# * Gather all columns required for display and relation.\r\n\t\t\t# Children\r\n\t\t\t# * Map child names to child index.\r\n\r\n\t\t\t$cols[$this->ds->table] = array($this->ds->id => 1);\r\n\t\t\tif (!empty($this->ds->DisplayColumns))\r\n\t\t\tforeach (array_keys($this->ds->DisplayColumns) as $col)\r\n\t\t\t\t$cols[$this->ds->table][$col] = $this->ds->id == $col;\r\n\r\n\t\t\tif (!empty($this->ds->children))\r\n\t\t\tforeach ($this->ds->children as $ix => $child)\r\n\t\t\t{\r\n\t\t\t\t$children[$child->ds->table] = $ix;\r\n\t\t\t\t$cols[$child->ds->table][$child->parent_key] = 1;\r\n\t\t\t\t$cols[$child->ds->table][$child->child_key] = 0;\r\n\t\t\t\tif (!empty($child->ds->DisplayColumns))\r\n\t\t\t\tforeach (array_keys($child->ds->DisplayColumns) as $col)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[$child->ds->table][$col] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# Flats\r\n\t\t\t# * Convert each item into separated TreeNodes\r\n\t\t\t# * Associate all indexes by table, then id\r\n\r\n\t\t\t$flats = array();\r\n\r\n\t\t\t# Iterate all the resulting database rows.\r\n\t\t\tforeach ($items as $ix => $item)\r\n\t\t\t{\r\n\r\n\t\t\t\t# Iterate the columns that were created in step 1.\r\n\t\t\t\tforeach ($cols as $table => $columns)\r\n\t\t\t\t{\r\n\t\t\t\t\t# This will store all the associated data in the treenode\r\n\t\t\t\t\t# for the editor to reference while processing the tree.\r\n\t\t\t\t\t$data = array();\r\n\t\t\t\t\t$skip = false;\r\n\r\n\t\t\t\t\t# Now we're iterating the display columns.\r\n\t\t\t\t\tforeach ($columns as $column => $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t# This column is not associated with a database row.\r\n\t\t\t\t\t\tif (is_numeric($column)) continue;\r\n\r\n\t\t\t\t\t\t# Table names are included to avoid ambiguity.\r\n\t\t\t\t\t\t$colname = $table.'_'.$column;\r\n\r\n\t\t\t\t\t\t# ID would be specified if this is specified as a keyed\r\n\t\t\t\t\t\t# value.\r\n\t\t\t\t\t\tif ($id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (empty($item[$colname]))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$skip = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$idcol = $colname;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data[$this->ds->StripTable($colname)] = $item[$this->ds->StripTable($colname)];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$skip)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$tn = new TreeNode($data);\r\n\t\t\t\t\t\t$tn->id = $item[$idcol];\r\n\t\t\t\t\t\t$flats[$table][$item[$idcol]] = $tn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# Tree\r\n\t\t\t# * Construct tree out of all items and children.\r\n\r\n\t\t\t$tree = new TreeNode('Root');\r\n\r\n\t\t\tforeach ($flats as $table => $items)\r\n\t\t\t{\r\n\t\t\t\tforeach ($items as $ix => $node)\r\n\t\t\t\t{\r\n\t\t\t\t\t$child_id = isset($children[$table]) ? $children[$table] : null;\r\n\r\n\t\t\t\t\tif (isset($children[$table]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$ckeycol = $this->ds->children[$child_id]->child_key;\r\n\t\t\t\t\t\t$pid = $node->data[\"{$table}_{$ckeycol}\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse $pid = 0;\r\n\r\n\t\t\t\t\t$node->data['_child'] = $child_id;\r\n\r\n\t\t\t\t\tif ($pid != 0)\r\n\t\t\t\t\t\t$flats[$this->ds->table][$pid]->children[] = $node;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$tree->children[] = $node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t# Put child table children above related children, helps to\r\n\t\t\t# understand the display.\r\n\t\t\tif (count($this->ds->children) > 0) $this->FixTree($tree);\r\n\t\t\treturn $tree;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function dir_recursive($dir,$username) {\r\n \r\n echo \"<ul id='tree'>\";\r\n $n =0;\r\n foreach(scandir($dir) as $file) {\r\n \r\n $n++;\r\n if ('.' === $file || '..' === $file || '.DS_Store' === $file) continue;\r\n \r\n if (is_dir($dir.'/'.$file)) {\r\n\r\n\r\n //echo $dir.'/'.$file.'<br>';\r\n \r\n echo \"<li id='\".$file.\"' class='treeLi' title='\".$dir.'/'.$file.\"' onclick='getFolderNode(this.title,this.id)'><i class='fas fa-folder mr-2 iconNav'></i>$file</li>\";\r\n\r\n dir_recursive($dir.'/'.$file,$username);\r\n\r\n } else {\r\n //echo $file.'<br>';\r\n }\r\n\r\n }\r\n echo \"</ul>\"; \r\n}", "protected function _getTree($create = false) {}", "function display_node($parent, $level) {\n global $tam1;\n $tam2=array();\n global $leafnodes; \n global $responce;\n if($parent >0) {\n foreach ($tam1 as $row){\n\t if($row['ID_Parent']==$parent){\n\t\t $tam2[]=$row;\n\t }\n }\n } else {\n \n\t foreach ($tam1 as $row){\n\t if($row['ID_Parent']==''){\n\t\t $tam2[]=$row;\n\t }\n }\n }\n\n foreach ($tam2 as $row) {\n\tif(!$row['ID_Parent']) $valp = 'NULL'; else $valp = $row['ID_Parent'];\t\n\t//kiem tra node co phai lead\n\tif(array_key_exists($row['ID_Control'], $leafnodes)) $leaf='true'; else $leaf = 'false';\t\n\t$responce[] = array('ID_Control' => $row[\"ID_Control\"], 'ID_Parent' => $row[\"ID_Parent\"], 'Caption' => $row[\"Caption\"],'KieuControl' => $row[\"KieuControl\"],'IsBarButton' => $row[\"IsBarButton\"] ,'Icon' =>$row[\"Icon\"],'Active' =>$row[\"Active\"],'STT' =>$row[\"STT\"],'PageOpen' =>$row[\"PageOpen\"],'OpenType' =>$row[\"OpenType\"],'TenControl' =>$row[\"TenControl\"] , 'level' => $level, 'parent' => $valp, 'isLeaf' => $leaf, 'expanded' => \"true\", 'loaded' => \"true\");\n\t\n\t display_node($row['ID_Control'],$level+1);\n\t \n\t} \n \n return $responce;\n \n}", "public function show_tree($add_class = FALSE)\n\t{\n\t\t$ret = '';\n\t\tforeach ($this->class_parents as $p)\n\t\t{\n\t\t $ret .= $this->class_tree[$p]['userclass_id'].':'.$this->class_tree[$p]['userclass_name'];\n\t\t if ($add_class) $ret .= \" (\".$this->class_tree[$p]['userclass_accum'].\")\";\n\t\t $ret .= \" Children: \".count($this->class_tree[$p]['class_children']);\n\t\t $ret .= \"<br />\";\n\t\t $ret .= $this->show_sub_tree($p,'>', $add_class);\n\t\t}\n\t\treturn $ret;\n\t}", "private function recurse_tree_list_html($items, & $html = '', $view_path = 'tree', $open_items = array(), & $depth = -1)\n\t{\t\t\n\t\t$depth++;\n\t\t\n\t\t$has_items = (count($items) > 0);\n\t\t\n\t\tif ($has_items)\n\t\t{\n\t\t\t$html .= View::factory($view_path.'/list_open')\n\t\t\t\t->set('open_items', $open_items);\n\t\t}\n\t\tforeach($items as $item)\n\t\t{\n\t\t\t$html .= View::factory($view_path.'/item_open')\n\t\t\t\t->set(Inflector::singular($this->_table_name), $item)\n\t\t\t\t->set('open_items', $open_items);\n\n\t\t\t$this->recurse_tree_list_html($item->children->find_all(), $html, $view_path, $open_items, $depth);\n\t\t\t\n\t\t\t$html .= View::factory($view_path.'/item_close');\n\t\t}\t\t\n\t\tif ($has_items)\n\t\t{\n\t\t\t$html .= View::factory($view_path.'/list_close');\n\t\t}\n\t}", "function toHTML($array_name, $ident = 0, $mark=\"\"){\n static $s1;\n if (is_array($array_name)){\n $s1=$s1.'<ul class=\"level_'.$ident.'\">\n ';\n foreach ($array_name as $k => $v){\n if (is_array($v)){\n for ($i=0; $i < $ident; $i++){ $s1=$s1.$mark; }\n $s1=$s1.'<li class=\"level_'.$ident.'_'.$ident.'\">'.$k .'</li>'. \" \" . \"\n \";\n $this->toHTML($v, $ident + 1, $mark);\n // $s=$s.'AFTERM';\n }else{\n for ($i=0; $i < $ident; $i++){$s1=$s1.$mark; }\n $s1=$s1.'<li class=\"level_'.$ident.'_'.$ident.' \">'.$k . \"</li>\n \" . $v .\"\";\n }\n }\n $s1=$s1.'</ul>\n ';\n }else{\n $s1=$s1.\"Error = \" . $array_name;\n }\n return $s1;\n }", "public function menu_tree_output($tree)\n {\n return menu_tree_output($tree);\n }", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$_activeTree= $this;\n\t\t\n\t\t$this->writeScript();\n\t\t$width = is_numeric($this->width) ? \"{$this->width}px\" : $this->width;\n\t\t$height = is_numeric($this->height) ? \"{$this->height}px\" : $this->height;\n\t\t\n\t\tif ($this->selectMode == \"single\")\n\t\t{\n?>\n<input type='hidden' name='<?echo $this->id ?>' id='<?echo $this->id?>' value='<?echo $this->value ?>'/>\n<? \n\t\t}\n?><table id=\"<?echo $this->id?>_table\" class=\"<? echo $this->style?>\" cellpadding=\"0\" cellspacing=\"0\" <? if ($this->width) echo \"style='width:{$width}'\"; ?>>\n\t\t <? \n\t\t if ($this->title)\n\t\t {\n\t\t ?>\t\t \n\t\t <tr>\n\t\t <th><? echo $this->title?></th>\n\t\t </tr>\n\t\t <?\n\t\t }\n\t\t ?>\n\t\t <tr>\n\t\t <td>\n\t\t <div style=\"padding: 0; margin: 0; width: 100%;<? if ($this->height > 0) { ?> height: <?echo $this->height?>px;<? } ?><?if ($this->scroll) echo \"overflow: auto\"?>\">\n<?\n\t\t$this->writeNodes();\n?>\n\t\t </div>\n\t\t </td>\n\t\t </tr>\n\t\t</table>\n<?\n\t\t$_activeTree = null;\n\t}", "function renderTree($item, $offset, $depth, $options) {\n global $Core;\n global $Router;\n \n # Core::Dump(array($item, $offset, $depth, $options));\n\n $attribs = array();\n $sublist = '';\n $active = $options['show_all'] ? true : $item->isActive();\n\n if ($active && $item->hasChildren() && ($offset + $depth + 1) > 0) {\n\n $n=0;\n foreach ($item->getChildren() as $child) {\n $subListOptions = $options;\n if ($offset === -1) {\n $subListOptions['li_class'] = '';\n $subListOptions['a_class'] = '';\n if ($n == 0) {\n $subListOptions['li_class'] .= ' firstChild';\n }\n if ($n == count($item->getChildren())-1) {\n $subListOptions['li_class'] .= ' lastChild';\n }\n $subListOptions['li_class'] = trim($subListOptions['li_class']);\n }\n $sublist .= $this->renderTree($child, $offset-1, $depth-1, $subListOptions);\n $n++;\n }\n\n if (is_null($item->get('title')) || $offset > 0) return $sublist;\n\n $sublist = HtmlUtils::tag(\n 'div',\n array(\n 'class' => Filter::get(\n $options, \n 'submenu_class', \n $DEFAULT_OPTIONS['submenu_class']\n )),\n HtmlUtils::tag(\n 'ul',\n array(),\n $sublist\n )\n );\n }\n\n if ($offset > 0) return '';\n\n // add css class 'active' to the LI containing current link\n \n if (Filter::get($options, 'li_class', $DEFAULT_OPTIONS['li_class'])) {\n $attribs['class'] .= Filter::get($options, 'li_class', $DEFAULT_OPTIONS['li_class']);\n }\n if ($item->isActive()) {\n $attribs['class'] .= ($attribs['class'] ? ' ' : '') . Filter::get($options, 'active_class');\n }\n \n // don't create a to the page we're currently viewing\n\n $attrs = array('href' => $Router->GetLink($item->get('id')));\n if ($item->get('id') == DEFAULT_PAGE) {\n $attrs['class'] = 'home';\n $attrs['class'] .= ($attrs['class'] ? ' ' : '') . Filter::get($options, 'active_class');\n }\n if (Filter::get($options, 'a_class', $DEFAULT_OPTIONS['a_class'])) {\n $attrs['class'] .= ($attrs['class'] ? ' ' : '') . Filter::get($options, 'a_class', $DEFAULT_OPTIONS['a_class']);\n }\n $link = HtmlUtils::tag(\n 'a',\n $attrs,\n HtmlUtils::tag(\n 'span',\n array('class'=>'linktext'),\n ucwords($item->get('title'))\n )\n );\n\n return HtmlUtils::tag('li', $attribs, \"{$link}\\n\" . $sublist);\n }", "public function treeUl($list) {\n $output = '';\n if (is_array($list) || $list instanceof Iterator) {\n if (count($list) > 0) {\n $output = \"<ul>\\n\";\n foreach ($list as $item) {\n $output .= \"\\t<li>\";\n if(is_string($item)) {\n $output .= $this->_view->escape($item);\n } else {\n $output .= $this->treeUl($item);\n }\n $output .= \"</li>\\n\";\n }\n $output .= \"</ul>\\n\";\n }\n }\n return $output;\n }", "public function toHtml() {\n\t\techo '<mark '.$this->getAttributes().'>'.$this->renderChildren().'</mark>';\n\t}", "function print_tree(tree $t, $with_id=false) {\n // $root = tree_to_treenode($t);\n print_treenode($t, null, 0, $with_id);\n}", "protected function _buildTree($id)\n {\n return '';\n }", "function _splurgh_do_node($map,$node,$chain,&$fulltable,$nest)\n{\n\t$fulltable[$node]=1;\n\n\t$title=$map[$node]['title'];\n\t$children=$map[$node]['children'];\n\n\t$out=strval($node).'!'.str_replace('[','&#91;',str_replace(']','&#93;',str_replace(',','&#44;',$title))).',';\n\tif (count($children)>0)\n\t{\n\t\t$out.='[';\n\t\tforeach ($children as $child)\n\t\t{\n\t\t\tif ((!array_key_exists($child,$fulltable)) && (array_key_exists($child,$map)))\n\t\t\t\t$out.=_splurgh_do_node($map,$child,$chain.strval($node).'~',$fulltable,$nest+1);\n\t\t}\n\t\t$out.='],';\n\t}\n\n\treturn $out;\n}", "public function init()\n\t{\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$id=$this->htmlOptions['id']=$this->getId();\n\t\tif($this->url!==null)\n\t\t\t$this->url=CHtml::normalizeUrl($this->url);\n\t\t$cs=Yii::app()->getClientScript();\n\t\t$cs->registerCoreScript('treeview');\n\t\t$options=$this->getClientOptions();\n\t\t$options=$options===array()?'{}' : CJavaScript::encode($options);\n\t\t$cs->registerScript('Yii.CTreeView#'.$id,\"jQuery(\\\"#{$id}\\\").treeview($options);\");\n\t\tif($this->cssFile===null)\n\t\t\t$cs->registerCssFile($cs->getCoreScriptUrl().'/treeview/jquery.treeview.css');\n\t\telseif($this->cssFile!==false)\n\t\t\t$cs->registerCssFile($this->cssFile);\n\n\t\techo CHtml::tag('ul',$this->htmlOptions,false,false).\"\\n\";\n\t\techo self::saveDataAsHtml($this->data);\n\t}", "function makeComplexTreeScripts()\n{\n static $already=false;\n if($already) return; else $already=true;\n $script=basename($_SERVER[\"PHP_SELF\"]);\n $plusimage=\"$script?action=image&image=treeplus\";\n $minusimage=\"$script?action=image&image=treeminus\";\n echo \"<style type=\\\"text/css\\\">\\r\\n\";\n echo \"td.complextreeplus { background-image:url($plusimage); }\\r\\n\";\n echo \"td.complextreeminus { background-image:url($minusimage); }\\r\\n\";\n echo \"div.complextreevisible { visibility:visible; display:block; }\\r\\n\";\n echo \"div.complextreehidden { visibility:hidden; display:none; }\\r\\n\";\n echo \"</style>\\r\\n\";\n echo \"<script type=\\\"text/javascript\\\">\\r\\n\";\n echo \"var complextreedata=new Array();\\r\\n\";\n echo \"function complextreeclick(id)\\r\\n\";\n echo \"{\\r\\n\";\n echo \" var obj=document.all[\\\"complextreeswitch\\\"+id];\\r\\n\";\n echo \" if(obj) if(obj.className==\\\"complextreeplus\\\")\\r\\n\";\n echo \" obj.className=\\\"complextreeminus\\\";\\r\\n\";\n echo \" else obj.className=\\\"complextreeplus\\\";\\r\\n\";\n echo \" var obj=document.all[\\\"complextreeblock\\\"+id];\\r\\n\";\n echo \" if(obj) if(obj.className==\\\"complextreevisible\\\")\\r\\n\";\n echo \" obj.className=\\\"complextreehidden\\\";\\r\\n\";\n echo \" else obj.className=\\\"complextreevisible\\\";\\r\\n\";\n echo \"}\\r\\n\";\n echo \"function complextreeaction(action, treeindex)\\r\\n\";\n echo \"{\\r\\n\";\n echo \" if(!treeindex) treeindex=0;\\r\\n\";\n echo \" ids=complextreedata[treeindex];\\r\\n\";\n echo \" if(!ids[0] || !ids[1]) return;\\r\\n\";\n echo \" for(id=ids[0]; id<=ids[1]; id++) {\\r\\n\";\n echo \" var obj=document.all[\\\"complextreeswitch\\\"+id];\\r\\n\";\n echo \" if(action==\\\"expand\\\" && obj.className==\\\"complextreeplus\\\") complextreeclick(id);\\r\\n\";\n echo \" if(action==\\\"contract\\\" && obj.className==\\\"complextreeminus\\\") complextreeclick(id);\\r\\n\";\n echo \" }\\r\\n\";\n echo \"}\\r\\n\";\n echo \"</script>\\r\\n\";\n}", "public function recursive_render($id, $node)\n {\n }", "function wp_print_theme_file_tree($tree, $level = 2, $size = 1, $index = 1)\n {\n }", "private function setTreeOutput(){\n \n $item = $this->item;\n \n $treeoutput = NULL;\n $menuname = NULL;\n $parameters = NULL;\n \n $menutree = \\Drupal::menuTree();\n \n if($item->menu_name == 'active-menu'){\n \n $menuname = $this->getCurrentMenuName();\n \n if($menuname)\n $parameters = $menutree->getCurrentRouteMenuTreeParameters($menuname);\n \n }else{\n $parameters = new MenuTreeParameters();\n $parameters->root = $item->menu_plid;\n $menuname = $item->menu_name;\n }\n \n \n if($parameters && $menuname){\n \n $parameters->setMaxDepth($item->menu_level);\n\n $tree = $menutree->load($menuname, $parameters);\n $treeoutput = $menutree->build($tree);\n \n }\n \n $this->treeoutput = $treeoutput;\n }", "function get_categories_tree()\n\t\t{\n\t\t\t$where = '';\n\t\t\t$is_accessory = FSInput::get('is_accessory',0,'int');\n\t\t\tif($is_accessory){\n\t\t\t\t$where .= ' AND is_accessories = 0 ';\n\t\t\t} else {\n\t\t\t\t$where .= ' AND is_accessories = 1 ';\n\t\t\t}\n\t\t\t\n\t\t\tglobal $db ;\n\t\t\t$sql = \" SELECT id, name, parent_id AS parentid \n\t\t\t\tFROM fs_products_categories \n\t\t\t\tWHERE 1 = 1\n\t\t\t\t\".$where;\n\t\t\t// $db->query($sql);\n\t\t\t$categories = $db->getObjectList($sql);\n\t\t\t\n\t\t\t$tree = FSFactory::getClass('tree','tree/');\n\t\t\t$rs = $tree -> indentRows($categories,1); \n\t\t\treturn $rs;\n\t\t}", "protected function htmllize_document_tree($context, $block_context, $dir) {\n\n global $CFG;\n\n $result = '';\n\n $yuiconfig = array();\n $yuiconfig['type'] = 'html';\n\n if (empty($dir['subdirs']) and empty($dir['files'])) {\n return '';\n }\n $result = '<ul>';\n foreach ($dir['subdirs'] as $subdir) {\n $image = $this->output->pix_icon(\"f/folder\", $subdir['dirname'], 'moodle', array('class'=>'icon'));\n $result .= '<li yuiConfig=\\''.json_encode($yuiconfig).'\\'><div>'.$image.s($subdir['dirname']).'</div> '.$this->htmllize_document_tree($context, $block_context, $subdir).'</li>';\n }\n foreach ($dir['files'] as $file) {\n $url = file_encode_url(\"$CFG->wwwroot/pluginfile.php\", '/'.$context->id.'/block_module_info/documents/'.$block_context->id.$file->get_filepath().$file->get_filename(), true);\n $filename = $file->get_filename();\n $icon = mimeinfo(\"icon\", $filename);\n $image = $this->output->pix_icon(\"f/$icon\", $filename, 'moodle', array('class'=>'icon'));\n $result .= '<li yuiConfig=\\''.json_encode($yuiconfig).'\\'><div>'.html_writer::link($url, $image.$filename).'</div></li>';\n }\n $result .= '</ul>';\n\n return $result;\n }", "function get_menu_tree($parent_id) \n\t\t{\n\t\t\tinclude_once('connection.php');\n \t$obj=new connection();\n \t$obj->connect();\n\t\t\t$menu='';\n\t\t\t$obj->sql=\"SELECT * FROM register where referral_code='\".$parent_id.\"'\";\n\t\t\t$obj->select($obj->sql);\n\t\t\t//$no1=mysqli_num_rows($obj->res);\n\t\t\twhile($rows1=mysqli_fetch_array($obj->res))\n\t\t\t{\n\t\t\t\t//$rows1=mysqli_fetch_array($obj->res);\n\t\t\t\t$menu.=\"<li>\". $rows1['name'];\n\t\t\t\t$menu.=\"<ul>\".get_menu_tree($rows1['rid']).\"</ul>\";\n\t\t\t\t$menu.=\"</li>\";\n\t\t\t}\n\t\t\treturn $menu;\n\t\t}", "function makeList($array) \n { \n //Base case: an empty array produces no list \n if (empty($array)) return '';\n\n //Recursive Step: make a list with child lists \n $output = '<ol class=\"dd-list\">'; \n foreach ($array as $key => $subArray) { \n $output .= '<li class=\"dd-item dd3-item\" data-id=\"' . $subArray['ID'] .'\">\n\t\t\t\t\t\t\t\t\t<div class=\"dd-handle dd3-handle\" >&nbsp;</div>\n\t\t\t\t\t\t\t\t\t<div class=\"dd3-content\" >' . $subArray['Title'] .'</div>'. makeList($subArray['children']) . '\n\t\t\t\t\t\t</li>'; \n } \n $output .= '</ol>'; \n \n return $output; \n }", "function getTagTreeXML() {\n $result = '';\n $tagObj = $this->getBaseTags();\n\n if ($this->params['cat_id'] > 0) {\n $this->category = $tagObj->getCategory(\n $this->params['cat_id'],\n $this->lngSelect->currentLanguageId\n );\n $parentPath = PapayaUtilArray::decodeIdList($this->category['parent_path']);\n $parentId = (int)array_pop($parentPath);\n $preParentId = (int)array_pop($parentPath);\n $catIds = array(\n $this->category['parent_id'],\n $this->category['category_id'],\n $preParentId\n );\n } else {\n $parentId = 0;\n $preParentId = 0;\n $catIds = array(0);\n }\n if (!isset($this->category) ||\n $this->category['parent_id'] == 0 ||\n $preParentId == 0) {\n $selected = ($this->params['cat_id'] == 0) ? ' selected=\"selected\"' : '';\n $result .= sprintf(\n '<listitem title=\"%s\" href=\"%s\" image=\"%s\" node=\"empty\" %s/>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Base')),\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('cat_id' => 0))\n ),\n papaya_strings::escapeHTMLChars($this->images['items-folder']),\n $selected\n );\n }\n if ($preParentId != 0) {\n $result .= sprintf(\n '<listitem title=\"%s\" href=\"%s\" image=\"%s\"/>'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Parent category')),\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('cat_id' => $preParentId))\n ),\n papaya_strings::escapeHTMLChars($this->images['actions-go-superior'])\n );\n }\n if (isset($this->sessionParams['open_categories'])) {\n $catIds = array_merge($catIds, array_keys($this->sessionParams['open_categories']));\n }\n $this->categories = $tagObj->getSubCategories(\n $catIds,\n $this->lngSelect->currentLanguageId\n );\n $tagObj->loadCategoryCounts($this->categories);\n foreach ($this->categories as $categoryId => $category) {\n $this->categoryTree[(int)$category['parent_id']][] = $categoryId;\n }\n $result .= $this->getXMLCategorySubTree((int)$preParentId, 1);\n return $result;\n }", "public function tree_list_html($view_path = NULL, $start_id = 0, $open_items = array(), $list_html = '')\n\t{\n\t\t$start = $this\n\t\t\t->where('parent_id', '=', $start_id)\n\t\t\t->find_all();\n\n\t\t$this->recurse_tree_list_html($start, $list_html, $view_path, $open_items);\n\t\t\n\t\treturn $list_html;\n\t}", "function buildMenu($parent_id, $menuData) \n{ \n $html = ''; \n\n if (isset($menuData['parents'][$parent_id])) \n { \n $html = '<ul>'; \n foreach ($menuData['parents'][$parent_id] as $itemId) \n { \n\t\t\t\n\t\t\tif ($menuData['items'][$itemId]['page_id'] != 0)\n\t\t\t{\n\t\t\t\t$link_page_id = $menuData['items'][$itemId]['page_id'];\n\t\t\t\t$html .= '<a href=\"index.php?pid='. $link_page_id;\n \t$html .= '\">';\n\t\t\t\t$html .= '<li>'. $menuData['items'][$itemId]['name']; \n\t\t\t\t$html .= '</a>'; \n\t\t\t\t$html .= '';\n\t // find childitems recursively \n\t $html .= buildMenu($itemId, $menuData); \n\n \t $html .= '</li>' ;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if ($menuData['items'][$itemId]['post_id'] != 0)\n\t\t\t{\n\t\t\t\t$html .= '<a href=\"#='.$menuData['items'][$itemId]['post_id'];\n\t $html .= '\">';\n\t\t\t\t$html .= '<li>'. $menuData['items'][$itemId]['name']; \n\t\t\t\t$html .= '</a>'; \n\t\t\t\t$html .= '';\n\t // find childitems recursively \n \t $html .= buildMenu($itemId, $menuData); \n\n \t $html .= '</li>' ;\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$html .= '<a href=\"'.$menuData['items'][$itemId]['link'];\n \t $html .= '\">';\n\t\t\t\t$html .= '<li>'. $menuData['items'][$itemId]['name']; \n\t\t\t\t$html .= '</a>'; \n\t\t\t\t$html .= '';\n \t// find childitems recursively \n\t $html .= buildMenu($itemId, $menuData); \n\t\n \t $html .= '</li>' ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n } \n $html .= '</ul>'; \n } \n\n return $html; \n}", "public function render()\n {\n $fromListTree = array();\n $this->getFromListTree($fromListTree);\n $style = $this->getStyle();\n $func = $this->getFunction();\n $valueList = array(); $valueArray = array();\n $this->getFromList($valueList, $this->getSelectedList());\n foreach ($valueList as $vl) {\n $valueArray[] = $vl['val'];\n }\n $sHTML = \"<script>\n \t\t\t\tvar \".$this->m_Name.\"_optlist = new Array(); \n \t\t\t\tvar \".$this->m_Name.\"_optlist_default = new Array();\n \t\t\t</script>\";\n $sHTML .= \"<div name=\\\"\" . $this->m_Name . \"\\\" ID=\\\"\" . $this->m_Name .\"\\\" $this->m_HTMLAttr $style>\";\n\t\t$sHTML .= \"<ul>\";\n\t\t$i = 0;\n foreach ($fromListTree as $treeNode)\n {\n\n //$sHTML .= \"<input type=\\\"checkbox\\\" name=\\\"\".$this->m_Name.\"[]\\\" VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr></input>\" . $option['txt'] . \"<br/>\";\n $sHTML .= \"<li style=\\\"padding-top:10px;\\\">\".str_repeat(\"-&nbsp;-&nbsp;\", $treeNode[\"level\"]).\"<strong>\".$treeNode['txt'].\"</strong>\".\"</li>\";\n $sublist = array();\n $this->getDOFromList($sublist, $this->getSelectFrom().\",[folder_id]='\".$treeNode['id'].\"'\");\n foreach($sublist as $option){\n $test = array_search($option['val'], $valueArray);\n\t if ($test === false)\n\t {\n\t $selectedStr = '';\n\t }\n\t else\n\t {\n\t $selectedStr = \"CHECKED\";\n\t $sHTML .= \"<script>\".$this->m_Name.\"_optlist_default.push('\".$this->m_Name.\"_\".$i.\"'); </script>\";\n\t } \t\n \t$sHTML .= \"<li><label style=\\\"float:none;color:#888888;display:inline;\\\">\".str_repeat(\"-&nbsp;-&nbsp;\", $treeNode[\"level\"]).\"<input type=\\\"checkbox\\\" id=\\\"\".$this->m_Name.\"_\".$i.\"\\\" name=\\\"\".$this->m_Name.\"[]\\\" VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr></input>\" . $option['txt'] . \"</label></li>\";\n \t$sHTML .= \"<script>\".$this->m_Name.\"_optlist.push('\".$this->m_Name.\"_\".$i.\"'); </script>\";\n \t$i++;\n }\n \n }\n $sHTML .= \"</ul></div>\";\n return $sHTML;\n }", "function makeTree($uid, $add_content, $mode) {\n\t\tglobal $add_content;\n\t\t//Execute query depending on mode\n\t\tif ($mode == 'circumstance_tree' || $mode == 'usergroup_tree') {\n\t\t\t$temp_enablefields1 = str_replace('tx_civserv_navigation', 'nv1', $this->cObj->enableFields('tx_civserv_navigation'));\n\n\t\t\t$temp_enablefields2 = str_replace('tx_civserv_navigation', 'nv2', $this->cObj->enableFields('tx_civserv_navigation'));\n\n\t\t\t// we need double quotation marks here!!! because of the single quotation marks within $temp_enablefields1 and $temp_enablefields2\n\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t\t\t\"nv1.uid as uid,\n\t\t\t\t\t\t\t\t nv1.nv_name as name\",\n\t\t\t\t\t\t\t\t\"tx_civserv_navigation as nv1,\n\t\t\t\t\t\t\t\t tx_civserv_navigation_nv_structure_mm as nvmm,\n\t\t\t\t\t\t\t\t tx_civserv_navigation as nv2\",\n\t\t\t\t\t\t\t\t\"1 \".\n\t\t\t\t\t\t\t\t$temp_enablefields1.\n\t\t\t\t\t\t\t\t$temp_enablefields2.\n\t\t\t\t\t\t\t\t\" AND nv1.uid = nvmm.uid_local\n\t\t\t\t\t\t\t\t AND nv1.uid = nvmm.uid_local\n\t\t\t\t\t\t\t\t AND nv2.uid = nvmm.uid_foreign\n\t\t\t\t\t\t\t\t AND nv2.uid = \" . intval($uid) ,\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\"\");\n\t\t}\n\t\t// test bk: add organisational code\n\t\tif($this->conf['displayOrganisationCode']){\n\t\t\t$orderby='or1.or_code, or1.sorting';\n\t\t}else{\n\t\t\t$orderby='or1.sorting, or2.sorting';\n\t\t}\n\t\tif ($mode == 'organisation_tree') {\n\t\t\t$temp_enablefields1 = str_replace('tx_civserv_organisation', 'or1', $this->cObj->enableFields('tx_civserv_organisation'));\n\n\t\t\t$temp_enablefields2 = str_replace('tx_civserv_organisation', 'or2', $this->cObj->enableFields('tx_civserv_organisation'));\n\n\t\t\t// we need double quotation marks here!!! because of the single quotation marks within $temp_enablefields1 and $temp_enablefields2\n\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t\t\t\"or1.uid as uid,\n\t\t\t\t\t\t\t\t or1.or_code as code,\n\t\t\t\t\t\t\t\t or1.or_name as name\",\n\t\t\t\t\t\t\t\t\"tx_civserv_organisation as or1,\n\t\t\t\t\t\t\t\t tx_civserv_organisation_or_structure_mm as ormm,\n\t\t\t\t\t\t\t\t tx_civserv_organisation as or2\",\n\t\t\t\t\t\t\t\t\"1 \".\n\t\t\t\t\t\t\t\t $temp_enablefields1.\n\t\t\t\t\t\t\t\t $temp_enablefields2.\n\t\t\t\t\t\t\t\t \" AND or1.uid = ormm.uid_local\n\t\t\t\t\t\t\t\t AND or2.uid = ormm.uid_foreign\n\t\t\t\t\t\t\t\t AND or2.uid = \" . intval($uid) ,\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t$orderby,\n\t\t\t\t\t\t\t\t\"\");\n\n\t\t}\n\t\t//Check if query returned any results\n\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {\n\t\t\t$add_content = $add_content . '<ul>';\n\t\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {\n\t\t\t\t$uid = $row['uid']; // or1 res. nv1\n\t\t\t\t$makelink=false;\n\t\t\t\tif($this->conf['no_link_empty_nv']){\n#\t\t\t\t\tdebug('no_link_empty_nv gesetzt!');\n\t\t\t\t}else{\n#\t\t\t\t\tdebug('no_link_empty_nv NICHT gesetzt!');\n\t\t\t\t}\n\t\t\t\t$res_connected_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t'tx_civserv_service.sv_name',\n\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t'tx_civserv_service_sv_navigation_mm',\n\t\t\t\t\t\t'tx_civserv_navigation',\n\t\t\t\t\t\t'AND tx_civserv_service_sv_navigation_mm.uid_foreign = '. intval($uid), //just in case\n\t\t\t\t\t\t'');\n\t\t\t\tswitch ($mode) {\n\t\t\t\t\tcase 'circumstance_tree':\n\t\t\t\t\t\t$link_mode = 'circumstance';\n\t\t\t\t\t\tif(($GLOBALS['TYPO3_DB']->sql_num_rows($res_connected_services) < 1) && $this->conf['no_link_empty_nv']){\n\t\t\t\t\t\t\t$makelink = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$makelink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'usergroup_tree':\n\t\t\t\t\t\t$link_mode = 'usergroup';\n\t\t\t\t\t\tif(($GLOBALS['TYPO3_DB']->sql_num_rows($res_connected_services) < 1) && $this->conf['no_link_empty_nv']){\n\t\t\t\t\t\t\t$makelink = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$makelink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'organisation_tree':\n\t\t\t\t\t\t$link_mode = 'organisation';\n\n\t\t\t\t\t\t$makelink = true; // we want detail-information to all organisations\n/*\n// no! we want detail-information to all organisations - not only to those who offer services.....\n\t\t\t\t\t\t$res_connected_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t\t\t'tx_civserv_service.sv_name',\n\t\t\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t\t\t'tx_civserv_service_sv_organisation_mm',\n\t\t\t\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t\t\t\t'AND tx_civserv_service_sv_organisation_mm.uid_foreign = '.intval($uid),\n\t\t\t\t\t\t\t\t'');\n*/\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($this->conf['hide_empty_nv'] && $makelink == false){\n\t\t\t\t\t$this->makeTree($uid, $add_content, $mode);\n\t\t\t\t}else{\n\t\t\t\t\t$add_content .= '<li>';\n\t\t\t\t\t$add_content .= $makelink ? '<a href=\"' . htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => $link_mode,id => $row['uid']),1,1)) . '\">' : '';\n\t\t\t\t\t// test bk: add organisational code\n\t\t\t\t\tif($this->conf['displayOrganisationCode'] && !($mode=='usergroup_tree' || $mode=='circumstance_tree')){\n\t\t\t\t\t\t$add_content .= $row['code'].' '.$row['name'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$add_content .= $row['name'];\n\t\t\t\t\t}\n\t\t\t\t\t$add_content .= $makelink ? '</a>': '';\n\t\t\t\t\t$this->makeTree($uid, $add_content, $mode);\n\t\t\t\t\t$add_content .= \"</li>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$add_content = $add_content . \"</ul>\\n\";\n\t\t}\n\t\treturn $add_content;\n\t}", "function latto_menu_tree__menu_block__1($vars) { \n return '<ul class=\"main-menu nav nav-inline\">' . $vars['tree'] . '</ul>';\n}", "public function renderDirectories() {\r\n\t\t$treeData = array();\r\n\t\tlist($name, $id) = $this->resolveNameID();\r\n\t\t$htmlOptions = array(\r\n\t\t\t\"class\" => \"filetree\",\r\n\t\t\t\"id\" => $id.\"-directories\"\r\n\t\t);\r\n\t\t\r\n\t\tforeach((is_array($this->basePath) ? $this->basePath : array($this->basePath)) as $path) {\r\n\t\t\t$item = array(\r\n\t\t\t\t\"text\" => \"<span class='folder'>\".basename($path).\"</span>\",\r\n\t\t\t\t\"id\" => md5($path),\r\n\t\t\t\t\"children\" => $this->directoryTreeviewData($path),\r\n\t\t\t\t\"expanded\" => false,\r\n\t\t\t);\r\n\t\t\t$checkboxId = $this->getId().\"_\".$item['id'];\r\n\t\t\t$item['text'] = CHtml::tag(\r\n\t\t\t\t\t\t\"span\",\r\n\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\"class\" => \"folder\"\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t($this->multiple ? \r\n\t\t\t\t\t\t\tCHtml::activeCheckbox($this->model,$this->attribute.\"[\".$item['id'].\"]\",array(\"id\" => $checkboxId))\r\n\t\t\t\t\t\t\t:\r\n\t\t\t\t\t\t\tCHtml::activeRadioButton($this->model,$this->attribute,array(\"id\" => $checkboxId, \"value\" => $item['id']))\r\n\t\t\t\t\t\t).\r\n\t\t\t\t\t\tCHtml::label(basename($path),$checkboxId)\r\n\t\t\t\t\t);\r\n\t\t\t$treeData[] = $item;\r\n\t\t\t\r\n\t\t}\r\n\t\tob_start();\r\n\t\t$this->widget(\"CTreeView\",array(\r\n\t\t\t\"htmlOptions\" => $htmlOptions,\r\n\t\t\t\"data\" => $treeData\r\n\t\t));\r\n\t\t$html = ob_get_clean();\r\n\t\treturn $html;\r\n\t}", "public function actionAjaxFillTree()\n {\n \t$this->allowUser(SUPERADMINISTRATOR);\n // accept only AJAX request (comment this when debugging)\n if (!Yii::app()->request->isAjaxRequest) {\n exit();\n }\n // parse the user input\n $parentId = \"NULL\";\n if (isset($_GET['root']) && $_GET['root'] !== 'source') {\n $parentId = (int) $_GET['root'];\n }\n // read the data (this could be in a model)\n $children = Yii::app()->db->createCommand(\n \"SELECT m1.id, m1.name AS text, m2.id IS NOT NULL AS hasChildren \"\n . \"FROM cms_term AS m1 LEFT JOIN cms_term AS m2 ON m1.id=m2.parent_id \"\n . \"WHERE m1.parent_id <=> $parentId \"\n . \"GROUP BY m1.id ORDER BY m1.order ASC\"\n )->queryAll();\n\t\t\n\t\t$cnt = 0;\n\t\tforeach ($children as $child){\n\t\t//\tif ($child['hasChildren']==0) {\n\t\t//\t\t$children[$cnt]['text'] = '<a href='.Yii::app()->baseUrl.'\"/backend.php/term/update/'.$child['id'].'\">'.$child['text'].'</a>';\n\t\t//\t} else {\n\t\t\t\n\t\t\t\t$children[$cnt]['text'] = $child['text']\n\t\t\t\t.'<a href='.Yii::app()->baseUrl.'\"/backend.php/term/update/'.$child['id'].'\"> '.TbHtml::icon(TbHtml::ICON_PENCIL)\n\t\t\t\t.'</a> <a href='.Yii::app()->baseUrl.'\"/backend.php/TermDescription/update/'.$child['id'].'\"> '.TbHtml::icon(TbHtml::ICON_EDIT).'</a>';\n\t\t\t$cnt++;\t\n\t\t}\n\t\t\n\t\t\n echo str_replace(\n '\"hasChildren\":\"0\"',\n '\"hasChildren\":false',\n CTreeView::saveDataAsJson($children)\n );\n }", "abstract protected function getMenuTree();", "function categoryTree($id_parent= 0,$sub_mark =''){\n global $db;\n $query = $db->query(\"SELECT * FROM category WHERE id_parent = $id_parent ORDER BY name DESC \" );\n \n if ($query->num_rows > 0){\n while ($row = $query-> fetch_assoc()){\n \n echo '<option value=\"'.$row['id_c'].'\">'.$sub_mark.$row['name'].'</option>';\n \n categoryTree($row['id_c'],$sub_mark.'---');\n }\n \n }\n }", "public function showData(){\n echo \"<li>Data: \";\n if(gettype($this->data) == \"array\"){\n print_r(implode(', ', $this->data));\n }\n else{\n print_r($this->data);\n }\n echo \"</li>\";\n\n echo \"<ul><li>is a \".$this->type.\"</li>\"; // Print the type of the node\n\n if($this->parentNode != NULL){\n echo \"<li>Parent: \";\n if(gettype($this->parentNode->getData()) == \"array\"){\n print_r(implode(', ', $this->parentNode->getData()));\n }\n else{\n print_r($this->parentNode->getData());\n }\n\n echo \"</li>\";\n }\n else{\n echo \"<li>has no parent node.</li>\";\n }\n\n // echo \"<li>Children: </li>\";\n // // Show left child\n // if($this->childNodes[\"left\"] != NULL){\n // $d = $this->childNodes[\"left\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"L: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"L: \".$d.\"\\t\";\n // }\n //\n // }\n // // Show left-right child if we have it\n // if($this->childNodes[\"LR\"] != NULL){\n // $d = $this->childNodes[\"LR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"LR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"LR: \".$d.\"\\t\";\n // }\n // }\n //\n // // ... middle child\n // if($this->childNodes[\"mid\"] != NULL){\n // $d = $this->childNodes[\"mid\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"M: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"M: \".$d.\"\\t\";\n // }\n // }\n // // ... middle-right child\n // if($this->childNodes[\"MR\"] != NULL){\n // $d = $this->childNodes[\"MR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"MR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"MR: \".$d.\"\\t\";\n // }\n // }\n //\n // // ... right child\n // if($this->childNodes[\"right\"] != NULL){\n // $d = $this->childNodes[\"right\"]->getData();\n // if(gettype($d) == \"array\"){\n // echo \"R: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"R: \".$d.\"\\t\";\n // }\n // }\n // // ... right-right child\n // if($this->childNodes[\"RR\"] != NULL){\n // $d = $this->childNodes[\"RR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"RR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"RR: \".$d.\"\\t\";\n // }\n // }\n\n echo \"</ul>\";\n }", "function _encode_html($node, $map = null) {\n\tstatic $d = 0;\n\tstatic $mapper;\n\n\tif ($mapper === null && $map !== null) $mapper = $map;\n\n\tif (!isset($d) || $map !== null) {\n\t\t$d = -1;\n\t\treturn _encode_html(array('html' => array('body' => $node)));\n\t}\n\n\t$indent = str_repeat(\"\\t\", $d);\t// indent for pretty printing\n\n\tif (is_string($node)) return print \"\\n$indent$node\";\n\telseif (is_array($node)) {\n\n\t\t// descend into child nodes\n\n\t\t$d++;\n\t\tforeach ($node as $k => &$v) {\n\t\t\t$a = '';\n\n\t\t\tif (empty($k) || is_numeric($k))\n\t\t\t\t$k = 'li'; // assume lists are LIs\n\n\t\t\tif (is_callable($mapper))\n\t\t\t\t$k = $mapper($k, $v, $a, $d);\n\n\t\t\t// print node\n\n\t\t\tprint \"\\n$indent<$k$a>\";\n\t\t\t_encode_html($v); // recurse\n\t\t\tprint \"\\n$indent</$k>\";\n\t\t}\n\t\t$d--;\n\t}\n}", "function build_nav_tree($node ){ // term object\n\t\t\tglobal $pattern_cats, $currentcat;\n\t\t\t// any child categories? \n\t\t\t$children = get_terms( 'pattern_category', array('hierarchical' => 0, 'parent' => $node->term_id, 'fields' => 'ids'));\t\t\n\t\t\t$descendants = get_terms( 'pattern_category', array('hierarchical' => 0, 'child_of' => $node->term_id, 'fields' => 'ids'));\n\t\t\t\n\t\t\t//echo sizeof(array_intersect($product_terms, $descendants ));\n\t\t\t?> \n\t\t\t<li <? \n\t\t\tif (is_tax('pattern_category', $node->term_id)){ \n\t\t\t\t?> id=\"current\" <? \n\t\t\t} else if( \n\t\t\t\t\tis_singular() \n\t\t\t\t\t&& has_term( $node->term_id, 'pattern_category', $post ) \n\t\t\t\t\t&& sizeof(array_intersect($pattern_cats, $descendants )) == 0 ){ // parent of product\n\t\t\t\t?> class=\"parent\" <?\n\t\t\t} // end if else \n\t\t\t\n\t\t\t?> ><a href=\"<? echo get_term_link($node); ?>\"><span><? echo $node->name; ?><!--span class=\"count\">(<? echo $node->count; ?>) --></span></span></a> <?\n\t\t\t\n\t\t\t//echo \"children: \"; foreach($children as $term){ echo $term.','; }\t\n\t\t\t//echo \"<br/>descendants: \"; foreach($descendants as $term){ echo $term.','; }\n\t\t\t\n\t\t\t// if this is the current category or a single with child terms of this category\n\n\t\t\tif(\n\t\t\t\t\tis_tax('pattern_category', $node->term_id) \n\t\t\t\t\t|| sizeof(array_intersect($pattern_cats, $descendants)) > 0 \n\t\t\t\t\t|| in_array( $currentcat->term_id, $descendants) \n\t\t\t\t\t){ \n\t\t\t\t\n\t\t\t\tif(count($children) > 0 ){\n\t\t\t\t\t?> <ul> <?\n\t\t\t\t\tforeach ($children as $child) {\n\t\t\t\t\t\t build_nav_tree(get_term_by( 'id', $child, 'pattern_category' ));\n\t\t\t\t\t} \n\t\t\t\t\t?></ul> <? \n\t\t\t\t} \n\t\t\t} // end if current node\n\t\t\t?></li><?\n\t\t\t\t\n\t\t}", "function show_tree( $learn_pages, $parent_id, $level, $user_progress_pages, $user_logged, $pages_markers ) {\n\t$output = '';\n\n\tforeach ( $learn_pages as $page_parent_id => $page ) {\n\t\tif ( $page_parent_id == $parent_id ) {\n\n\t\t\tforeach ( $page as $page_id => $page_title ) {\n\t\t\t\t$total_markers = $pages_markers[ $page_id ]['total_markers'];\n\t\t\t\t$completed_markers = $pages_markers[ $page_id ]['completed_markers'];\n\n\t\t\t\t$real_progress = child_progress( $pages_markers, $page_id );\n\n\t\t\t\t$total_markers_out = $total_markers + $real_progress['total_markers'];\n\t\t\t\t$completed_markers_out = $completed_markers + $real_progress['completed_markers'];\n\t\t\t\t$current_progress = floor( ( $completed_markers_out / $total_markers_out ) * 10000 ) / 100;\n\t\t\t\tif ( ! $current_progress ) {\n\t\t\t\t\t$current_progress = 0;\n\t\t\t\t}\n\t\t\t\tif ( $current_progress == 100 ) {\n\t\t\t\t\t$class_completed = 'completed';\n\t\t\t\t} else {\n\t\t\t\t\t$class_completed = '';\n\t\t\t\t}\n\n\t\t\t\t$output .= '<div class=\"cl-learnnav-item level_' . $level . ' ' . $class_completed . '\" data-id=\"' . $page_id . '\"';\n\t\t\t\tif ( $user_logged ) {\n\t\t\t\t\t$output .= 'data-progress=\"' . $completed_markers . '/' . $total_markers . '\"';\n\t\t\t\t}\n\t\t\t\t$output .= '>' . \"\\n\";\n\t\t\t\t$output .= '<a class=\"cl-learnnav-item-anchor\" href=\"' . get_the_permalink( $page_id ) . '\">' . \"\\n\";\n\t\t\t\t$output .= $page_title . \"\\n\";\n\t\t\t\t$output .= '<span class=\"cl-learnnav-item-progress\">(' . $current_progress . '%)</span>' . \"\\n\";\n\t\t\t\t$output .= '</a>' . \"\\n\";\n\t\t\t\t$output .= show_tree( $learn_pages, $page_id, $level + 1, $user_progress_pages, $user_logged, $pages_markers );\n\t\t\t\t$output .= '</div>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $output;\n}", "public function toHtml() {\n\t\techo '<ol '.$this->getAttributes().'>'.$this->renderChildren().'</ol>';\n\t}", "static function tree($params = false)\n {\n $params = parse_params($params);\n @extract($params);\n\n if (!isset($dir_name)) {\n return 'Error: You must set $dir_name for the function ' . __FUNCTION__;\n }\n if (!empty($params)) {\n ksort($params);\n }\n\n $function_cache_id = __FUNCTION__ . crc32(serialize($params));\n $cache_content = false;\n //$cache_content = $this->app->cache->get($function_cache_id, 'content/static');\n\n if (($cache_content) != false) {\n\n $tree = $cache_content;\n } else {\n\n //$this->app->cache->save($tree, $function_cache_id, $cache_group = 'content/static');\n }\n if (!isset($url)) {\n $url = $this->app->url->current(true, true);\n }\n $params['url'] = $url;\n $params['url_param'] = 'page';\n\n\n mw('Microweber\\Utils\\Files')->dir_tree($dir_name, $params);\n\n\n }", "protected function _tree($array) {\n\n\t\t\t$root = array(\n\t\t\t\t'children' => array()\n\t\t\t);\n\t\t\t$current = &$root;\n\n\t\t\tforeach ($array as $i => $node) {\n\n\t\t\t\t$result = $this->_tag($node);\n\t\t\t\t\n\t\t\t\tif ($result) {\n\t\t\t\t\t\n\t\t\t\t\tif (isset($result['tag'])) {\n\t\t\t\t\t\t$tag = $result['tag'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tag = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($result['arguments'])) {\n\t\t\t\t\t\t$arguments = $result['arguments'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arguments = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag) {\n\t\t\t\t\t\t// If segment does not contain a closer\n\t\t\t\t\t\tif (!$result['closer']) {\n\t\t\t\t\t\t\t// clean up syntax if segment is isolated and \n\t\t\t\t\t\t\t// preceded by an plain text segment\n\t\t\t\t\t\t\t$last = ArrayMethods::last($current['children']);\n\t\t\t\t\t\t\tif ($result['isolated'] && is_string($last)) {\n\t\t\t\t\t\t\t\tarray_pop($current['children']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$current = &$current['children'][count($current['children']) - 1];\n\t\t\t\t\t\t} else if (isset($current['tag']) && $result['tag'] == $current['tag']) {\n\t\t\t\t\t\t\t$start = $current['index'] + 1;\n\t\t\t\t\t\t\t$length = $i - $start;\n\t\t\t\t\t\t\t$current['source'] = implode(array_slice($array, $start, $length));\n\t\t\t\t\t\t\t$current = &$current['parent'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$current['children'][] = $node;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $root;\n\t\t}", "function soho_menu_tree__header_menu($variables){\n return '<ul class=\"menu\" id=\"menu-main-menu\">' . $variables['tree'] . '</ul>';\n \n}", "protected function _renderTree(array $tree, $isTopLevel = false) {\n $html = '';\n\n // Check that populated tree provided\n if(!empty($tree)) {\n $html .= \"<ul>\\n\";\n\n // Iterate through each leaf within tree\n foreach($tree as $leaf) {\n // Prepare URL and question number\n $url = $this->view->url(array('token' => $this->_token, 'question' => $leaf['question_id']), 'compare_token');\n $questionId = $leaf['question_id'];\n $questionNo = $leaf['question_no'];\n $questionNo .= ($leaf['is_mapped'] === '1') ? ' [M]' : '';\n $questionText = $leaf['question_text'];\n $class = (isset($leaf['children'])) ? 'hasChildren' : 'noChildren';\n \n $html .= \"<li class='{$class} collapsed'>\\n\"; \n $html .= \"<a class='question' href='{$url}' title='{$questionText}'>{$questionNo}</a>\\n\";\n $html .= ($this->_isAsync && isset($leaf['children'])) ? \"<a class='showHide' href='#' rel='{$questionId}' title='Expand/collapse question tree'>Expand</a>\\n\" : '';\n\n // Process children of current leaf (if any)\n if(isset($leaf['children'])) {\n $html .= $this->_renderTree($leaf['children']);\n }\n\n $html .= \"</li>\\n\";\n }\n\n $html .= \"</ul>\\n\";\n }\n\n return $html;\n }", "public static function createXTree($array, $currentParent, $currLevel = 0, $prevLevel = -1) {\n \n if ( is_array($array) && count($array) > 0 ) {\n\n foreach ($array as $categoryId => $category) {\n\n if ($currentParent == $category['direct_parent_id']) {\t\t\t\t\t\t\n\n if($category['node_type'] == 1){\n $cbName = 'acl_module[]';\n $cbvalue = $category['name'].'##'.$categoryId;\n }elseif($category['node_type'] == 2){\n $cbName = $category['parents'][0]['name'].'_controller[]';\n $cbvalue = $category['name'].'##'.$categoryId;\n }elseif($category['node_type'] == 3){\n $cbName = $category['parents'][1]['name'].'_'.$category['parents'][0]['name'].'_method[]';\n $cbvalue = $category['name'].'##'.$categoryId;\n }\n\n if ($currLevel > $prevLevel) echo \" <ul> \\n\"; \n\n if ($currLevel == $prevLevel) echo \" </li> \\n\";\n\n echo '<li id=\"'.$categoryId.'\" rel=\"'.$currLevel.'\">\n <input type=\"checkbox\" class=\"events-child-category-all\" \n id=\"id-'.$categoryId.'\"\n name=\"'.$cbName.'\"\n value=\"'.$cbvalue.'\"\n '.$category['checked'].'\n style=\"margin-left:0px;\"\n />\n <span style=\"padding-left:5px;\">'.$category['display_name'].'</span>';\n\n if($category['node_type'] == 1 OR $category['node_type'] == 2)\n echo '<img src=\"' . asset('public/assets/plugins/xtree/images/16-circle-blue-add.png') . '\" alt=\"add subcategory\" width=\"16\" height=\"16\" class=\"add_category\"/>';\n //<img src=\"images/16-circle-red-remove.png\" alt=\"remove\" width=\"16\" height=\"16\" class=\"delete_category\"/>';\n\n if ($currLevel > $prevLevel) { $prevLevel = $currLevel; }\n\n $currLevel++; \n\n self::createXTree ($array, $categoryId, $currLevel, $prevLevel);\n\n $currLevel--;\t \t\t \t\n\n }\t\n\n }\n\n if ($currLevel == $prevLevel) echo \"\\n </li> \\n </ul> \\n\";\n } \n\n }", "function susy_menu_tree__main_menu($vars) {\n return '<ul class=\"menu inline clearfix\">' . $vars['tree'] . '</ul>';\n}", "function build_tree_table( $tree_id )\n\t{\n\t\n\t\t$fields = array(\n\t\t\t'node_id' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t => '8',\n\t\t\t\t'unsigned'\t\t => TRUE,\n\t\t\t\t'auto_increment' => TRUE,\n\t\t\t\t'null' => FALSE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t'lft' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint' => '8',\n\t\t\t\t'unsigned' =>\tTRUE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'rgt' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t=> '8',\n\t\t\t\t'unsigned'\t=>\tTRUE\n\t\t\t),\n\n\t\t\t'depth' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t=> '8',\n\t\t\t\t'unsigned'\t=>\tTRUE\n\t\t\t),\n\n\t\t\t'parent' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t=> '8',\n\t\t\t\t'unsigned'\t=>\tTRUE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'moved'\t=> array(\n\t\t\t\t'type' => 'tinyint',\n\t\t\t\t'constraint'\t=> '1',\n\t\t\t\t'null' => FALSE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t'label'\t=> array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '255'\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'entry_id' => array(\n\t\t\t\t'type' => 'int',\n\t\t\t\t'constraint' => '10', \n\t\t\t\t'null' => TRUE),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'template_path' => array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '255'\n\t\t\t),\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'custom_url' => array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '250', \n\t\t\t\t'null' => TRUE\n\t\t\t),\n\n\t\t\t'type' => array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '250', \n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'field_data' => array(\n\t\t\t\t'type' => 'text'\n\t\t\t)\t\t\t\n\t\t);\n\t\t\t\n\t\tee()->load->dbforge();\n\t\tee()->dbforge->add_field( $fields );\n\t\tee()->dbforge->add_key( 'node_id', TRUE );\n\t\tee()->dbforge->create_table( 'taxonomy_tree_'.$tree_id );\n\t\t\n\t\tunset($fields);\n\t\t\t\t\n\t}", "public static function display_tree($toolname, $items, $page_name=NULL, $active=NULL, $custom_callback=NULL, $admin=FALSE)\n\t{\t \n\t\t# start with an empty $right stack\n\t\t$right\t\t= array();\t\n\t\t# compare prev and current item nest positions\n\t\t$compare\t= array(0); \n\t\t$q\t\t\t= 1;\t\n\t\t# count how many unique ul lists there are\n\t\t$global_list_id\t= 0;\n\t\t\n\t\t# Display each row\n\t\tob_start();\n\t\tforeach ($items as $item) \n\t\t{\n\t\t\t# only check stack if there is one\n\t\t\tif (count($right) > 0)\n\t\t\t{\n\t\t\t\t# check if we should remove a node from the stack\n\t\t\t\twhile ($right[count($right)-1] < $item->rgt)\n\t\t\t\t\tarray_pop($right);\n\t\t\t}\n\t\t\t\n\t\t\t# these vars are used to compare level of new row to level of old row\n\t\t\t#so that we can built the ul/li list appropropriately. \n\t\t\t$new\t= $compare[$q]\t= count($right);\n\t\t\t$old\t= $compare[$q-1];\n\n\t\t\t# generate output for each node\n\t\t\t# $entry = call_user_func(\"render_node_$toolname\", $item, $page_name);\n\t\t\t$custom_callback = (empty($custom_callback))\n\t\t\t\t? \"render_node_$toolname\"\n\t\t\t\t: $custom_callback;\n\t\t\t\t\n\t\t\t$entry = call_user_func(array('Tree', $custom_callback), $item, $page_name, $active);\n\n\t\t\t/*\n\t\t\t * Output the list entries.\n\t\t\t * \tCase 1: New level = Old level OR is root level.\n\t\t\t *\t\telement is a sibling\n\t\t\t * \tCase 2: New Level != old level\n\t\t\t */\n\t\t\t\n\t\t\tif($new == $old)\n\t\t\t{\n\t\t\t\t# First element is always the root holder.\n\t\t\t\tif('1' == $q AND $admin)\n\t\t\t\t{\n\t\t\t\t\techo '<ul class=\"simpleTree\">',\"\\n\",'<li class=\"root\" id=\"item_'. $item->id .'\" rel=\"'. $item->id .'\"><span>(Root)</span>';\t\t\t\t\n\t\t\t\t\t# needed so simple_tree js has a place to add to an empty root.\n\t\t\t\t\tif('1' == count($items))\n\t\t\t\t\t\techo '<ul><li class=\"line\"></li></ul>';\n\t\t\t\t}\n\t\t\t\telseif('1' != $q)\n\t\t\t\t\techo \"</li>\\n$entry\";\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * IF level is higher then is a new UL depth.\n\t\t\t\t * IF level is lower then close old list \n\t\t\t\t * \t\tcount # of levels higher New is and close same # of </ul></li> to get there.\t\t\t\n\t\t\t\t * \t\tadd new.\n\t\t\t\t */\n\t\t\t\t \n\t\t\t\tif($new > $old)\n\t\t\t\t{\t\t\n\t\t\t\t\tfor($x = $old ; $x < $new; $x++)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\\n\".'<ul id=\"list_' . ++$global_list_id . '\">'.\"\\n\";\t\t\t\t\t\t\n\t\t\t\t\t\techo $entry;\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\techo \"</li>\\n\";\n\t\t\t\t\t\n\t\t\t\t\tfor($x = $new ; $x < $old; $x++)\n\t\t\t\t\t\techo \"\\n</ul></li>\\n\";\n\t\t\t\t\t\n\t\t\t\t\techo $entry;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t# add this node to the stack\n\t\t\t$right[] = $item->rgt;\n\t\t\t++$q;\n\t\t}\t\n\t\n\t\t# Get level of last \"NEW\" row\n\t\t# add that many closing tags for that many levels back to root\n\t\tfor($x = 0; $x < $new; $x++)\n\t\t\techo \"</li></ul>\\n\";\n\t\t\n\t\t# Close the root holder\n\t\tif($admin)\n\t\t\techo '</li></ul>';\n\t\n\t\treturn ob_get_clean();\n\t}", "function _create_selection_list_wiki_page_tree(&$wiki_seen, $select, $id, $breadcrumbs, $title, $use_compound_list = false, $ins_format = false)\n{\n $wiki_seen[] = $id;\n\n $sub_breadcrumbs = ($breadcrumbs == '') ? ($title . ' > ') : ($breadcrumbs . $title . ' > ');\n\n $rows = $GLOBALS['SITE_DB']->query_select('wiki_children', array('*'), array('parent_id' => $id), 'ORDER BY title', intval(get_option('general_safety_listing_limit'))/*reasonable limit*/);\n $compound_list = strval($id) . ',';\n $_below = new Tempcode();\n foreach ($rows as $i => $myrow) {\n if (!in_array($myrow['child_id'], $wiki_seen)) {\n if (!has_category_access(get_member(), 'wiki_page', strval($myrow['child_id']))) {\n continue;\n }\n\n if (is_null($myrow['title'])) {\n $temp_rows = $GLOBALS['SITE_DB']->query_select('wiki_pages', array('title'), array('id' => $myrow['child_id']), '', 1);\n $myrow['title'] = get_translated_text($temp_rows[0]['title']);\n $rows[$i]['title'] = $myrow['title'];\n $GLOBALS['SITE_DB']->query_update('wiki_children', array('title' => $myrow['title']), array('parent_id' => $id, 'child_id' => $myrow['child_id']));\n }\n $below = _create_selection_list_wiki_page_tree($wiki_seen, $select, $myrow['child_id'], $sub_breadcrumbs, $myrow['title'], $use_compound_list, $ins_format);\n if ($use_compound_list) {\n list($below, $_compound_list) = $below;\n $compound_list .= $_compound_list;\n }\n $_below->attach($below);\n }\n }\n\n /*$out = form_input_list_entry(strval($id), ($select == $id), do_template('WIKI_LIST_TREE_LINE', array('_GUID' => 'd9d4a951df598edd3f08f87be634965b', 'BREADCRUMBS' => $breadcrumbs, 'TITLE' => $title, 'ID' => $id)));\n $out = '<option value=\"' . (!$use_compound_list ? $id : $compound_list) . '\">' . $breadcrumbs . escape_html($title) . '</option>' . \"\\n\";\n $out .= $_below;*/\n $out = form_input_list_entry(((!$use_compound_list) ? strval($id) : $compound_list) . ($ins_format ? ('!' . $title) : ''), false, $breadcrumbs . $title);\n $out->attach($_below);\n\n if ($use_compound_list) {\n return array($out, $compound_list);\n } else {\n return $out;\n }\n}", "public function build_category_tree($output, $preselected, $parent=0, $indent=''){\t\n $this->db->select('category_id,category_name,parentid');\n $this->db->where('parentid',$parent); \n $sql = $this->db->get('category'); \n \n foreach ($sql->result_array() as $c)\n {\n $selected = ($c[\"category_id\"] == $preselected) ? \"selected=\\\"selected\\\"\" : \"\";\n $output .= \"<option value=\\\"\" . $c[\"category_id\"] . \"\\\" \" . $selected . \">\" . $indent . $c[\"category_name\"] . \"</option>\";\n if($c[\"category_id\"] != $parent){\n $this->crud_model->build_category_tree($output, $preselected, $c[\"category_id\"], $indent . \"&nbsp;&nbsp;\");\n } \n }\n return $sql->result_array();\n}", "function captogov_childtree($nid,$menu='main-menu') {\n $tree = menu_tree_all_data($menu);\n $mlid = db_select('menu_links' , 'ml')\n ->condition('ml.link_path', 'node/'.$nid)\n ->condition('ml.menu_name', $menu)\n ->fields('ml' , array())\n ->range(0, 1)\n ->execute()\n ->fetchAll();\n $mlidValue = $mlid[0]->mlid;\n $children = check_menu_array($tree, $mlidValue);\n $rendered_teasers = \"\";\n if(isset($children) && gettype($children) == \"array\") {\n foreach($children as $child){\n $nid = str_replace(\"node/\", \"\", drupal_get_normal_path($child['link']['link_path']));\n $child_nodes = node_view(node_load($nid), 'compact');\n $rendered_teasers .= render($child_nodes);\n }\n }\n return $rendered_teasers;\n}", "public function tree()\n {\n return view('EmployeeTreeview.index',['employees'=>$this->makeArray(Employees::getEmployeesAll())]);\n }", "public function show_graphical_tree($show_debug=FALSE)\n\t{\n\t\t$this->graph_debug = $show_debug;\n\t\t$indent_images = array();\n\n\t\t$ret = \"\n\t\t<div class='uclass_tree' style='height:16px'>\n\t\t\t<img src='\".UC_ICON_DIR.\"topicon.png' alt='class icon' style='vertical-align: bottom' />\n\t\t\t<span style='top:3px'></span>\n\t\t</div>\";\t\t// Just a generic icon here to provide a visual anchor\n\n\t\t$num_parents = count($this->class_parents);\n\t\tforeach ($this->class_parents as $p)\n\t\t{\n\t\t\t$num_parents--;\n\t\t\t$ret .= $this->show_graphical_subtree($p, $indent_images, ($num_parents == 0));\n\t\t}\n\t\treturn $ret;\n\t}", "protected function printTestTree(): void\n {\n echo ' Menu Structure '.\"\\n\";\n echo ' rt '.\"\\n\";\n echo ' / \\ '.\"\\n\";\n echo ' pt1 pt2 '.\"\\n\";\n echo ' / | \\ | '.\"\\n\";\n echo ' ch1 ch2 ch3 ch4 '.\"\\n\";\n echo ' | '.\"\\n\";\n echo ' gc1 '.\"\\n\";\n }" ]
[ "0.7783705", "0.77089906", "0.7677822", "0.75516206", "0.73858404", "0.73766494", "0.7345689", "0.73427516", "0.73416764", "0.73389906", "0.73219216", "0.7220168", "0.7026608", "0.6957263", "0.68549323", "0.67617875", "0.67403", "0.6728721", "0.6712435", "0.6696185", "0.667363", "0.6662853", "0.6639868", "0.6629459", "0.6599133", "0.65955305", "0.65385324", "0.65133464", "0.65112704", "0.65039974", "0.6498636", "0.64855546", "0.64798325", "0.6456953", "0.64520025", "0.6427337", "0.6424424", "0.64239895", "0.63943213", "0.63927555", "0.6375225", "0.6374279", "0.6367154", "0.63552535", "0.63466334", "0.6335539", "0.6334216", "0.63189113", "0.6308978", "0.6289128", "0.62870365", "0.6278594", "0.6262177", "0.6232477", "0.6221642", "0.62025255", "0.6186886", "0.61862254", "0.61811507", "0.6171842", "0.6154616", "0.615127", "0.6142586", "0.6116024", "0.6114803", "0.6114339", "0.61107934", "0.6105357", "0.60964054", "0.60865164", "0.60807836", "0.6079997", "0.6074522", "0.60689867", "0.60480225", "0.6027958", "0.6019078", "0.6015437", "0.6012145", "0.6006258", "0.600357", "0.6001285", "0.5998389", "0.59949887", "0.59884655", "0.5981568", "0.5981444", "0.5979652", "0.5979146", "0.5978817", "0.5977245", "0.59671426", "0.59545505", "0.5951969", "0.5948869", "0.5948077", "0.59412277", "0.59391105", "0.5936413", "0.5932489", "0.5930379" ]
0.0
-1
get company name as default string
public function __toString() { $name = $this->getName(); if (!is_string($name)) { return ""; } return $name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCompanyName() {\n \t$company = $this->getCompany();\n \treturn instance_of($company, 'Company') ? $company->getName() : lang('-- Unknown --');\n }", "public function company(): string\n {\n return $this->getData('CompanyName');\n }", "public function getCompany_name()\n {\n return $company_name;\n }", "public function getCompanyName() {\n\t\treturn $this->company_name; \n\t}", "public function getCompanyName()\n {\n return $this->company_name;\n }", "public function getCompanyName()\n {\n return $this->getProperty(\"CompanyName\");\n }", "public function getCompanyName() {\n\n return $this->company_name;\n\n }", "public function getCompanyName()\r\n {\r\n return $this->companyName;\r\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyName()\n {\n return $this->companyName;\n }", "public function getCompanyNameIdentifier()\n {\n return 'company_name';\n }", "public function getCompanyFieldDefault ()\n {\n $companyDefault = $this->scopeConfig->getValue(\n 'customer/address/company_show',\n ScopeInterface::SCOPE_STORE\n );\n return $companyDefault;\n }", "public function getCompanyName() {\n return $this->getName();\n }", "public function getCompanyName() \n\t{\n\t return $this->companyName;\n\t}", "public function getCompanyName(): ?string\n {\n return $this->CompanyName;\n }", "public function getCompany(): ?string\n {\n return $this->_company;\n }", "public function getUserVisibleName(){\n $info = $this->getInfo();\n\n if (isset($info[\"nombre\"])) {\n return $info[\"nombre\"];\n }\n\n error_log(\"no name for company {$this->getUID()}\");\n return \"\";\n }", "public function getCompanyNameAttribute() {\n\t\treturn $this->company_name;\n\t}", "public function getCompanyShortName()\n {\n return $this->companyShortName;\n }", "public function getReadableCompanyNameAttribute()\n {\n if ($this->company_id){\n $company = Company::find($this->company_id);\n $companyName = $company->name;\n return $companyName;\n }else{\n return null;\n }\n\n }", "public function publicName()\n {\n if($this->type === 'natural_person') {\n return $this->first_name . ' ' . $this->last_name;\n }\n\n return $this->company_name;\n }", "function get_company_name($userid, $prevent_empty_company = true)\n{\n $_userid = get_client_user_id();\n if ($userid !== '') {\n $_userid = $userid;\n }\n $CI =& get_instance();\n $CI->db->where('userid', $_userid);\n $client = $CI->db->select(($prevent_empty_company == false ? 'CASE company WHEN \"\" THEN (SELECT CONCAT(firstname, \" \", lastname) FROM tblcontacts WHERE userid = tblclients.userid and is_primary = 1) ELSE company END as company' : 'company'))->from('tblclients')->get()->row();\n if ($client) {\n return $client->company;\n } else {\n return '';\n }\n}", "public function get_company() \n {\n return $this->company;\n }", "public static function defaultAppName():string {\n\n # Set result\n $result = \"Crazy Project\";\n\n # Get current app path\n $appPath = File::path(\"@app_root\");\n\n # Check app path\n if($appPath){\n\n # Set composer path\n $conposerAppPath = \"$appPath/composer.json\";\n\n # Check composer name\n if(File::exists($conposerAppPath) && ($composerName = Composer::get(\"name\", $conposerAppPath)) !== null)\n\n # Set result\n $result = $composerName;\n\n else\n\n # Extract name from app path\n $result = Strings::getLastString(trim($appPath, \"/\"), \"/\");\n\n }\n\n # Then add space before capital letters\n $result = Process::spaceBeforeCapital($result);\n\n # Return result\n return $result;\n\n }", "public function defaultName() { return \"Enter the category name...\"; }", "public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}", "protected static function default_name(): mixed\n\t{\n\t\treturn self::$query->default_name;\n\t}", "public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }", "public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }", "function wac_vendor_company($user){\n\t$company = get_user_meta($user->ID,'_vendor_company',true);\n\tif(!empty($company)){\n\t\treturn $company;\n\t}\n\t\n\treturn wac_vendor_name($user);\n}", "public function getCompany()\n {\n return $this->getParameter('billingCompany');\n }", "public function getCompany() {}", "function get_site_name() {\n\t// Check the Altis config first.\n\t$site_name = has_altis_config() ? Altis\\get_config()['hm-juicer']['juicer-site-name'] : false;\n\tif ( ! empty( $site_name ) ) {\n\t\treturn $site_name;\n\t}\n\n\t// Check the JUICER_SITE_NAME constant and return it if it exists.\n\tif ( defined( 'JUICER_SITE_NAME' ) ) {\n\t\treturn JUICER_SITE_NAME;\n\t}\n\n\t// Return the option, if it exists.\n\treturn Settings\\juicer_get_option( 'JUICER_SITE_NAME', false );\n}", "function company_name_meta() {\n echo '<li class=\"company\">';\n echo '<span class=\"value\">'. get_the_company_name() .'</span>';\n echo '</li>';\n }", "public function organisationName();", "public function getCompany()\n {\n return isset($this->company) ? $this->company : null;\n }", "public function getOrganizationName(): string {\n\t\treturn ($this->organizationName);\n\t}", "public function getUsername()\n {\n return $this->company_id.'+'.$this->username;\n }", "public function getCompany();", "public function getSiteName();", "public function getCompanyAlias() \n\t{\n\t return $this->companyAlias;\n\t}", "public function website_name(){\r\n\r\n echo ISSET($this->globalSettings->website_name)?$this->globalSettings->website_name:'';\r\n\r\n }", "public function getCompany()\n {\n return $this->company;\n }", "protected function companyCode(){\n return config('company.code');\n }", "public function getBusinessName()\n {\n return isset($this->business_name) ? $this->business_name : '';\n }", "public static function company()\n {\n return new TextNode('company');\n }", "protected function getDefaultName()\n {\n $name = str_replace(\n ['-', '_'],\n ' ',\n $this->getCurrentDir()\n );\n\n return ucwords($name);\n }", "private function _getSiteName()\n {\n return 'Santander Consumer Bank';\n }", "public function getName(): string\n {\n return $this->account->account_name ?? '';\n }", "public function get_name() {\r\n\t\treturn '';\r\n\t}", "public function getAssignmentDefaultName(): string;", "public function getCompany()\n {\n if (array_key_exists('company', $this->data)) {\n return $this->data['company'];\n }\n\n if ($this->getType() == Reader\\Reader::TYPE_YML) {\n $company = $this->xpath->evaluate('string(/yml_catalog/shop/company)');\n }\n\n if (! $company) {\n $company = null;\n }\n\n $this->data['company'] = $company;\n\n return $this->data['company'];\n }", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function get_name();", "public function get_name();", "public function get_name();", "public function getBillingCompany()\n {\n return $this->getParameter('billingCompany');\n }", "public function getDisplayName() {}", "public function getBrand_name () {\n\t$preValue = $this->preGetValue(\"brand_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->brand_name;\n\treturn $data;\n}", "public static function getDisplayName()\n {\n return null;\n }", "public function getCustomerName();", "private static function get_site_name()\n {\n }", "public function getNome() {\n return $this->oCgm->getNome();\n }", "public function getDisplayName($default = \"\")\n {\n /** @var \\app\\models\\User $user */\n $user = $this->getIdentity();\n return $user ? $user->getDisplayName($default) : \"\";\n }", "public function getFullName()\n {\n return \"Brand Citozi\";\n }", "public function getHumanName();", "public function getCustomerMiddlename();", "public function getRealName() {}", "public function getProdCompany()\n {\n return $this->prod_company;\n }", "public function getAccountRealName() {\n // cn is a standard LDAP attibute\n if (!empty($_SERVER['AUTHORIZE_CN']))\n return $_SERVER['AUTHORIZE_CN'];\n // Some installations may prefer to use displayName\n else if (!empty($_SERVER['AUTHORIZE_DISPLAYNAME']))\n return $_SERVER['AUTHORIZE_DISPLAYNAME'];\n // Some installations may populate the name field with the user's real\n // name. This seems to be erroneous, based on Microsoft documenting\n // this attribute as an RDN, so only use it as a last resort.\n else if (!empty($_SERVER['AUTHORIZE_NAME']))\n return $_SERVER['AUTHORIZE_NAME'];\n else\n return parent::getAccountRealName();\n }", "public function getYomiCompany()\n {\n return $this->getProperty(\"YomiCompany\");\n }", "public function getOfficialName()\n {\n return $this->officialName;\n }", "public function getNomComplet()\n {\n return $this->getPrenomContact() . ' ' . $this->getNomContact();\n }", "public function getDisplayName();", "public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }", "public function getDisplayName() { $n = $this->data->get(\"displayName\", null);\n if (!empty($n)) {\n return $n;\n }\n \n // I have google's name?\n if (($g = $this->getGoogleInfo())) {\n if (isset($g->givenName) && !empty($g->givenName)) {\n return $g->givenName;\n }\n if (isset($g->name) && !empty($g->name)) {\n return $g->name;\n }\n }\n \n // user is current user?? load his name if he is\n $currentUser = JFactory::getUser();\n if ((int)($currentUser->id) == (int)$this->userid) {\n return ucwords(strtolower($currentUser->name));\n }\n \n // load user and get his name\n $user = F_User::getUserById((int)$this->$userid);\n if ($user) {\n return ucwords(strtolower($user->name));\n }\n \n // wtf\n return \"???\";\n }", "public function getCustomerName(){\n return $this->customer ? $this->customer->name : '- no name provided -';\n }", "function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }", "public function getCompanyCode(){\n\t\t/* return company code */\n\t\treturn $this->_intCompanyCode;\n\t}", "public function getMarket_name () {\n\t$preValue = $this->preGetValue(\"market_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->market_name;\n\treturn $data;\n}", "function getDisplayName(){\n\t\treturn $this->display_name;\n\t}", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getCityName(): string\n {\n return $this->make_firebase_connection()\n ->firstWhere('city_id', Auth::user()->city_id)['city_name'];\n }", "public static function defaultSelectionLabel(): string\n {\n return Craft::t('app', 'Select organization');\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function getCompanyAddress(){\n $address = '';\n if(!empty($this->country))\n $address .= $this->country;\n if(!empty($this->state))\n $address .= (!empty($address) ? ', ' : '') . $this->state;\n if(!empty($this->city))\n $address .= (!empty($address) ? ', ' : '') . $this->city;\n if(!empty($this->address))\n $address .= (!empty($address) ? ', ' : '') . $this->address;\n return $address;\n }", "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "public static function getCompanyByCustomerId()\n\t{\n\t\t$userId = Auth::getUser()->ID;\n\t\t$companyName = self::select('company')->where('ID', $userId)->first()->company;\n\t\treturn $companyName;\n\t}", "public function getSponsorname() {}", "private function retrieve_name() {\n\t\t$replacement = null;\n\n\t\t$user_id = $this->retrieve_userid();\n\t\t$name = get_the_author_meta( 'display_name', $user_id );\n\t\tif ( $name !== '' ) {\n\t\t\t$replacement = $name;\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function getNome();", "public function getNome();", "public function getTitle()\n {\n if ('invoice' === \\XLite\\Core\\Request::getInstance()->mode) {\n $result = (\n \\XLite\\Core\\Config::getInstance()->Company->company_name\n ? \\XLite\\Core\\Config::getInstance()->Company->company_name . ': '\n : ''\n ) . static::t('Invoice');\n\n } elseif ('XLite\\View\\Address\\OrderModify' == ltrim(\\XLite\\Core\\Request::getInstance()->widget, '\\\\')) {\n $result = static::t('Customer information');\n\n } elseif ('XLite\\View\\SelectAddressOrder' == ltrim(\\XLite\\Core\\Request::getInstance()->widget, '\\\\')) {\n $result = static::t('Pick address from address book');\n\n } else {\n $result = static::t('Order details');\n }\n\n return $result;\n }", "public function getDefaultAppName()\n\t{\n\t\treturn $this->_defaultAppName;\n\t}", "public function getCompanyValue()\n {\n return $this->CompanyValue;\n }", "public function getAuthorcompany() {}", "public function getName(): string\n {\n return 'mailingName';\n }", "public function getCustomerSuffix();" ]
[ "0.82348704", "0.80004865", "0.78050417", "0.777714", "0.7749992", "0.77225846", "0.76560754", "0.7622188", "0.76113427", "0.76113427", "0.7589384", "0.7584806", "0.7573624", "0.75613606", "0.755359", "0.7415744", "0.70463413", "0.70248425", "0.6942448", "0.6937036", "0.687977", "0.66906035", "0.66146636", "0.66138244", "0.6612791", "0.65976626", "0.65866125", "0.6542232", "0.6542232", "0.65412134", "0.65336907", "0.6501937", "0.6492834", "0.6488976", "0.6476521", "0.6473655", "0.64444554", "0.6442486", "0.6417672", "0.6403833", "0.6393846", "0.6369657", "0.63526475", "0.63155204", "0.63141894", "0.63102055", "0.6307893", "0.6305446", "0.6302336", "0.629035", "0.6282001", "0.624914", "0.6227036", "0.62212515", "0.62137467", "0.62137467", "0.62137467", "0.6211325", "0.6210881", "0.62106067", "0.6207069", "0.6196243", "0.6193604", "0.61734396", "0.61683947", "0.6167572", "0.61450076", "0.6143574", "0.6141736", "0.614025", "0.61384773", "0.6131802", "0.613083", "0.6125118", "0.6113147", "0.61079705", "0.6105095", "0.6104759", "0.6103874", "0.61030734", "0.61026603", "0.60961753", "0.60904545", "0.60904545", "0.6087444", "0.6085318", "0.6084415", "0.6084415", "0.6080102", "0.60798717", "0.60697055", "0.6049092", "0.60458475", "0.6033143", "0.6033143", "0.6027569", "0.6024865", "0.6023979", "0.60175574", "0.6014224", "0.6013751" ]
0.0
-1
check, if company has address
public function hasAddress($addrId) { $table = new Yourdelivery_Model_DbTable_Locations(); return count($table->fetchAll('companyId = "' . $this->getId() . '" AND deleted = 0')) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasAddress() {\n return $this->_has(3);\n }", "public function hasAddress()\n {\n return $this->address !== null;\n }", "public function hasAddress() : bool\n {\n return isset($this->address);\n }", "public function hasCompanyInfo()\n {\n $result = false;\n if ($this->getField('company') != '' && $this->getField('companyzipcode') != '') {\n $result = true;\n }\n return $result;\n }", "private function isCompanyRequired()\n {\n return $this->eavConfig->getAttribute('customer_address', 'company')->getIsRequired();\n }", "private function isAddressInAddressBook()\n {\n if ($this->getQuoteId() === null) {\n return false;\n }\n try {\n $quote = $this->quoteRepository->get($this->getQuoteId(), ['*']);\n if ($quote->getShippingAddress()\n && $quote->getShippingAddress()->getCustomerAddressId()\n && $this->addressRepository->getById($quote->getShippingAddress()->getCustomerAddressId())\n ) {\n return true;\n }\n } catch (NoSuchEntityException $e) {\n // If no such entity, skip\n }\n return false;\n }", "public function hasAddressNList()\n {\n return $this->address_n !== null;\n }", "public function isAddressSpecified(): bool\n {\n return ($this->getAddressZip() && $this->getAddressCity() && $this->getAddressCountry());\n }", "public function validateAddress() {\r\n $leng = mb_strlen($this->data[$this->name]['Address']);\r\n if ($leng > 256) {\r\n return FALSE;\r\n } else if ($leng > 128) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['Address']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }", "public function validAddresses() {}", "function hasValidAddress()\n{\n return isset($_POST[\"address\"]) && isAddress($_POST[\"address\"]);\n}", "function checkAddress(){\n $country = $_POST[\"country\"];\n $city = $_POST[\"city\"];\n $street = $_POST[\"street\"];\n $number = $_POST[\"number\"];\n if(empty($country) || empty($city) || empty($street) || empty($number)){\n return false; \n }\n return true; \n }", "public function hasStreet() {\n return $this->_has(1);\n }", "function deliveryAddressCheck($storeId=null,$merchant_id=null,$address_id=null) {\n \n App::import('Model', 'DeliveryAddress');\n $this->DeliveryAddress = new DeliveryAddress();\n $result=FALSE;\n $deliveryAddressCheck=$this->DeliveryAddress->find('first',array('conditions'=>array('DeliveryAddress.merchant_id'=>$merchant_id,'DeliveryAddress.is_deleted'=>0,'DeliveryAddress.id'=>$address_id,'DeliveryAddress.is_active'=>1),'fields'=>array('id')));\n //pr($deliveryAddressCheck);\n if(!empty($deliveryAddressCheck)){\n $result=TRUE;\n }else{\n $result=FALSE;\n }\n return $result;\n }", "public function isAddressValid()\n {\n //TODO: consider does it make sense to have a special validation by country? how does the app handle different country addresses ?\n $addressValid = trim($this->Streetname1) != '' && trim($this->PostalCode) != '' && trim($this->City) != '' && trim($this->Country) != '' ;\n\n if (!$addressValid) {\n $this->errors[] = 'Invalid Shipping Address';\n }\n\n return $addressValid;\n }", "public function isValidAddress($address);", "private function is_address_passed_by_URL() {\n if ( ! isset( $this->is_address_in_url ) ) {\n $this->is_address_in_url = $this->slplus->SmartOptions->url_allow_address->is_true && ! empty( $_REQUEST['address'] );\n }\n\n return $this->is_address_in_url;\n }", "private function isAddressSelected()\n {\n $result = false;\n\n try {\n $quote = $this->quoteRepository->get($this->getQuoteId(), ['*']);\n\n if ($quote->getShippingAddress() !== null) {\n $result = (bool)$quote->getShippingAddress()->getCustomerAddressId();\n }\n } catch (NoSuchEntityException $e) {\n // If no such entity, skip\n }\n\n return $result;\n }", "function spectra_address_exists ($address)\n\t{\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT COUNT(*) AS `found` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"` WHERE `address` = '\".$address.\"'\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"found\"]) || $result[\"found\"] == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function require_refund_address() {\n\t\treturn $this->show_refund_address() && $this->get_option( 'refund_address_optional', 'yes' ) == 'no';\n\t}", "function verify_address($address) // Colorize: green\n { // Colorize: green\n return isset($address) // Colorize: green\n && // Colorize: green\n is_string($address) // Colorize: green\n && // Colorize: green\n ( // Colorize: green\n filter_var($address, FILTER_VALIDATE_IP) // Colorize: green\n || // Colorize: green\n filter_var($address, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) // Colorize: green\n ); // Colorize: green\n }", "function checkAddress($address = null, $state = null, $city = null, $zip = null) {\n $this->autoRender = false;\n if (isset($_POST)) {\n $zipCode = ltrim($zip, \" \");\n $stateName = $state;\n $cityName = strtolower($city);\n $cityName = ucwords($cityName);\n $dlocation = $address . \" \" . $cityName . \" \" . $stateName . \" \" . $zipCode;\n $adjuster_address2 = str_replace(' ', '+', $dlocation);\n $geocode = file_get_contents('https://maps.google.com/maps/api/geocode/json?key='.GOOGLE_GEOMAP_API_KEY.'&address=' . $adjuster_address2 . '&sensor=false');\n $output = json_decode($geocode);\n if ($output->status == \"ZERO_RESULTS\" || $output->status != \"OK\") {\n echo 2;\n die; // Bad Address\n } else {\n $latitude = @$output->results[0]->geometry->location->lat;\n $longitude = @$output->results[0]->geometry->location->lng;\n $formated_address = @$output->results[0]->formatted_address;\n if ($latitude) {\n echo 1;\n die; // Good Address\n }\n }\n }\n }", "public function testAddress()\n {\n $this->assertTrue(RuValidation::address1('Московский пр., д. 100'));\n $this->assertTrue(RuValidation::address1('Moskovskiy ave., bld. 100'));\n\n $this->assertFalse(RuValidation::address1('I would not tell'));\n }", "public function exists($address, $list, $type);", "public function verifyAndSetAddress($a,$bRequired) {\n\t\tif ($a['country'] != 'USA')\n\t\t\tthrow new exception(\"internation addresses not supported yet\");\n\t\t$this->country='USA';\t\t\n\t\t$this->line1 = isset($a['line1']) ? $a['line1'] : ''; \t\n\t\t$this->line2 = isset($a['line2']) ? $a['line2'] : ''; \t\n\t\t$this->city = isset($a['city']) ? $a['city'] : ''; \t\n\t\t$this->state = isset($a['state2']) ? $a['state2'] : ''; \t\n\t\t$this->zip = isset($a['zip']) ? $a['zip'] : ''; \t\n\t\t\t\n\t\tif ($this->line1 == '' && $this->line2 == '') {\n\t\t\tif ($bRequired || $this->city != '' || $this->zip != '')\n\t\t\t\treturn (array('*line1'=>'You must provide an address'));\n\t\t\telse {\n\t\t\t\t$this->city=$this->state=$this->zip='';\n\t\t\t\treturn True;\t\t// OK -- just no address\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t$retval=array();\n\t\tif ($this->city == '')\n\t\t\t$retval['*city']='You must provide a city';\n\t\tif ($this->zip == '')\n\t\t\t$retval['*zip']='You must provide a ZIP code';\n\t\telse {\n\t\t\t$nmatches=preg_match('/^[\\\\d]{5}(-[\\\\d]{4})??$/',$this->zip);\n\t\t\tif (0 == $nmatches)\n\t\t\t\t$retval['*zip']=\"Invalid ZIP code\";\n\t\t}\t\n\t\treturn (sizeof($retval) != 0) ? $retval : True;\n\t}", "public function getCompanyAddress(){\n $address = '';\n if(!empty($this->country))\n $address .= $this->country;\n if(!empty($this->state))\n $address .= (!empty($address) ? ', ' : '') . $this->state;\n if(!empty($this->city))\n $address .= (!empty($address) ? ', ' : '') . $this->city;\n if(!empty($this->address))\n $address .= (!empty($address) ? ', ' : '') . $this->address;\n return $address;\n }", "public function show_refund_address() {\n\t\treturn $this->get_option( 'show_refund_address', 'no' ) == 'yes';\n\t}", "function give_require_billing_address( $payment_mode ) {\n\n\t$return = false;\n\t$billing_country = ! empty( $_POST['billing_country'] ) ? give_clean( $_POST['billing_country'] ) : 0; // WPCS: input var ok, sanitization ok, CSRF ok.\n\n\tif ( $billing_country || did_action( \"give_{$payment_mode}_cc_form\" ) || did_action( 'give_cc_form' ) ) {\n\t\t$return = true;\n\t}\n\n\t// Let payment gateways and other extensions determine if address fields should be required.\n\treturn apply_filters( 'give_require_billing_address', $return );\n\n}", "public function isSetShipFromAddress()\n {\n return !is_null($this->_fields['ShipFromAddress']['FieldValue']);\n }", "protected function isNormalizeAddressEnabled()\n {\n return $this->config->getNormalizeAddress($this->store);\n }", "protected function is_field_address( array $view_settings ) {\n\t\t$orderby = $this->get_orderby( $view_settings );\n\t\t$query_type = $this->get_query_type( $view_settings );\n\t\t$field_name = $this->remove_prefix_from_field_name( $query_type, $orderby );\n\n\t\treturn ( $this->get_field_type( $query_type, $field_name ) === 'google_address' );\n\t}", "public function findAddress()\n {\n $regex = '/.{1,100}[A-Z]{1,2}[0-9]{1}[A-Z0-9]*\\s+[0-9]{1}[A-Z]{2}/si';\n\n if (preg_match_all($regex, $this->data, $matches)) {\n $uniques = array_values(array_unique($matches[0]));\n foreach ($uniques as $key => $address) {\n $uniques[$key] = preg_replace(\"/[\\s\\r\\n]*[|]+[\\s\\r\\n]*/\", \", \", $address);\n }\n $this->address = $uniques;\n }\n }", "public function isSetEventAddress()\n {\n return !is_null($this->_fields['EventAddress']['FieldValue']);\n\n }", "function validateAddress($field)\n\t{\n //Make sure field is not blank; unable to validate anything beyond that.\n if ($field == \"\") return \"Please specify your address.\\\\n\";\n\t\treturn \"\";\n\t}", "public function checkAddress($address)\n\t\t{\n\t\t\t$address = strip_tags($address);\n\t\t\t\n\t\t\t$this->groestlcoin->validateaddress($address);\n\t\t\t\n\t\t\tif ($this->groestlcoin->response['result']['isvalid'] == 1){\n\t\t\t\treturn 1;}\n\t\t\telse{\n\t\t\t\treturn 0;}\t\t\t\n\t\t}", "public function is_needed() {\n\t\treturn $this->context->site_represents === 'company';\n\t}", "public function hasContacts() {\n return $this->_has(7);\n }", "public function hasContactInformation() {\n\t\treturn $this->hasContactEmail() || $this->hasContactUrl();\n\t}", "function isAddress($input)\n{\n $pattern = \"/^[a-zA-Z0-9]{33,34}$/\";\n return preg_match($pattern, $input);\n}", "function exists() {\n\t\t$ret = (bool) (\n\t\t\t$this->getAddLine1() ||\n\t\t\t$this->getAddLine2() ||\n\t\t\t$this->getTown() ||\n\t\t\t$this->getPostalCode() ||\n\t\t\t$this->getLat() ||\n\t\t\t$this->getLng()\n\t\t);\n\t\treturn $ret;\n\t}", "public function hasContactAddress(TtAddress $testAddress)\n {\n return $this->contactAddresses->contains($testAddress);\n }", "public function hasContactInfo() {\n return ($this->phone || $this->email || $this->pager);\n }", "public function check_address($add){\n\t\t$this->db->select('*');\n\t\t$this->db->from('user_address');\n\t\t$this->db->where('user_id',$this->session->userdata('sgcurrency_user_id'));\n\t\t$this->db->where('active',1);\n\t\t$this->db->where('uaddress',$add);\n\t\t$query = $this->db->get();\n\t\treturn $query->row_array();\n\t}", "public function check_billing_address_for_packstation()\n\t{\n\t\t$addressValid = true;\n\n\t\t$billToAddress = $this->getAddressData($_SESSION['billto']);\n\t\tif(preg_match('/(packstation|filiale)/i', $billToAddress['entry_street_address']) === 1)\n\t\t{\n\t\t\t$addressValid = false;\n\t\t}\n\n\t\treturn $addressValid;\n\t}", "public function validate()\n {\n $errors = parent::validate();\n\n $transport = new Varien_Object();\n $transport->setErrors( $errors );\n $transport->setAddress( $this );\n\n Mage::dispatchEvent('customer_address_validation_errors', array('transport' => $transport ));\n\n $errors = $transport->getErrors();\n\n if ($errors === true || empty($errors))\n { // no errors: be true\n return true;\n }\n\n return $errors;\n }", "private function addAddress($options)\n {\n if (!isset($options['address'])\n || !isset($options['billing_address'])\n ) {\n return false;\n }\n\n $address = isset($options['billing_address'])\n ? $options['billing_address']\n : $options['address'];\n\n $this->post['BillingStreet'] = isset($address['address1']) ? $address['address1'] : null;\n $this->post['BillingHouseNumber'] = isset($address['address2']) ? $address['address2'] : null;\n $this->post['BillingCity'] = isset($address['city']) ? $address['city'] : null;\n $this->post['BillingState'] = isset($address['state']) ? $address['state'] : null;\n $this->post['BillingPostCode'] = isset($address['zip']) ? $address['zip'] : null;\n }", "public function contactExist(){\n $result = \\CRest::call('crm.contact.list', [\n 'filter' => [\n 'UF_CRM_CPF' => $this->cpf\n ],\n 'select' => 'ID',\n ]);\n\n return empty(!$result['result']);\n }", "public function validate()\n {\n if ($this->addressA->getCountryCode() !== $this->addressB->getCountryCode()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getZip() !== $this->addressB->getZip()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getCity() !== $this->addressB->getCity()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getStreet() !== $this->addressB->getStreet()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getAddressAdditional() !== $this->addressB->getAddressAdditional()) {\n $this->invalidate();\n return false;\n }\n\n return true;\n }", "public function getBillingAddress() : Address;", "public function hasPostalCode() : bool\n {\n return isset($this->postalCode);\n }", "function hook_commerce_adyen_shopper_address_alter(\\Commerce\\Adyen\\Payment\\Composition\\Address $address, \\EntityDrupalWrapper $profile, array $checkout_values, \\EntityDrupalWrapper $order) {\n if ('Dnipropetrovsk' === $address->getCity()) {\n $address->setCity('Dnipro');\n }\n}", "public function getBillingAddress();", "public function getBillingAddress();", "function get_footer_address() {\n\t$street_address = '';\n\t$city = '';\n\t$postal_code = '';\n\t$country = '';\n\t/**\n\t * Check if we are in front-page:\n\t */\n\tif (is_page_template('page-templates/front-page.php')){\n\t\tif ( get_field('front_page_contact_street_address') )\n\t\t\t$street_address = get_field('front_page_contact_street_address');\n\t\tif ( get_field('front_page_contact_city') )\n\t\t\t$city = get_field('front_page_contact_city');\n\t\tif ( get_field('front_page_contact_postal_code') )\n\t\t\t$postal_code = get_field('front_page_contact_postal_code');\n\t\tif ( get_field('front_page_contact_country') )\n\t\t\t$country = get_field('front_page_contact_country');\n\t}\n\t/**\n\t * If NOT in front-page:\n\t */\n\telse {\n\t\t/**\n\t\t * Check if we are in companies page:\n\t\t */\n\t\tif (is_singular('companies')) {\n\t\t\tif ( get_field('company_contact_street_address') )\n\t\t\t\t$street_address = get_field('company_contact_street_address');\n\t\t\tif ( get_field('company_contact_city') )\n\t\t\t\t$city = get_field('company_contact_city');\n\t\t\tif ( get_field('company_contact_postal_code') )\n\t\t\t\t$postal_code = get_field('company_contact_postal_code');\n\t\t\tif ( get_field('company_contact_country') )\n\t\t\t\t$country = get_field('company_contact_country');\n\t\t}\n\t\t/**\n\t\t * Check if we are in group of companies page:\n\t\t */\n\t\tif (is_singular('group_of_companies')) {\n\t\t\tif ( get_field('group_of_companies_contact_street_address') )\n\t\t\t\t$street_address = get_field('group_of_companies_contact_street_address');\n\t\t\tif ( get_field('group_of_companies_contact_city') )\n\t\t\t\t$city = get_field('group_of_companies_contact_city');\n\t\t\tif ( get_field('group_of_companies_contact_postal_code') )\n\t\t\t\t$postal_code = get_field('group_of_companies_contact_postal_code');\n\t\t\tif ( get_field('group_of_companies_contact_country') )\n\t\t\t\t$country = get_field('group_of_companies_contact_country');\n\t\t}\n\t}\n\tif ($street_address == '' && $city == '' && $postal_code == '' && $country == '') {\n\t\t/**\n\t\t * Don't show the red marker for address.\n\t\t */\n\t}\n\telse {\n\t\t/**\n\t\t * Generate google_maps_url:\n\t\t */\n\t\t$google_maps_url = 'http://maps.google.com/?q='.$street_address.','.$city.','.$postal_code;\n\t\t?>\n\t\t<a href=\"<?php echo $google_maps_url; ?>\" class=\"contact-link\" target=\"_blank\">\n\t\t\t<img src=\"<?php echo get_template_directory_uri().'/images/icon_address.png'; ?>\" class=\"footer-icon\">\n\t\t\t<br>\n\t\t\t<span class=\"contact-street-address\"><?php echo $street_address; ?></span>\n\t\t\t<span class=\"contact-postal-code-and-city\"><?php echo $postal_code; ?> <?php echo $city; ?></span>\n\t\t\t<span class=\"contact-country\"><?php echo $country; ?></span>\n\t\t</a>\n\t\t<?php\n\t}\n}", "public function testShouldShowAllAddress()\n {\n $request = $this->call('GET', '/api/address');\n\n $request->assertStatus(200);\n }", "public function getAddress() {}", "public function getOwmsCompanyAddress()\n {\n $location = str_replace(' ', '', $this->getField('companyzipcode'));\n $location .= $this->getField('companyaddressnumber');\n $location .= $this->getField('companyaddressadditional');\n return $location;\n }", "public function testFormCityMissingAddressVisible() {\n $form = new RedirectForm();\n $form_state = [];\n $payment = $this->mockPayment([\n 'firstname' => 'First',\n 'lastname' => 'Last',\n 'address1' => 'Address1',\n 'postcode' => 'TEST',\n 'country' => 'GB',\n ]);\n $element = $form->form([], $form_state, $payment);\n $pd = $element['personal_data'];\n $pd['address'] += ['#access' => TRUE];\n $this->assertTrue($pd['address']['#access']);\n }", "public function testCheckAddress() {\n\t$this->assertTrue(Bitcoin::checkAddress(\"1pA14Ga5dtzA1fbeFRS74Ri32dQjkdKe5\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1MU97wyf7msCVdaapneW2dW1uXP7oEQsFA\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1F417eczAAbh41V4oLGNf3DqXLY72hsM73\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJkwJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1111111fnord\"));\n\t}", "public function isCompanySet($quote)\n {\n return $quote->getBillingAddress()->getCompany();\n }", "public function isCompanySet($quote)\n {\n return $quote->getBillingAddress()->getCompany();\n }", "public function isValid()\n {\n return $this->hasAddress() || $this->hasCoordinate();\n }", "private function _getAddresses()\n\t {\n\t\t$hashes = [];\n\t\t$rows = $this->_db->exec(\"SELECT `city`, `address` FROM `addresses` WHERE `phone` = '\" . $this->phone . \"'\");\n\t\twhile($row = $rows->getRow())\n\t\t {\n\t\t\t$address = $row[\"city\"] . \", \" . $row[\"address\"];\n\t\t\t$sliced = new AddressSlicer($address);\n\n\t\t\tif ($sliced->valid() === true && isset($hashes[$sliced->hash]) === false)\n\t\t\t {\n\t\t\t\t$hashes[$sliced->hash] = $address;\n\t\t\t } //end if\n\n\t\t } //end while\n\n\t\treturn count($hashes);\n\t }", "protected function _hasDestinationAddress()\n {\n $hasDestinationAddress = false;\n if ($this->_request->getHeader() && $this->_request->getHeader()->getDefaultLocations()) {\n $locations = $this->_request->getHeader()->getDefaultLocations();\n\n if (isset($locations[self::TAX_LOCATION_PURPOSE_SHIP_TO])) {\n $shipToLocation = $locations[self::TAX_LOCATION_PURPOSE_SHIP_TO];\n $address = $shipToLocation->getAddress();\n $city = (string)$address->getCity();\n $zip = $address->getZipcode();\n $state = $address->getState();\n $hasDestinationAddress = (($city && $state) || $zip) ? true : false;\n }\n }\n\n return $hasDestinationAddress;\n }", "function get_contact_address_markup() {\n\t$address = get_theme_mod( 'organization_address' );\n\tif ( !empty( $address ) ) {\n\t\tob_start();\n\t?>\n\t<address class=\"address\">\n\t\t<?php echo wptexturize( nl2br( $address ) ); ?>\n\t</address>\n\t<?php\n\t\treturn ob_get_clean();\n\t}\n\treturn;\n}", "public function hasCity() {\n return $this->_has(2);\n }", "public function validate_refund_address_field() {\n\n\t\tWC()->session->set( 'decred_refund_address', null );\n\n\t\t$address = $this->get_post( 'decred-refund-address' );\n\n\t\t// this should never happen as the refund address field should be missing.\n\t\tif ( ! empty( $address ) && ! $this->show_refund_address() ) {\n\t\t\twc_add_notice( __( 'Decred plugin error: unexpected refund address.', 'decred' ), 'error' );\n\t\t\treturn false;\n\t\t}\n\n\t\t// empty address OK if optional, otherwise validate it.\n\t\tif ( empty( $address ) && ! $this->require_refund_address() ) {\n\t\t\t$address_is_valid = true;\n\t\t} else {\n\t\t\t$address_is_valid = $this->validate_address( $address );\n\t\t}\n\n\t\tif ( $address_is_valid ) {\n\t\t\tif ( ! empty( $address ) ) {\n\t\t\t\t// save address now to retrieve it later when order created.\n\t\t\t\tWC()->session->set( 'decred_refund_address', $address );\n\t\t\t}\n\t\t} else {\n\t\t\t// translators: parameter is address entered by user, not to be translated.\n\t\t\t$message = __( 'Please enter a valid Decred address for refunds. Wrong address \"%s\"', 'decred' );\n\t\t\twc_add_notice( sprintf( $message, $address ), 'error' );\n\t\t}\n\t}", "public function isMultiAddressDelivery(){\n static $cache = null;\n\n if (is_null($cache)) {\n $db = JFactory::getDBO();\n\n $query = \"SELECT count(distinct address_delivery_id) FROM \" . $db->quoteName('#__jeproshop_cart_product');\n $query .= \" AS cart_product WHERE cart_product.cart_id = \" . (int)$this->cart_id;\n\n $db->setQuery($query);\n $cache = (bool)($db->loadResult() > 1);\n }\n return $cache;\n }", "public function hasContacts() {\n return $this->_has(6);\n }", "public function isComplete()\n {\n if($this->name == null || $this->street1 == null || $this->city == null || $this->countrycode == null || $this->zip == null || $this->email == null)\n {\n return false;\n }\n $countriesRequiringStates = array(\"AR\", \"BR\", \"CA\", \"CN\", \"ID\", \"IN\", \"JP\", \"MX\", \"TH\", \"US\");\n if($this->state == null && in_array($this->countrycode, $countriesRequiringStates))\n {\n return false;\n }\n return true;\n }", "public function FilterAddressFields($field)\n\t{\n\t\tif(!$field) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public function getAddress();", "public function getAddress();", "function evel_is_address_bouncing($address) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.is_address_bouncing', $params);\n return $result;\n}", "function driveway_exist($address)\n {\n $this->db->select('drivewayID,userID');\n $this->db->from('tbl_driveway');\n $this->db->where('streetAddress', $address ['street']);\n $this->db->where('route', $address ['route']);\n $this->db->where('city', $address ['city']);\n $this->db->where('state', $address ['state']);\n $this->db->where('zip', $address ['zip']);\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n return $query->row();\n } else {\n return false;\n }\n }", "public function isAtLeastOneKnownEmailAddress($_);", "public function check_city()\n {\n if (!in_array(ucwords(sanitize_text_field($_POST['billing_city'])), $this->business_area)) {\n throw new Exception(__('Your city is not within our business area', 'woocommerce'));\n }\n }", "public function hasContactList()\n {\n return $this->contact !== null;\n }", "public function needs_shipping_address() {\n\t\treturn apply_filters( 'woocommerce_cart_needs_shipping_address', true === $this->needs_shipping() && ! wc_ship_to_billing_address_only() );\n\t}", "abstract function is_agency();", "public function testFormCountryMissingAddressVisible() {\n $form = new RedirectForm();\n $form_state = [];\n $payment = $this->mockPayment([\n 'firstname' => 'First',\n 'lastname' => 'Last',\n 'address1' => 'Address1',\n 'postcode' => 'TEST',\n 'city' => 'London',\n ]);\n $element = $form->form([], $form_state, $payment);\n $pd = $element['personal_data'];\n $pd['address'] += ['#access' => TRUE];\n $this->assertTrue($pd['address']['#access']);\n $this->assertTrue($pd['address']['city']['#access']);\n $this->assertEquals('London', $pd['address']['city']['#default_value']);\n }", "function deleteAddress() {\n\t\tif (!in_array(intval($this->piVars['addressid']), array_keys($this->addresses))) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// Hook to delete an address\n\t\t$hookObjectsArr = array();\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['deleteAddress'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['deleteAddress'] as $classRef) {\n\t\t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n\t\t\t}\n\t\t}\n\t\tforeach($hookObjectsArr as $hookObj) {\n\t\t\tif (method_exists($hookObj, 'deleteAddress')) {\n\t\t\t\t$message = $hookObj->deleteAddress((int)$this->piVars['addressid'], $this);\n\t\t\t}\n\t\t}\n\n\t\tif ($message) {\n\t\t\t$this->sysMessage = $message;\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n\t\t\t'tt_address',\n\t\t\t'uid=' . intval($this->piVars['addressid']),\n\t\t\tarray(\n\t\t\t\t'deleted' => 1\n\t\t\t)\n\t\t);\n\n\t\tunset($this->addresses[intval($this->piVars['addressid']) ]);\n\t\tunset($this->piVars['confirmed']);\n\t}", "private function saveAddresses() {\n\t\t\t$billingSaved = false;\n\t\t\t$shippingSaved = false;\n\t\t\tif ($this->memberID && $this->billingAddress->validAddress() && $this->shippingAddress->validAddress()) {\n\t\t\t\t// compare billing and shipping addresses\n\t\t\t\t$billingIsShipping = true;\n\t\t\t\tforeach ($this->billingAddress->get('addressForm') as $key => $val) {\n\t\t\t\t\tif ($val != $this->shippingAddress->getArrayData('addressForm', $key)) {\n\t\t\t\t\t\t$billingIsShipping = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($billingIsShipping) {\n\t\t\t\t\t// if the billing address is the same as the shipping address\n\t\t\t\t\t// address record will retain the shipping address name\n\t\t\t\t\t// billing address does not have a name\n\t\t\t\t\t// (payment method name will be in the payment record)\n\t\t\t\t\t$this->shippingAddress->addType('billing');\n\t\t\t\t\tif ($this->shippingAddress->get('saveAddress') || systemSettings::get('FORCESAVESHIPPING')) {\n\t\t\t\t\t\tif (!$this->shippingAddress->get('addressID')) {\n\t\t\t\t\t\t\tif ($this->shippingAddress->saveAddress($this->memberID)) {\n\t\t\t\t\t\t\t\t$shippingSaved = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($this->shippingAddress->updateAddress()) {\n\t\t\t\t\t\t\t\t$shippingSaved = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->shippingAddress->get('defaultAddress')) {\n\t\t\t\t\t\t\t$this->dbh->query(\"UPDATE `customers` SET `shippingID` = '\".$this->shippingAddress->get('addressID').\"' WHERE `memberID` = '\".$this->memberID.\"'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$billingIsDefault = false;\n\t\t\t\t\t\tif ($this->billingAddress->get('defaultAddress')) {\n\t\t\t\t\t\t\t$billingIsDefault = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->billingAddress->loadAddress($this->shippingAddress->get('addressID'))) {\n\t\t\t\t\t\t\t$billingSaved = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->billingAddress->get('saveAddress') || systemSettings::get('FORCESAVEBILLING')) {\n\t\t\t\t\t\tif (!$this->billingAddress->get('addressID')) {\n\t\t\t\t\t\t\tif ($this->billingAddress->saveAddress($this->memberID)) {\n\t\t\t\t\t\t\t\t$billingSaved = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($this->billingAddress->updateAddress()) {\n\t\t\t\t\t\t\t\t$billingSaved = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->billingAddress->get('defaultAddress')) {\n\t\t\t\t\t\t\t$this->dbh->query(\"UPDATE `customers` SET `billingID` = '\".$this->billingAddress->get('addressID').\"' WHERE `memberID` = '\".$this->memberID.\"'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$billingSaved = true;\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->shippingAddress->get('saveAddress') || systemSettings::get('FORCESAVESHIPPING')) {\n\t\t\t\t\t\tif (!$this->shippingAddress->get('addressID')) {\n\t\t\t\t\t\t\tif ($this->shippingAddress->saveAddress($this->memberID)) {\n\t\t\t\t\t\t\t\t$shippingSaved = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($this->shippingAddress->updateAddress()) {\n\t\t\t\t\t\t\t\t$shippingSaved = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->shippingAddress->get('defaultAddress')) {\n\t\t\t\t\t\t\t$this->dbh->query(\"UPDATE `customers` SET `shippingID` = '\".$this->shippingAddress->get('addressID').\"' WHERE `memberID` = '\".$this->memberID.\"'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$shippingSaved = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ($billingSaved && $shippingSaved);\n\t\t}", "public function doesPersonExist($org_id,$fname,$lname,$address=null,$postal=null,$email=null,$home_phone=null,$work_phone=null) {\n\n\t\tif(empty($fname) || empty($lname) || !is_integer($org_id)) {\n\t\t\tthrow new Exception('Need at least organization ID, first name and last name');\n\t\t\t//return false;\n\t\t}\n\n\t\t$match_endpoint = 'customers/match/';\n\t\t$params = array(\n\t\t\t'organization_id' => $org_id,\n\t\t\t'first_name' => $fname,\n\t\t\t'last_name' => $lname\n\t\t);\n\n\t\t$has_extra = false;\n\n\t\tif($address) {\n\t\t\t$has_extra = true;\n\t\t\t$params['street'] = $address;\n\t\t}\n\n\t\tif($postal) {\n\t\t\t$has_extra = true;\n\t\t\t$params['zipcode'] = $postal;\n\t\t}\n\n\t\tif($email) {\n\t\t\t$has_extra = true;\n\t\t\t$params['email'] = $email;\n\t\t}\n\n\t\tif($home_phone) {\n\t\t\t$has_extra = true;\n\t\t\t$params['home_phone'] = $home_phone;\n\t\t}\n\n\t\tif($work_phone) {\n\t\t\t$has_extra = true;\n\t\t\t$params['work_phone'] = $work_phone;\n\t\t}\n\n\t\tif(!$has_extra) {\n\t\t\tthrow new Exception('Need one of address, phone, email or postal');\n\t\t\t//return false;\n\t\t}\n\n\t\t$uri = http_build_query($params);\n\n\t\t$resp = $this->client->request('GET',$match_endpoint,['query' => $params]);\n\n\t\tif($resp->getStatusCode() == 200) {\n\t\t\t$raw = $resp->getBody();\n\t\t\t$arr = $this->cleanResponse(json_decode($raw));\n\n\t\t\tif(count($arr['errors'])) {\n\t\t\t\t//what do we do with these.....\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception('Soemthing went wrong with the request. Response was: '.$res->getStatusCode());\n\t\t}\n\n\t\tif(count($arr['data'])) {\n\t\t\treturn $arr['data']->id;\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasTelephone(): bool;", "public function validate_account(){ \n\t\tif($this->data['Client']['account_holder'][0] != ''){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function issetNonProfitSocialAddress($index)\n {\n return isset($this->nonProfitSocialAddress[$index]);\n }", "private function isValidAddress($addressId)\r\n {\r\n $address = Shopware()->Models()->find('Shopware\\Models\\Customer\\Address',$addressId);\r\n return $this->get('shopware_account.address_validator')->isValid($address);\r\n }", "public function validateDeliveryAddress($street = '', $postcode = \"\", $city = \"\")\n {\n return $this->apiClient->doCall(\n \"get\",\n \"address?\" . http_build_query(\n array(\n 'street' => $street,\n 'postcode' => $postcode,\n 'city' => $city,\n )\n )\n );\n }", "public function contact_company()\n {\n }", "public function delete_address(){\n\t\t\t\t\t\t//$this->ADDRESS[$last_index] = $address;\n\t\t\t\t$error = 0;\n\t\t\t\t\t$deleted = 0;\n\t\t\t\t\t\t\t$address;\n\t\t\t\t$count = 0;\n\n\n\t\t\t\twhile($count < $this->get_address_count()) {\n\n\n\t\t\t\t\t\tif($this->get_address($count + 1)->get_status() == 'deleted' ) {\n\n\t\t\t\t\t\t\tif((!$address[$deleted]['addressId'] = $this->get_address($count + 1)->get_id()) && $error = 1)\n\t\t\t\t\t\t\t\ttrigger_error('REQUIRED Organization (ID) not provided', E_USER_ERROR);\n\t\t\t\t\t\t\t\t\t$deleted++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$count++;\n\n\t\t\t\t}\n\n\n\n\t\t\t\t\tif($error == 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t$address = json_encode($address);\n\t\t\t\t\t\t\t\t$sql = 'CALL deleteOrganizationAddress('.$this->get_id().', '.json_encode($address) .')';\n\t\t\t\t\t\t\t\t$statement = $this->DB_Driver->prepare_query($sql);\n\t\t\t\t\t\t\t\t$statement->execute();\n\t\t\t\t\t\t} catch(Exception $e) {\n\t\t\t\t\t\t\ttrigger_error($e->getMessage(), E_USER_ERROR);\n\t\t\t\t\t\t\t$error = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn ($error == 0 ) ? true : false;\n\n\t\t\t}", "abstract function is_business();", "private function ignoreAddressValidation()\n {\n $this->_quote->getBillingAddress()->setShouldIgnoreValidation(true);\n if (!$this->_quote->getIsVirtual()) {\n $this->_quote->getShippingAddress()->setShouldIgnoreValidation(true);\n if (!$this->_config->getValue('requireBillingAddress')\n && !$this->_quote->getBillingAddress()->getEmail()\n ) {\n $this->_quote->getBillingAddress()->setSameAsBilling(1);\n }\n }\n }", "public function isValid()\n\t{\n\t\tif(is_null($this->postal_code)\n\t\t\t|| is_null($this->country)\n\t\t\t|| is_null($this->firstname)\n\t\t\t|| is_null($this->lastname)\n\t\t\t|| is_null($this->address)\n\t\t\t|| is_null($this->email)\n\t\t\t|| is_null($this->city)\n\t\t)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "function checkClientOnBS() {\n\t\t$retval = false;\n\n\t\t$q = new DBQuery ( );\n\t\t$q->addTable ( \"company_building_solution\" );\n\t\t$q->addQuery ( \"count(*)\" );\n\t\t$q->addWhere ( \"company_bs_company_id = $this->company_id\" );\n\n\t\t$num = intval ( $q->loadResult () );\n\t\tif ($num > 0)\n\t\t\t$retval = true;\n\n\t\t$q->clear ();\n\n\t\treturn $retval;\n\t}", "public static function canApply($address)\n {\n // Put here your business logic to check if fee should be applied or not\n // Example of data retrieved :\n // $address->getShippingMethod(); > flatrate_flatrate\n // $address->getQuote()->getPayment()->getMethod(); > checkmo\n // $address->getCountryId(); > US\n // $address->getQuote()->getCouponCode(); > COUPONCODE\n return true;\n }", "function list_addr() {\n $this->set_error('list_addr is not implemented');\n return false;\n }", "public function isDefaultBillingAddress()\n {\n return $this->default_billing == 'Y' ? true : false;\n }", "public function all_contact_address_info(){\r\n $query = \"SELECT * FROM tbl_contact_us_address\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "function _addresses_country_valid($country) {\n if (empty($country)) {\n return FALSE;\n }\n\n // Country codes are listed in lowercase throughout the system\n $country = drupal_strtolower($country);\n\n // Cache results to prevent _addresses_country_get() being ran unnecessarily\n // Won't be needed once http://drupal.org/node/680376 is complete\n static $countries = array(\n 'invalid' => array(),\n 'valid' => array()\n );\n // If country is in the invalid sub-array elseif in the valid sub-array\n if (array_search($country, $countries['invalid']) !== FALSE) {\n return FALSE;\n }\n elseif (array_search($country, $countries['valid']) !== FALSE) {\n return TRUE;\n }\n\n // See if country code is found by _addresses_country_get().\n if (!_addresses_country_get(array($country => ' '))) {\n $countries['invalid'][] = $country;\n return FALSE;\n }\n\n $countries['valid'][] = $country;\n return TRUE;\n}" ]
[ "0.7614875", "0.7490917", "0.72619456", "0.7152064", "0.7067903", "0.70461094", "0.687425", "0.68439084", "0.6722846", "0.67154086", "0.6649801", "0.66025484", "0.66022635", "0.6530079", "0.6506405", "0.6502913", "0.64472663", "0.64141995", "0.6301413", "0.62307197", "0.6226996", "0.61638314", "0.61508566", "0.6090192", "0.6080126", "0.6074487", "0.60731715", "0.6052483", "0.60424966", "0.5992658", "0.5969368", "0.59653693", "0.59297407", "0.59187645", "0.591398", "0.591207", "0.5908482", "0.5903031", "0.58880365", "0.5882016", "0.58649427", "0.58574617", "0.5843016", "0.58265144", "0.5825702", "0.58250624", "0.58216286", "0.58140326", "0.5806977", "0.5787961", "0.5764856", "0.5761259", "0.5761259", "0.57603115", "0.5756315", "0.5745451", "0.5739462", "0.5725784", "0.5724275", "0.5712347", "0.5712347", "0.5709247", "0.56906176", "0.5686692", "0.56816363", "0.5680959", "0.56664103", "0.5663791", "0.5632643", "0.56219894", "0.56009555", "0.55989826", "0.55989826", "0.55983454", "0.5598054", "0.5597011", "0.5557171", "0.5551245", "0.5551007", "0.5550616", "0.5547428", "0.5532672", "0.55309093", "0.5516009", "0.55088675", "0.5507101", "0.5500573", "0.5496277", "0.5475702", "0.5471827", "0.546999", "0.54595613", "0.5457485", "0.5455685", "0.5455431", "0.5454918", "0.5444373", "0.5436887", "0.54275614", "0.5425931" ]
0.7047752
5
TODO Refactor only for backend
public function getEditlink(){ return sprintf("<a href=\"/administration_company_edit/index/companyid/%s\">%s</a>", $this->getId(), $this->getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _request() {}", "protected function _response() {}", "function getBackend() ;", "private function setUpBackend() {}", "protected abstract function _getBackend();", "public function getBackend() {}", "public function getBackend() {}", "public function preRetrieve();", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function __construct() {}", "protected function setUpBackend() {}", "public function fetch() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function __construct () {}", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "private function __construct() {\n \n }", "protected function __init__() { }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function __construct(){}", "protected function __construct(){}", "protected function __construct(){}", "abstract public function retrieve();", "public function helper()\n\t{\n\t\n\t}", "protected final function __construct() {}", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "public function getFrontendResult()\n\t{\t\t\n\t\t// not implement yet.\n\t}", "public function getBackendResult()\n\t{\t\t\n\t\t// not implement yet.\n\t\t//$crumbs = md5(self::HASHSUM.$this->_invoice);\n\t}", "private function __construct () {}", "public function obtener()\n {\n }", "abstract function get();", "abstract public function get() ;", "public function api_call() {\n\n }", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "final private function __construct(){\r\r\n\t}", "public function __construct() {\n \n }", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.5889037", "0.5783876", "0.5768973", "0.56013995", "0.5515013", "0.5495333", "0.5495333", "0.54437286", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5378712", "0.5369852", "0.5363389", "0.5347959", "0.5347959", "0.5347959", "0.5347959", "0.53440696", "0.52953523", "0.52953523", "0.52953523", "0.52897435", "0.52844524", "0.52844524", "0.52844524", "0.52844524", "0.52841777", "0.52841777", "0.52841777", "0.52841777", "0.52841777", "0.52841777", "0.52834105", "0.52834105", "0.52712935", "0.52712935", "0.52712935", "0.5242464", "0.52394253", "0.5224782", "0.52071714", "0.5188615", "0.5185302", "0.5148438", "0.51479775", "0.51372373", "0.5128789", "0.5121834", "0.5121826", "0.5121826", "0.5121826", "0.5121826", "0.5121826", "0.5121826", "0.51211846", "0.5119738", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553", "0.51158553" ]
0.0
-1
Check Token Of Expire or Not Then Have it Refreshed.
public function refreshToken() { $token = $this->getToken(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkTokenExpire()\n {\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n $this->getAuthorization();\n }\n }", "protected function regenerateTokenIfNotNew()\n {\n if ($this->tokenExpiry !== null) {\n $this->regenerateToken();\n }\n }", "public function refresh_token()\n {\n if ($result = $this->request('refresh_token')) {\n if (isset($result->token)) {\n $this->token_update($result->token);\n return true;\n }\n }\n return false;\n }", "private function checkExpirated() {\n\n }", "private function refreshToken()\n {\n syslog(LOG_DEBUG, \"Monzo: Refreshing Token\");\n $data = array(\n 'grant_type' => 'refresh_token',\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'refresh_token' => $this->refreshToken\n );\n $jsonResponse = $this->getJson('/oauth2/token', $data, false);\n if (isset($jsonResponse['access_token']) && isset($jsonResponse['refresh_token']))\n {\n syslog(LOG_DEBUG, \"Monzo: Token refreshed, validating\");\n $this->refreshToken = $jsonResponse['refresh_token'];\n $this->bearerToken = $jsonResponse['access_token'];\n if ($this->validateTokens())\n {\n syslog(LOG_DEBUG, \"Monzo: Token refreshed, validated and stored\");\n $this->storeTokens($this->bearerToken, $this->refreshToken);\n return true;\n }else {\n syslog(LOG_DEBUG, \"Monzo: Token refreshed, but failed to validate\");\n return false;\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Not able to refresh token\");\n throw new Exception('Monzo Not able to refresh token');\n return false;\n }\n }", "public function ensureToken()\n {\n if ($this->tokenExpiry === null) {\n $this->regenerateToken();\n }\n }", "public function isRefreshExpired()\n {\n return $this->refresh_token->isExpired();\n }", "public function validateRefreshToken()\n {\n try {\n\n // Try to get token from header\n $token = $this->getBearerToken();\n \n // let's check if refreshToken is valid\n $refreshToken = JWT::decode($token, API_REFRESH_TOKEN_KEY, [''.API_ALGORITHM.'']);\n \n //print_r($refreshToken);\n $db = new Database();\n $this->database = $db->connect(); \n \n $tokenType = TOKEN_TYPE_REFRESH;\n \n try {\n $sql = $this->database->prepare(\"SELECT UserId, \n Token FROM \n tokens WHERE \n Token = :token AND \n TokenType = :tokentype\");\n $sql->bindParam(\":token\", $token);\n $sql->bindParam(\":tokentype\", $tokenType);\n $sql->execute();\n $dbToken = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n \n //print_r($tokens);\n \n // if there is no any results from db return that there is no matchign refresh token\n if (!is_array($dbToken)) {\n $this->response(NO_MATCHING_REFRESH_TOKEN, \"No matching refresh token found.\"); \n }\n \n // Not needed, JWT::decode should throw an exception before this\n if ($refreshToken->exp < time()) {\n $this->throwException(REFRESH_TOKEN_ERROR, \"dsadsa\");\n }\n \n //print_r($dbToken);//debug\n \n //if validation has passed all above we still have to check if user is not disabled\n $sql = null;\n try {\n $sql = $this->database->prepare(\"SELECT Id, Disabled FROM users WHERE Id = :id\");\n $sql->bindParam(\":id\", $dbToken['UserId']);\n $sql->execute();\n $user = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n \n if ($user['Disabled'] == 1 ) {\n $this->response(USER_IS_DISABLED, \"This user is disabled.\");\n }\n \n // if refreshToken is valid. Let's generate new Tokens. Both tokens are always generated, \n // so it is enough to call generateTokens\n $this->generateTokens($dbToken['UserId'], $refreshToken->exp);\n \n } catch (Exception $e) {\n //close db connection\n //$this->database->disconnect();\n $this->throwException(REFRESH_TOKEN_ERROR, \"RefreshToken: \".$e->getMessage());\n }\n }", "function csrf_token_is_recent() {\n\t$max_elapsed = 60 * 60 * 24; // 1 day\n\tif(isset($_SESSION['csrf_token_time'])) {\n\t\t$stored_time = $_SESSION['csrf_token_time'];\n\t\treturn ($stored_time + $max_elapsed) >= time();\n\t} else {\n\t\t// Remove expired token\n\t\tdestroy_csrf_token();\n\t\treturn false;\n\t}\n}", "public function isTokenExpired()\n {\n return Carbon::now()->greaterThanOrEqualTo($this->getTokenExpiry()->subMinutes(5));\n }", "public function isTokenExpired()\n {\n return Carbon::now()->greaterThanOrEqualTo($this->getTokenExpiry()->subMinutes(5));\n }", "protected function diffTokenTimeExpire()\n {\n $tokenLife = $this->tokenTime + $this->tokenExpire;\n\n return ($tokenLife < time()) ? false : true;\n }", "public function isExpired() {}", "public function checkToken(string $token)\n {\n if ($token = Token::select()->where('token', $token)->first()) {\n if (new DateTime($token->getAttribute('expire')) < $this->timeService->getDate()) {\n $this->deleteToken($token);\n return false;\n } else {\n $this->renewToken($token);\n $token->save();\n return true;\n }\n }\n return false;\n }", "function token_invalidate()\r\n{\r\n\tglobal $DATABASE;\r\n\t\r\n\t$unix_ts = time();\r\n\t\r\n\tforeach($DATABASE->execute_query('SELECT * FROM `logged_in`') as $value)\r\n\t{\r\n\t\tif(($unix_ts - $value[3]) > 259200)\r\n\t\t\t$DATABASE->execute_query(\"DELETE FROM `logged_in` WHERE time = ?\", \"i\", $value[3]);\r\n\t}\r\n}", "public function refreshAccessTokenIfNecessary()\n {\n $user = auth()->user();\n // dd(json_decode($user->xero_access_token,true));\n $accessToken = new AccessToken(json_decode($user->xero_access_token,true));\n\n if ($accessToken->hasExpired()) {\n $accessToken = $this->getOAuth2()->refreshAccessToken($accessToken);\n\n $user->xero_access_token = json_encode($accessToken);\n dd(json_encode($accessToken));\n $user->save();\n $successMessage=\"New Access Token generated\";\n return $this->successResponse($user, $successMessage, 200);\n }\n $successMessage=\"Token Didn't expired\";\n return $this->successResponse($user, $successMessage, 200);\n }", "function Check() {\n\t\t// Check if the token has been sent.\n\t\tif(isset($_REQUEST['spack_token'])) {\n\t\t\t// Check if the token exists\n\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t// Check if the token isn't empty\n\t\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t\t$age = time()-$_SESSION[\"spackt_\".$_REQUEST['spack_token']];\n\t\t\t\t\t// Check if the token did not timeout\n\t\t\t\t\tif($age > $this->timeout*60) $this->error = 4;\n\t\t\t\t}\n\t\t\t\telse $this->error = 3;\n\t\t\t}\n\t\t\telse $this->error = 2;\n\t\t}\n\t\telse $this->error = 1;\n\t\t// Anyway, destroys the old token.\n\t\t$this->tokenDelAll();\n\t\tif($this->error==0) return true;\n\t\telse return false;\n\t}", "public function isTokenExpired()\n {\n $expireTime = $this->getDataValue('expiration') - time();\n return $expireTime < 5;\n }", "public function isMyTokenExpired() {\n if ($this->getExpiresAt() instanceof \\DateTime) {\n return $this->getExpiresAt()->getTimestamp() < time();\n }\n return null;\n }", "private function getRefreshToken() {\n if (!empty($this->refresh_token)) {\n return $this->refresh_token;\n } else {\n $api_keys=db_asocquery(\"SELECT * FROM cfgesitoken WHERE `tokenID` = '$this->tokenID';\");\n if (count($api_keys) == 1) {\n if (isset($api_keys[0]['token'])) {\n $this->refresh_token = $api_keys[0]['token'];\n return $this->refresh_token;\n }\n }\n }\n\treturn FALSE;\n }", "public function tokenExpired()\n {\n if (empty($this->token_expires)) {\n return true;\n }\n\n return new FrozenTime($this->token_expires) < FrozenTime::now();\n }", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function clean_old_token() {\r\n $query = '\r\n -- delete expired token (for everybody)\r\n DELETE FROM `user_token` WHERE token_exp < NOW() ;\r\n ';\r\n $this->dbh->execute($query, []);\r\n }", "public function refresh()\n {\n try {\n if ($token = $this->guard()->refresh()) {\n return response()\n ->json([\n 'error' => false,\n 'message' => 'Your token already refreshed',\n 'data' => [\n 'token' => $token\n ]\n ], 200)\n ->header('Authorization', $token)\n ;\n }\n \n return response()->json([\n 'error' => true,\n 'message' => 'Your credentials is invalid, failed to refresh token',\n 'data' => []\n ], 401);\n } catch (\\Throwable $th) {\n $this->guard()->logout();\n\n return response()->json([\n 'error' => false,\n 'message' => 'Successfully logging out from system'\n ], 200);\n }\n }", "public function validateTokenTime($token) {\n \t// get token validation\n \tif(Reset::where('token', $token)->count() > 0) {\n\t \t$reset = Reset::where('token', $token)->first();\n\n\t \tdate_default_timezone_set('UTC'); \n\t $date_two = date('Y-m-d H:i:s ', time());\n\n\t $minutes = round((strtotime($date_two) - strtotime($reset->updated_at)) / 60,2);\n\t $hours = round((strtotime($date_two) - strtotime($reset->updated_at))/(60*60));\n\n\t if($hours >= 24) {\n\t return \"expired\";\n\t } else {\n\t return \"working\";\n\t }\n\t } else {\n\t \treturn \"working\";\n\t }\n }", "function almost_expired($jwt) {\n //$ALMOST_EXPIRED_RENEW = 3600;\n $almost_expired_gap = ALMOST_EXPIRED_GAP;\n\n // if we use class we dont need to repeat get configuration\n $config = Factory::fromFile('config/config-moorecloud.php', true);\n $secretKey = base64_decode($config->get('jwt')->get('key'));\n $algorithm = $config->get('jwt')->get('algorithm');\n JWT::$leeway = 60; \n $decoded = JWT::decode($jwt,\n $secretKey,\n [$algorithm]\n );\n $decoded_array = (array) $decoded;\n \n $expire = $decoded_array['exp'];\n $gap = $expire - time();\n if ($gap > 0 && $gap <= $almost_expired_gap) {\n echo \"need renew\";\n return true;\n } else {\n echo \"good token\";\n }\n\n return false;\n}", "public function accessTokenValid()\n {\n return $this->expireTime > time();\n }", "public function expire() {\n logit_r($this, 'expire'); \n $status = ($this->status == UserLoginReq::STATUS_NOTIFIED) ? UserLoginReq::STATUS_PAST_GRACE : UserLoginReq::STATUS_EXPIRED;\n logit_r($status, 'status');\n $this->status = $status;\n $this->save(true);\n }", "public function hasRefreshToken ()\n {\n return $this->refreshToken != null;\n }", "public function getNewRefreshToken()\n {\n // TODO: Implement getNewRefreshToken() method.\n }", "public function isExpired(): bool;", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function securityUpdateToken() {\n\tif (isset($_SESSION['security_token']['time']) && $_SESSION['security_token']['time'] + TOKEN_EXPIRATION > time()) {\n\t\t$_SESSION['security_token']['time'] = time();\n\t\treturn;\n\t}\n\n\t// update the token\n\t$_SESSION['security_token'] = array();\n\t$_SESSION['security_token']['value'] = md5(time());\n\t$_SESSION['security_token']['time'] = time();\n}", "function expire_token() {\n return time() + (60 * 60 * 24);\n}", "public function isRefreshTokenRevoked($tokenId)\n {\n return false;\n }", "public function getRefreshToken();", "function checkToken() {\n\t\t\t// Split the token up again to make sure the first 40 chars are the same (TOKEN)\n\t\t\t$splitToken = substr($this->tokenFromCookie, 0, 40);\n\t\t\t\n\t\t\t// Split the token up again to make sure the second 40 chars are the same (ZIPPED)\n\t\t\t$splitZipped = substr($this->tokenFromCookie, 40, 40);\n\t\t\t\n\t\t\t// Unzip the second 40 chars\n\t\t\t$result = $this->unzip($splitZipped);\n\n\t\t\t// Check if the sha of the zipped portion matches the token.\n\t\t\t// If so, no one has messed with the token\n\t\t\tif(strcmp($splitToken, sha1($splitZipped) == 0)) {\n\t\t\t\t// Grab all data from unzip\n\t\t\t\t$ip = base_convert($result[0], IP_ADDRESS, 10);\n\t\t\t\t$time = base_convert($result[1], REQUEST_TIME, 10);\n\t\t\t\t$user = $result[2];\n\t\t\t\t$random = $result[3];\n\t\t\t\t$expires = substr($this->tokenFromCookie, 80, strlen($this->tokenFromCookie));\n\n\t\t\t\t// Check if token is expired after one hour\n\t\t\t\tif(time() - $expires <= 3600) {\n\t\t\t\t\tif(strpos($_SERVER['REMOTE_ADDR'], \":\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\":\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\telseif(strpos($_SERVER['REMOTE_ADDR'], \".\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\".\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if userIp is the same as when s/he originally logged in\n\t\t\t\t\t$validity = (strcmp($ip, $userIpAddImp) == 0) ? true : false;\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\t$validity = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$validity = false;\n\t\t\t}\n\t\t\t\n\t\t\treturn $validity;\n\t\t}", "public function testRefreshTokenNotExpired()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::NOT_EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertFalse($tokenHasBeenUpdated);\n }", "public function isAccessTokenExpired() {\n return ($this->received_at + $this->expires_in - 60) < time();\n }", "public function removeRefreshToken();", "abstract protected function isExpired();", "public function is_token_expire_error($res)\n\t{\n\t\tif (isset($res->error) && $res->error->code == self::TOKEN_EXPIRED_CODE)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public function hasTokenExpired()\n {\n $tokenTimestamp = $this->flagManager->getFlagData(self::TOKEN_RECEIVED_TIMESTAMP);\n if ($tokenTimestamp !== null) {\n $date = (new \\DateTime())->getTimestamp();\n $validity = $this->flagManager->getFlagData(self::TOKEN_EXPIRES_IN_FLAG_NAME);\n return $date > $tokenTimestamp + $validity - self::TOKEN_VALIDITY_MARGIN_IN_SECONDS;\n }\n return true;\n }", "private function validateAccessToken()\n\t{\n\t\tif (file_exists($this->accessToken))\n\t\t{\n\t\t\t$fileAge = filemtime($this->accessToken);\n\t\t\t$now = time();\n\n\t\t\tif ($now - $fileAge > 3600)\n\t\t\t{\n\t\t\t\tunlink($this->accessToken);\n\t\t\t\t$this->fetchAccessToken();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\t\t$this->fetchAccessToken();\n\t}", "public function verifyForgotPasswordToken(Request $request, $token)\n {\n $resetToken = PasswordReset::where('token', $token)->first();\n if (isset($resetToken)) {\n // $resetToken[\"current_date\"] = date('Y-m-d H:i:s', strtotime(gmdate(\"Y-m-d H:i:s\")));\n // $resetToken[\"expiry_date\"] = date('Y-m-d H:i:s', strtotime($resetToken[\"created_at\"]) + 86400);\n $expire_within_hours = ((strtotime($resetToken[\"created_at\"]) + (env('REQUEST_EXPIRATION_TIME') * 3600)) - strtotime(gmdate(\"Y-m-d H:i:s\"))) / 3600;\n $request->session()->put(['email' => $resetToken->email]);\n $request->session()->put(['token' => $resetToken->token]);\n $request->session()->put(['expiry' => $expire_within_hours]);\n if ($expire_within_hours < 0) {\n return redirect('/message')->with('warning', \"Sorry! This link has been expired.\");\n }\n //if token is valid, redirect to reset form\n return view(\"passwordResetForm\", compact('resetToken'));\n }\n return redirect('/message')->with('warning', \"Sorry your request could not be found or may have been deleted.\");\n }", "public function testRefreshTokenExpiredWithoutTokenInStorage()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n $this->mockTokenStorage(null);\n $this->mockGoogleResourceOwner();\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertFalse($tokenHasBeenUpdated);\n }", "public function regenerateSessionAuthToken(): bool;", "public function isRefreshTokenRevoked($tokenId) {\n // TODO: Implement isRefreshTokenRevoked() method.\n return false;\n }", "public function verify()\n {\n $users_email = $this->input->get('users_email');\n $token = $this->input->get('tk_token');\n\n $users = $this->db->get_where('tbl_users',['users_email' => $users_email])->row_array();\n\n if($users){\n $tbl_token = $this->db->get_where('tbl_token', ['tk_token' => $token])->row_array();\n\n if($tbl_token) {\n if(time() - $tbl_token['tk_time'] < ('60*60*24')) {\n\n $this->M_auth->Activation($users_email,$token);\n\n // $this->db->set('users_status',1);\n // $this->db->where('users_email',$users_email);\n // $this->db->update('tbl_users');\n // $this->db->delete('tbl_token',['tk_email' =>$token]);\n\n $this->session->set_flashdata('message','<div class=\"alert alert-success\" role=\"alert\">'. $users_email . '\n telah di aktivasi. silahkan login</div>');\n redirect('auth');\n\n } else {\n //token expired\n $this->db->delete('tbl_users',['users_email' => $users_email]);\n $this->db->delete('tbl_token',['tk_email' => $token]);\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-danger\" role=\"alert\">Aktivasi akun gagal!, token kadaluarsa</div>');\n }\n\n } else {\n //token\n $this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Aktivasi akun gagal! token salah. </div>');\n redirect('auth');\n }\n\n } else {\n $this->session->set_flashdata('message', '<div class=\"alert alert-danger\" role=\"alert\">Aktivasi akun anda gagal! akun salah</div>');\n redirect('auth');\n }\n\n }", "public function testRefreshTokenExpired()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n $this->mockTokenStorage($oauthToken);\n $this->mockGoogleResourceOwner();\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertTrue($tokenHasBeenUpdated);\n }", "private function tokenHandler()\n {\n // Prevent for infinite loop.\n // Because this method use post method to get JWT. And POST method also call this method itself.\n if (!$this->verifyToken) {\n return;\n }\n\n $this->checkConfiguration();\n\n $cachedJWT = $this->cache->getItem('jwt');\n\n if (!$cachedJWT->isHit()) { // Check JWT presence.\n $this->verifyToken = false;\n\n $this->cacheJsonWebToken($cachedJWT);\n\n $this->verifyToken = true;\n }\n\n if ($this->isTokenExpired($cachedJWT->get())) { // Check JWT expired.\n $this->verifyToken = false;\n\n $this->cacheJsonWebToken($cachedJWT);\n\n $this->verifyToken = true;\n\n }\n\n // Save JWT\n $this->jwt = $cachedJWT->get();\n }", "public function is_expired()\n {\n }", "public function refreshToken()\n\t{\n\t\tAuth::user()->generateToken()->didUpdate()->save();\n\n\t\t// Return token\n\t\treturn response()->json([\n\t\t\t'status' => 'Token updated',\n\t\t\t'token' => Auth::user()->token,\n\t\t], 200);\n\t}", "public function removeExpiredRefreshTokens() {\n\n $em = AuthDAL . getEntityManager();\n\n $query = $em->createQuery(\n 'DELETE FROM OAuth2_RefreshToken '\n . 'WHERE expires_at < ?'\n );\n\n $query->setParameter(1, new DateTime());\n\n $query->getResult();\n }", "public function expire();", "public function tokenIsExpired(): bool\n {\n if (empty($this->expirationTime)) {\n throw OsstException::emptyExpirationTime();\n }\n\n return $this->expirationTime <= time();\n }", "public function getExpired();", "protected function refreshToken()\n {\n $user = Auth::user();\n\n if ($user) {\n $body = $this->getRefreshTokenBodyRequest($user);\n } else {\n // No user found. Terminate the session.\n return false;\n }\n\n $response = parent::post($this->refreshTokenUrl, $body);\n\n if ($response->failed()) {\n // Token did not refreshed, current session will be terminated\n return false;\n } else {\n $body = $response->json();\n\n if ($this->withoutWrapper) {\n $result = $body;\n } else {\n $result = $body[$this->wrapperKey];\n }\n\n // Store the new access token to the user repository\n $user->setAccessToken($result[$this->accessTokenName]);\n\n // If the result contain new refresh token, save it as well\n if (! is_null($result[$this->refreshTokenName])) {\n $user->setRefreshToken($result[$this->refreshTokenName]);\n }\n\n // Renew the token in the object memory\n $this->withToken($user->getAccessToken(), $user->getTokenSchema());\n\n return true;\n }\n }", "public function loginWithRefreshToken() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('refresh_token', 'Token', 'required');\n $this->form_validation->set_rules('uuid', 'UUID', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n // verify token\n if ($this->user_model->getValue('refresh_token') != $this->input->post('refresh_token')) {\n \tlog_message('debug', 'token provided: ' . $this->input->post('refresh_token') . ' local: ' . $this->user_model->getValue('refresh_token'));\n \t$this->error(404, 'Verification error');\n }\n \n \tif ($this->user_model->getValue('confirmed') == 0) {\n \t\t$this->error(206, 'Please confirm the account');\n \t}\n \n\t\t// refresh token\n\t\t$refresh_token = $this->generateToken();\n\t\t$this->user_model->setValue('refresh_token', $refresh_token);\n\t\t\n\t\t// update refresh token\n\t\tif (! $this->user_model->updateToken($this->input->post('refresh_token'))) {\n\t\t\t$this->error(400, 'Error while creating token');\n\t\t}\n\n\t\t// save userid into session and send token\n\t\t$this->session->userid = $this->user_model->getValue('id');\n\t\t$data['refresh_token'] = $refresh_token;\n\t\t$this->response($data);\n }", "public function getExpired() {\n\t\t\n\t}", "public function refreshToken()\n {\n return $this->token['refresh_token'] ?? null;\n }", "public function clearExpiredTokens()\n {\n // It is not necessary to clear expired tokens; the token expiration time is set when writing\n }", "public function removeStaleResetTokens() {\n\t\t$delta = $this->getTokenFreshnessDays();\n\t\tif ( !empty($delta) ) {\n\t\t\t$this->getMyModel()->removeStaleTokens(static::TOKEN_PREFIX.'%', $delta.' DAY');\n\t\t}\n\t}", "public function isRefreshTokenRevoked($tokenId)\n {\n // TODO: Implement isRefreshTokenRevoked() method.\n }", "public function setTokenValidDate()\n {\n $this->tokenValidDate = new DateTime('+ 2 hours');\n }", "public static function is_csrf_token_recent() {\n\t\t$max_elapsed_time = Security_Config::$csrf_token_lifetime;\n\t\t$token_time = $_SESSION ['csrf_token_time'];\n\t\tif (($token_time + $max_elapsed_time) > time ()) {\n\t\t\treturn TRUE;\n\t\t} else\n\t\t\treturn FALSE;\n\t}", "public function regenerateToken();", "function media_theplatform_mpx_check_token() {\n if (!media_theplatform_mpx_variable_get('token')) {\n return FALSE;\n }\n // If idleTimeout date has passed, signIn again.\n if (media_theplatform_mpx_variable_get('date_idletimeout') < time()) {\n // Expire the current token.\n media_theplatform_mpx_expire_token();\n // Retrieve and return new token.\n return media_theplatform_mpx_signin();\n }\n else {\n return TRUE;\n }\n}", "public function reset_password(){\n \n //validate the $_GET variable\n $_GET=filter_var_array($_GET,FILTER_SANITIZE_STRING);\n\n if(!isset($_GET[\"selector\"]) || !isset($_GET[\"validator\"])){\n\n header(\"Location:{$this->config->domain()}\");\n die(); \n }\n\n //store the selector $_GET variable\n $token_selector=(isset($_GET[\"selector\"])) ? $_GET[\"selector\"] : \"\";\n \n //conver the the validator to the random_bytes\n $url_token_validator=(isset($_GET[\"validator\"])) ? hex2bin($_GET[\"validator\"]) : \"\";\n \n //store all information related to the token\n $token_info=array();\n \n //store the token model's object\n $token_obj=$this->model_objs[\"token_obj\"];\n \n //fetch E-mail validation token using $token_selector\n $fetch_token=$token_obj->select(array(\n \"column_name\"=>\"\n tokens.token_validator,\n tokens.token_expires,\n tokens.user_id\n \",\n \"where\"=>\"tokens.token_usage='password_reset' AND tokens.token_selector='{$token_selector}'\"\n ));\n \n if($fetch_token[\"status\"] == 1 && $fetch_token[\"num_rows\"] == 1){\n \n $token_info=$fetch_token[\"fetch_all\"][0];\n\n }else{\n \n echo \"<h2>The URL is no longer available</h2>\";\n\n die();\n }\n \n\n if(!empty($token_info)){\n \n //set the timezone to Asia/Dhaka\n date_default_timezone_set(\"Asia/Dhaka\");\n \n //store the current time stamp\n $current_time=date(\"U\");\n \n //store the difference between the current time and token expire time\n $time_diff=$token_info[\"token_expires\"] - $current_time;\n \n //check if time difference reaches 0 or less than \n if($time_diff <= 0){\n\n echo \"The link has already been expired\";\n\n die();\n }\n\n //now match $url_token_validator and $db_token_validator\n if(password_verify($url_token_validator,$token_info[\"token_validator\"])){\n \n /**\n * update the user_email_status \n * and user_account_status \n */\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Reset Password\";\n\n $this->view(\"accounts/reset_password\",$this->data);\n\n }else{\n\n $this->data[\"title_tag\"]=\"Lobster | Invalid URL\";\n\n echo \"<h2>Invalid URL</h2>\";\n }\n\n \n }\n\n \n \n\n \n \n }", "public function ResetAdminTokenValidation($token){\n return DB::table('password_resets')\n ->where('token',$token)\n ->where('created_at','>',Carbon::now()->subHour(2))\n ->first();\n }", "public function get_refresh_token() {\n return $this->refreshtoken;\n }", "private function delete_refresh_token() {\n global $DB, $USER;\n $grt = $DB->get_record('repository_gdrive_tokens', array('userid' => $USER->id));\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_deleted::create_from_userid($USER->id);\n $event->add_record_snapshot('repository_gdrive_tokens', $grt);\n $event->trigger();\n $DB->delete_records('repository_gdrive_tokens', array ('userid' => $USER->id));\n }", "function expired() {\r\n if(!file_exists($this->cachefile)) return true;\r\n # compare new m5d to existing cached md5\r\n elseif($this->hash !== $this->get_current_hash()) return true;\r\n else return false;\r\n }", "public function hasExpired(){\n if($this->isIndefinied())\n return false;\n\n \\Log::info('Hoy'.print_r(Carbon::now(),true));\n \\Log::info('Expira'.print_r(Carbon::parse($this->expires_on),true));\n return (bool) Carbon::now()->greaterThan(Carbon::parse($this->expires_on));\n }", "public function supportedToken()\n {\n if (!$this->diffTokenTimeExpire()) {\n $newToken = $this->createToken($this->user->getId());\n\n $this->user->updateUserToken($newToken);\n }\n return true;\n }", "public function isExpired() :bool\n {\n return ($this->expires < time());\n }", "public function isAccessTokenExpired()\n {\n return time() > $this->accessToken->created + $this->accessToken->expires_in;\n }", "public function handleTokenRefreshRequest() {\n\t\tif (!elgg_is_xhr()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// the page's session_token might have expired (not matching __elgg_session in the session), but\n\t\t// we still allow it to be given to validate the tokens in the page.\n\t\t$session_token = get_input('session_token', null, false);\n\t\t$pairs = (array) get_input('pairs', [], false);\n\t\t$valid_tokens = (object) [];\n\t\tforeach ($pairs as $pair) {\n\t\t\tlist($ts, $token) = explode(',', $pair, 2);\n\t\t\tif ($this->validateTokenOwnership($token, $ts, $session_token)) {\n\t\t\t\t$valid_tokens->{$token} = true;\n\t\t\t}\n\t\t}\n\n\t\t$ts = $this->getCurrentTime()->getTimestamp();\n\t\t$token = $this->generateActionToken($ts);\n\t\t$data = [\n\t\t\t'token' => [\n\t\t\t\t'__elgg_ts' => $ts,\n\t\t\t\t'__elgg_token' => $token,\n\t\t\t\t'logged_in' => $this->session->isLoggedIn(),\n\t\t\t],\n\t\t\t'valid_tokens' => $valid_tokens,\n\t\t\t'session_token' => $this->session->get('__elgg_session'),\n\t\t\t'user_guid' => $this->session->getLoggedInUserGuid(),\n\t\t];\n\n\t\telgg_set_http_header(\"Content-Type: application/json;charset=utf-8\");\n\t\treturn elgg_ok_response($data);\n\t}", "public function is_expired() {\n\t\treturn $this->get_expires() < time();\n\t}", "function resend_link($sToken){\n\t\t$aResult = $this->common_model->isValidToken($sToken, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif($aResult['status'] == $aTokenStatus['expired']){\n\n\t\t}\n\n\t\tredirect('home');\n\t\t\t//get the user and the purpose of the token\n\t\t\t\t//send the email\n\n\t}", "function __validToken($token_created_at) {\n $expired = strtotime($token_created_at) + 86400;\n $time = strtotime(\"now\");\n if ($time < $expired) {\n return true;\n }\n return false;\n }", "function validToken($name, $referer, $time)\n{\n\tif(isset($_SESSION[$name.'Token']) && isset($_SESSION[$name.'Token_time']) && isset($_POST['token']))\n\t\tif($_SESSION[$name.'Token']===$_POST['token'])\n\t\t\tif($_SESSION[$name.'Token_time']>=(time()-$time))\n\t\t\t\tif($_SERVER['HTTP_REFERER']==$referer)\n\t\t\t\t\treturn true;\n\treturn false;\n}", "public function reset_password($token)\n {\n $check_token = DB::table('password_resets')->where('token', $token)->where('created_at', '>', Carbon::now()->subHours(2))->first();\n if(!empty($check_token)){\n return view('Admin.login.reset_password', ['data' => $check_token]);\n }else{\n return redirect('en/admin/forget_password');\n }\n\n }", "public static function verifyRefreshJWT( $refreshJWT )\n {\n self::$UserDao = new UserDao();\n $refreshSecret = getenv('REFRESH_SECRET');\n $decoded = json_decode( JWT::decode( $refreshJWT, $refreshSecret, ['HS256'] ) );\n\n //la scadenza deve essere nel futuro\n $exp = $decoded->exp > time();\n //iat deve essere nel passato\n $iat = $decoded->iat < time();\n //il refreshToken dell'utente deve essere presente nel db\n $sub = $decoded->sub; // userID\n $userExist = null !== self::$UserDao->getRefreshToken($sub);\n\n if( $exp && $iat && $userExist ) return true;\n else{\n TokenManager::invalidateRefreshJWT($sub);\n return false;\n }\n }", "public function confirmForget() {\n $user_id = $_GET['id'];\n $token = $_GET['token'];\n $userForgetConfirmed = $this->model->confirmTokenAfterForget($user_id, $token);\n\n if ($userForgetConfirmed) {\n $this->model->setFlash('success', 'Votre compte est à nouveau validé');\n // $_SESSION['flash']['success'] = 'Votre compte est à nouveau validé';\n header('location:index.php?controller=security&action=formReset');\n } else {\n $this->model->setFlash('danger', \"Ce token n'est plus valide\");\n // $_SESSION['flash']['danger'] = \"Ce token n'est plus valide\";\n header('location:index.php?controller=security&action=formLogin');\n }\n }", "public function isExpiring() {\n return $this->expiration - time() < 22 * 24 * 3600;\n }", "public function PasswordResetReal(Request $request){\r\n if (empty($request->token)) {\r\n return response()->json([\r\n 'status'=>'info',\r\n 'message'=>'invalid link ,request for a new one'\r\n ]);\r\n }\r\n $email = PasswordReset::where('token',$request->token)->first()->email;\r\n\r\n if (!empty($email)) {\r\n $update = User::Where('email',$email)->update([\r\n 'password'=>Hash::make($request->password)\r\n ]);\r\n\r\n if ( $update) {\r\n PasswordReset::where('token',$request->token)->delete();\r\n \r\n return response()->json([\r\n 'status'=>'success',\r\n 'message'=>'Password reset was successful, you will be redirect to login in 2 seconds.'\r\n ]);\r\n }else{\r\n return response()->json([\r\n 'status'=>'info',\r\n 'message'=>'Error occuered ,try again later.'\r\n ]);\r\n }\r\n }else{\r\n return response()->json([\r\n 'status'=>'info',\r\n 'message'=>'Error occuered ,try again later.'\r\n ]);\r\n }\r\n }", "private function revoke_token() {\n $this->delete_refresh_token();\n $this->client->revokeToken();\n $this->store_access_token(null);\n }", "public function deleteExpiredTokens(): void\n {\n $this->model->newQuery()\n ->where('expires_at', '<', Carbon::now()->addSecond())\n ->delete();\n }", "public function is_access_token_expired() {\n\t\tif ( null == $this->token ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check if the token is expired in the next 30 seconds.\n\t\t$expired = ( $this->token['created'] + ( $this->token['expires_in'] - 30 ) ) < time();\n\n\t\treturn $expired;\n\t}", "public function actionPurgeExpiredTokens()\n {\n $now = Carbon::now();\n\n $this->cleanUpExpiredTokens($now);\n\n $this->cleanUpExpiredAuthorizationCodes($now);\n }", "public function validateAccessTokenTime($payload)\r\n {\r\n $output = 0;\r\n $dateNow = Carbon::now('UTC')->timestamp;\r\n if ($payload->creation_refrech_ttl_date == \"\" && $payload->expire_refrech_ttl_date == \"\") \r\n {\r\n $creation_ttl_date = $payload->creation_ttl_date;\r\n $expire_ttl_date = $payload->expire_ttl_date;\r\n $expire_refresh_ttl_date = Carbon::createFromTimestampUTC($payload->creation_ttl_date)->timestamp;\r\n $expire_refresh_ttl_date = Carbon::createFromTimestampUTC($expire_refresh_ttl_date)->addMinutes(Config(\"config.refresh_ttl\"))->timestamp;\r\n } \r\n else \r\n {\r\n $creation_ttl_date = $payload->creation_ttl_date;\r\n $expire_ttl_date = $payload->expire_ttl_date;\r\n $expire_refresh_ttl_date = $payload->expire_refrech_ttl_date;\r\n }\r\n if ($payload->expire_ttl_date > $dateNow) \r\n {\r\n if ($expire_refresh_ttl_date > $dateNow) \r\n {\r\n //token is ok\r\n $output = 1;\r\n } \r\n else \r\n {\r\n //token need refresh\r\n $output = 2;\r\n }\r\n } \r\n else \r\n {\r\n //token expired\r\n $output = 3;\r\n }\r\n return $output;\r\n }", "public function expiredtoken($name){\n $url = $this->Social->RequestNewToken();\n //set some data\n $this->set('name',$name);\n $this->set('url',$url);\n \n }" ]
[ "0.81163967", "0.69142765", "0.679769", "0.67382103", "0.6733025", "0.6693056", "0.6671909", "0.6653229", "0.66525435", "0.65717673", "0.65717673", "0.65066713", "0.6505363", "0.6499299", "0.64982045", "0.6496844", "0.6486168", "0.6480529", "0.64587563", "0.6439427", "0.6400668", "0.6386221", "0.6386221", "0.6386221", "0.6386221", "0.6386221", "0.6386221", "0.6386221", "0.63548714", "0.6318171", "0.630572", "0.6302458", "0.62997895", "0.6293464", "0.62880933", "0.6232405", "0.622814", "0.62250507", "0.62250507", "0.62221694", "0.6215794", "0.6209275", "0.61960524", "0.61848205", "0.61643356", "0.61625135", "0.6155481", "0.6144806", "0.6140695", "0.61359465", "0.6132351", "0.61087286", "0.6099366", "0.608842", "0.6084551", "0.6068592", "0.60632914", "0.6051456", "0.60454386", "0.6035374", "0.6026896", "0.60225594", "0.59898984", "0.59885395", "0.59853476", "0.5979233", "0.5974722", "0.5971124", "0.5961173", "0.5957936", "0.595736", "0.59539664", "0.5953494", "0.594302", "0.59385943", "0.5935346", "0.5921169", "0.5912342", "0.5909988", "0.59097373", "0.59036386", "0.59019536", "0.58929753", "0.58882934", "0.58859956", "0.5885631", "0.5869228", "0.58691734", "0.58682257", "0.5859697", "0.5858409", "0.5856901", "0.5845245", "0.58416694", "0.5838985", "0.5836603", "0.58326906", "0.5818977", "0.5802166", "0.5801711" ]
0.6445681
19
Get Access Token From A text file
public function getToken() { $accessToken = null; if (file_exists($_SERVER['DOCUMENT_ROOT'].$this->tokenFile)) { $accessToken = unserialize(file_get_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile)); } return json_decode($accessToken); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ReadTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"r\");\n $this->_props['RequestToken'] = trim(fread($fh, filesize($fname)));\n fclose($fh);\n }\n }", "function getToken(): string {\n //return $this->_c['inseeToken'];\n if ($this->inseeToken)\n return $this->inseeToken;\n if (($contents = @file_get_contents(__DIR__.'/inseetoken.json')) === false) {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n return $this->inseeToken;\n }\n $contents = json_decode($contents, true);\n \n $mtime = filemtime(__DIR__.'/inseetoken.json');\n //echo \"fichier modifié le \",date(DATE_ATOM, $mtime),\"<br>\\n\";\n //echo \"fichier modififié il y a \",time()-$mtime,\" secondes<br>\\n\";\n if (time() - $mtime < $contents['expires_in'] - 3600) { // vérification que le token est encore valide\n if (!isset($contents['access_token']))\n throw new Exception(\"Erreur access_token absent du fichier inseetoken.json\");\n $this->inseeToken = $contents['access_token'];\n }\n else {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n }\n return $this->inseeToken;\n }", "public function readToken() {}", "private function getAccessToken(): string\n {\n try {\n $token = Storage::disk('local')->get(self::ALIGO_ACCESS_TOKEN_FILE);\n } catch (\\Exception $exception) {\n $token = null;\n }\n\n if (empty($token)) {\n try {\n $response = $this->call('/akv10/token/create/10/y');\n $data = json_decode((string) $response->getBody(), false);\n } catch (\\Throwable $exception) {\n throw CouldNotSendNotification::serviceRespondedWithAnError($exception);\n }\n Storage::disk('local')->put(self::ALIGO_ACCESS_TOKEN_FILE, $data->token);\n\n return $data->token;\n }\n\n return $token;\n }", "abstract public function url_access_token();", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "function get_access_token()\r\n {\r\n $script_location = $this->script_location.'Soundcloud_get_token.py';\r\n $params = $this->sc_client_id.\" \".$this->sc_secret.\" \".$this->sc_user.\" \".$this->sc_pass;\r\n //Execute python script and save results\r\n exec(\"python \\\"\".$script_location.\"\\\" \".$params, $result);\r\n return $result;\r\n }", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "function get_credentials_from_file($file = VAR_FOLDER . DS . '.account')\n{\n $credentials = array(\n 'email' => null,\n 'password' => null\n );\n $lines = file_to_lines($file);\n if ($lines && count($lines) >= 2) {\n $credentials['email'] = $lines[0];\n $credentials['password'] = $lines[1];\n }\n return $credentials;\n}", "function getAppAccesToken($app_id, $app_secret){\n $token_url = \"https://graph.facebook.com/oauth/access_token?\" . \n \"client_id=\" . $app_id . \n \"&client_secret=\" . $app_secret . \n \"&grant_type=client_credentials\"; \n $reponse = file_get_contents($token_url);\n \n $param = null;\n parse_str($reponse,$param);\n \n return $param['access_token'];\n }", "public function getAccessToken($access_token);", "function open_tokens_file($tokenFilePath)\n{\n global $tokenFile;\n\n if (file_exists($tokenFilePath))\n {\n $tokenFile = simplexml_load_file($tokenFilePath);\n }\n else\n {\n throw new Exception('Error: Cannot connect to tokens database!');\n }\n\n\n if (!$tokenFile)\n {\n throw new Exception('Error: Cannot open tokens database!');\n }\n}", "function read($token);", "public function get_access_token()\n\t\t{\n\t\t\tif(isset($_COOKIE['bing_access_token']))\n\t\t\t\treturn $_COOKIE['bing_access_token'];\n\t\t\n\t\t\t// Get a 10-minute access token for Microsoft Translator API.\n\t\t\t$url = 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13';\n\t\t\t$postParams = 'grant_type=client_credentials&client_id='.urlencode($this->clientID).\n\t\t\t'&client_secret='.urlencode($this->clientSecret).'&scope=http://api.microsofttranslator.com';\n\t\t\t\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t$rsp = curl_exec($ch); \n\t\t\t$rsp = json_decode($rsp);\n\t\t\t$access_token = $rsp->access_token;\n\t\t\t\n\t\t\tsetcookie('bing_access_token', $access_token, $rsp->expires_in);\n\t\t\t\n\t\t\treturn $access_token;\n\t\t}", "public function get_request_token($accid) {\n // Get a request token from the appliance\n $url = $this->appliance_url . \"/api/request_token.php\";\n $result = $this->call($url, array());\n // dbg(\"Received request token $result\");\n $req_token = array();\n parse_str($result,$req_token);\n\n if(!isset($req_token['oauth_token'])) {\n //error_log(\"Failed to retrieve request token from \".$url.\" result = \".$result);\n throw new Exception(\"Unable to retrieve request token\");\n }\n $token = new OAuthToken($req_token['oauth_token'], $req_token['oauth_token_secret']);\n return $token;\n }", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken()\n\t{\n\t\treturn $this->getOption('accesstoken');\n\t}", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "public static function acquire_token() {\n\n\t\t\n\n\t\t$response = skydrive_tokenstore::get_tokens_from_store();\n\n\t\tif (empty($response['access_token'])) {\t// No token at all, needs to go through login flow. Return false to indicate this.\n\n\t\t\treturn false;\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tif (time() > (int)$response['access_token_expires']) { // Token needs refreshing. Refresh it and then return the new one.\n\n\t\t\t\t$refreshed = skydrive_auth::refresh_oauth_token($response['refresh_token']);\n\n\t\t\t\tif (skydrive_tokenstore::save_tokens_to_store($refreshed)) {\n\n\t\t\t\t\t$newtokens = skydrive_tokenstore::get_tokens_from_store();\n\n\t\t\t\t\treturn $newtokens['access_token'];\n\n\t\t\t\t}\n\n\t\t\t\texit;\n\n\t\t\t} else {\n\n\t\t\t\treturn $response['access_token']; // Token currently valid. Return it.\n\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function get_token( $type = 'access_token' ){\n\t\t$token = NULL;\n\t\tif( $this->token_storage == 'file' ){\n\t\t\tif( is_file($this->token_files[$type]) ){\n\t\t\t\t$_token = OAuthToken::from_string( file_get_contents($this->token_files[$type]) );\n\t\t\t\tif( !empty($_token->key) ){\n\t\t\t\t\t$token = $_token;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// add method to get token from cookie\n\t\t\tif( !empty($_COOKIE[$type]) ){\n\t\t\t\t$_token = OAuthToken::from_string( $_COOKIE[$type] );\n\t\t\t\tif( !empty($_token->key) ){\n\t\t\t\t\t$token = $_token;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $token;\n\t}", "private function GetAccessToken()\n\t{\n\t\tif(IsSet($_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url]))\n\t\t{\n\t\t\t$access_token = $_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$access_token = array();\n\t\t}\n\t\treturn($access_token);\n\t}", "public function get_access_token() {\r\n\t\t$session = $_SESSION['auth_baidu']['last_key'];;\r\n\t\tif (isset ( $session ['access_token'] )) {\r\n\t\t\treturn $session ['access_token'];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private function fetchAccessToken()\n\t{\n\t\tif (file_exists($this->refreshToken))\n\t\t{\n\t\t\t$parameters = array(\n\t\t\t\t'refresh_token' => file_get_contents($this->refreshToken),\n\t\t\t\t'client_id' => $this->googleClientId,\n\t\t\t\t'client_secret' => $this->googleClientSecret,\n\t\t\t\t'grant_type' => 'refresh_token'\n\t\t\t);\n\n\t\t\t$response = $this->makeRequest($parameters);\n\n\t\t\tif (isset($response->access_token))\n\t\t\t{\n\n\t\t\t\tfile_put_contents($this->accessToken, $response->access_token);\n\t\t\t}\n\t\t}\n\t}", "public function loadAccessToken()\n {\n $this->setHeader(self::HEADER_TYPE_BASIC, self::TOKEN_HEADER);\n\n $curl = new Curl;\n\n $opt = [\n 'grant_type' => $this->grant,\n 'username' => $this->username,\n 'password' => $this->password,\n 'scope' => $this->scope\n ];\n\n $token = $curl->post(self::BASE_API_URL.self::TOKEN_END_POINT, $opt, $this->getHeader());\n\n $this->saveAccessToken($token);\n }", "public function get_access_token($oauth_token, $oauth_addon);", "function extract_access_token()\r\n{\r\n $header = $_SERVER['HTTP_AUTHORIZATION'];\r\n\r\n if ($header != null && preg_match('/^Bearer[ ]+(.+)/i', $header, $captured))\r\n {\r\n return $captured;\r\n }\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'GET')\r\n {\r\n return $_GET['access_token'];\r\n }\r\n else\r\n {\r\n return $_POST['access_token'];\r\n }\r\n}", "public function getToken()\n {\n return $this->getAttr('access_token');\n }", "protected function get_access_token() {\n global $SESSION;\n if (isset($SESSION->{self::SESSIONKEY})) {\n return $SESSION->{self::SESSIONKEY};\n }\n return null;\n }", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function getToken()\n {\n $params = array(\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret,\n 'code' => $this->code,\n 'redirect_uri' => $this->redirect_uri\n );\n $res = $this->getRequest('oauth/access_token',$params);\n //$token = $res['access_token'];\n return $this->res = $res;\n\n\n }", "private function get_bitly_client_access_token()\n {\n\n if (FCMSUtils::acf_available()) {\n\n return get_field('fpt_bitly_access_token', 'options');\n\n }\n\n }", "public function getAccessToken()\n {\n return $this->get(self::_ACCESS_TOKEN);\n }", "protected function getAccessToken()\n {\n return $this->access_token->getToken();\n }", "public function getToken() {\n return $this->accessToken;\n }", "public function generateToken();", "function getLoginToken() {\n\tglobal $endPoint;\n\n\t$params1 = [\n\t\t\"action\" => \"query\",\n\t\t\"meta\" => \"tokens\",\n\t\t\"type\" => \"login\",\n\t\t\"format\" => \"json\"\n\t];\n\n\t$url = $endPoint . \"?\" . http_build_query( $params1 );\n\n\t$ch = curl_init( $url );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\tcurl_setopt( $ch, CURLOPT_COOKIEJAR, \"cookie.txt\" );\n\tcurl_setopt( $ch, CURLOPT_COOKIEFILE, \"cookie.txt\" );\n\n\t$output = curl_exec( $ch );\n\tcurl_close( $ch );\n\n\t$result = json_decode( $output, true );\n\treturn $result[\"query\"][\"tokens\"][\"logintoken\"];\n}", "public static function getFastlinkToken()\n\t\t{\n\t\t\t$url = \"https://developer.api.yodlee.com/ysl/restserver/v1/user/accessTokens?appIds=10003600\";\n\n\t\t\t$curl = curl_init();\n\n\t\t\tcurl_setopt_array($curl, array(\n\t\t\t CURLOPT_SSL_VERIFYPEER => false,\n\t\t\t CURLOPT_URL => $url,\n\t\t\t CURLOPT_RETURNTRANSFER => 1,\n\t\t\t CURLOPT_TIMEOUT => 360,\n\t\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t 'Content-Type: application/json',\n\t\t\t 'Authorization: {cobSession='.self::$cobSession.',userSession='.self::$userSession.'}'\n\t\t\t )\n\t\t\t));\n\n\t\t\t$response = json_decode(curl_exec($curl), TRUE);\n\n\t\t\tif ($response) {\n\t\t\t\tself::$fastlinkAppId = $response['user']['accessTokens'][0]['appId'];\n\t\t\t\tself::$fastlinkUrl = $response['user']['accessTokens'][0]['url'];\n\t\t\t\tself::$fastlinkValue = $response['user']['accessTokens'][0]['value'];\n\t\t\t}\n\t\t}", "protected function createToken()\n {\n if ($this->client->getRefreshToken()) {\n $this->client->fetchAccessTokenWithRefreshToken($this->client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n $this->client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($this->token))) {\n mkdir(dirname($this->token), 0700, true);\n }\n file_put_contents($this->token, json_encode($this->client->getAccessToken()));\n }", "public function read($idtoken);", "public function getToken()\n {\n return $this->accessToken;\n }", "private function getToken()\r\n\t{\r\n\t\treturn $this->app['config']->get('hipsupport::config.token');\r\n\t}", "private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }", "public function getUserTokens();", "public function getAccessToken() {\n $spotify_config = \\Drupal::config('spotify.settings');\n $url = 'https://accounts.spotify.com/api/token';\n $query = [\n 'grant_type' => 'client_credentials',\n 'client_id' => $spotify_config->get('client_id') ? $spotify_config->get('client_id') : '83c0f9f106b1493590e4d45cd5f0a979',\n 'client_secret' => $spotify_config->get('client_secret') ? $spotify_config->get('client_secret') : 'c8411ff0b00646c88a373e21a445acca',\n ];\n $options = [\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded',\n ],\n 'form_params' => $query,\n ];\n try {\n $request = $this->httpClient->request('post', $url, $options);\n if ($response = json_decode($request->getBody(), TRUE)) {\n return $response['access_token'];\n }\n } catch (RequestException $requestException) {\n if (function_exists('dpm')) {\n dpm($requestException->getMessage());\n }\n }\n return FALSE;\n }", "public function getSecurityToken($accessCode);", "private function getoken()\n {\n $data=[\n \"username\"=> $this->chronos_user,\n \"password\"=> $this->chronos_password\n ];\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.'login/');\n $client->setMethod(\\Zend_Http_Client::POST);\n $client->setHeaders(['Content-Type: application/json', 'Accept: application/json']);\n $client->setRawData(json_encode($data));\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $token_data=json_decode($string);\n if (property_exists($token_data,'non_field_errors')) {\n return false;\n }else{\n return $token_data->token;\n }\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"error\"=>$e->getMessage()]);\n return false;\n }\n }", "function ReadCredentials($input_file = \".rackspace_cloud_credentials\") {\n $handle = fopen($input_file, \"r\");\n\n if ( $handle ) {\n while (( $line = fgets( $handle )) !== false ) {\n return explode(':', trim($line));\n }\n }\n else {\n // problems opening the file\n echo \"Error - There was a problem reading credentials file\";\n exit(0);\n }\n}", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "public function createToken();", "public function getAccessToken(): string\n {\n return $this->accessToken;\n }", "public function getAccessToken()\n {\n return trim($this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_CREDENTIALS_ACCESS_TOKEN));\n }", "function accessToken() {\n $twilioAccountSid = Configure::read('Twilio.accountSid');\n $authToken = Configure::read('Twilio.authToken');\n $twilioApiKey = Configure::read('Twilio.apiKey');\n $twilioApiSecret = Configure::read('Twilio.secret');\n $ipmServiceSid = Configure::read('Twilio.chatSid');\n\n // An identifier for your app - can be anything you'd like\n $appName = 'TwilioChatDemo';\n // choose a random username for the connecting user\n $identity = \"john_doe\";\n // A device ID should be passed as a query string parameter to this script\n $deviceId = 'somedevice';\n $endpointId = $appName . ':' . $identity . ':' . $deviceId;\n\n // Create access token, which we will serialize and send to the client\n $token = new AccessToken(\n $twilioAccountSid,\n $twilioApiKey,\n $twilioApiSecret,\n 3600,\n $identity\n );\n\n // Create IP Messaging grant\n $ipmGrant = new IpMessagingGrant();\n $ipmGrant->setServiceSid($ipmServiceSid);\n $ipmGrant->setEndpointId($endpointId);\n\n // Add grant to token\n $token->addGrant($ipmGrant);\n\n // return serialized token and the user's randomly generated ID\n\n return [\n 'identity' => $identity,\n 'token' => $token->toJWT(),\n ];\n }", "public function getAccessToken() {\n if (is_null($this->tokenID) || empty($this->tokenID)) return FALSE;\n if (!empty($this->access_token) && ($this->access_token_expire > time())) {\n return $this->access_token;\n } else {\n //first, obtain auth token using saved refresh_token\n $token = get_access_token($this->getRefreshToken());\n //check if we've got a valid Bearer token\n if ($this->DEBUG) var_dump($token);\n if (!(isset($token->access_token) && isset($token->token_type) && isset($token->expires_in) && $token->token_type=='Bearer' && $token->expires_in>0)) {\n //problem with token, bail!\n warning(\"ESI\",\"EVE SSO: Invalid Bearer token received from SSO login site.\");\n return FALSE;\n }\n //we've got a valid token\n $this->access_token = $token->access_token;\n $this->access_token_expire = time() + $token->expires_in;\n //let's fetch the characterID\n $verify=verify_token($token);\n //check if required fileds are set\n if (!(isset($verify->CharacterID) && isset($verify->CharacterName) && isset($verify->TokenType))) {\n //problem with verify, bail!\n warning(\"ESI\",\"EVE SSO: Invalid Verify response received from SSO login site.\");\n return FALSE;\n }\n if ($this->DEBUG) var_dump($verify);\n //we have characterID\n $this->characterID = $verify->CharacterID;\n }\n return $this->access_token;\n }", "abstract public function getAuthToken();", "public function get_token($code = \"\") {\n global $cfg;\n\n $method = \"oauth.access\";\n\n $payload = array(\n 'code' => $code,\n );\n\n // Make the API request.\n if ($result = $this->apicall($method, $payload)) {\n \n $this->app_id = $result['app_id'];\n $this->app_user_id = $result['app_user_id'];\n $this->installer_user_id = $result['installer_user']['user_id'];\n $this->access_token = $result['access_token'];\n $this->userid = $result['user_id'];\n $this->teamid = $result['team_id'];\n $this->teamname = $result['team_name'];\n $this->webhook->channel_id = $result['incoming_webhook']['channel_id'];\n $this->webhook->channel = $result['incoming_webhook']['channel'];\n $this->webhook->configuration_url = $result['incoming_webhook']['configuration_url'];\n $this->webhook->url = $result['incoming_webhook']['url'];\n $this->bot->user_id = $result['bot']['bot_user_id'];\n $this->bot->access_token = $result['bot']['bot_access_token'];\n\n // write to file (for now; DB later)\n if ($this->store_token()) {\n return TRUE;\n }\n }\n return FALSE;\n }", "function getAccessToken($userID);", "function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "private function requestToken() \n {\n $requestUrl = $this->configuration->getBaseUrl() . \"connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->configuration->getClientId() . \"&client_secret=\" . $this->configuration->getClientSecret();\n $headers = [];\n $headers['Content-Type'] = \"application/x-www-form-urlencoded\";\n $headers['Content-Length'] = strlen($postData);\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->configuration->setAccessToken($result[\"access_token\"]);\n }", "function archimedes_get_token() {\n $keys = module_invoke_all('archimedes_id'); sort($keys);\n return drupal_hmac_base64(implode('|', $keys), drupal_get_private_key() . drupal_get_hash_salt());\n}", "public static function getFieldAccessToken()\n {\n return Configuration::get(\n \\Invertus\\SaferPay\\Config\\SaferPayConfig::FIELDS_ACCESS_TOKEN .\n \\Invertus\\SaferPay\\Config\\SaferPayConfig::getConfigSuffix()\n );\n }", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "private function get_token() {\n $uri = $this->settings->hostname.\"oauth/token\";\n //echo \"POST $uri\\n\";\n\n $data = array(\n \"grant_type\" => \"password\",\n \"client_id\" => $this->settings->client_id,\n \"client_secret\" => $this->settings->client_secret,\n \"username\" => $this->settings->username,\n \"password\" => $this->settings->password\n );\n $postdata = http_build_query($data);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/x-www-form-urlencoded'));\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n //echo $curl_response.\"\\n\"; // output entire response\n //echo $http_code.\"\\n\"; // output http status code\n\n curl_close($ch);\n $token = NULL;\n if ($http_code == 200) {\n $token = json_decode($curl_response);\n //var_dump($token); // print entire token object\n }\n return $token;\n }", "public function getAccessToken() {\n\n $data = $this->redis->get('pa_access_token');\n if (!$data) {\n $data['expire_time'] = 0;\n $data['access_token'] = \"0\";\n $this->redis->set('pa_access_token', $data, 7200);\n }\n if ($data['expire_time'] < time()) {\n $url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$this->config['appId'].'&secret='.$this->config['appSecret'];\n $res = json_decode($this->httpGet($url));\n $access_token = $res->access_token;\n if ($access_token) {\n $data['expire_time'] = time() + 7000;\n $data['access_token'] = $access_token;\n }\n }\n //debug_info(\"getaccesstoken,b4 storage:\".json_encode($data));\n $this->redis->set('pa_access_token', $data, 7200);\n return $data;\n }", "public function getAuthorizationCode()\n {\n $oauth_param = array(\n 'grant_type' => $this->grant_type, \n 'client_id' => config::$clientId,\n 'client_secret' => config::$secretKey,\n 'scope' => implode(',', $this->scope));\n\n $url = config::$apiUrl . 'oauth/access_token';\n $response = $this->curl->request('post', $url, $oauth_param);\n\n if( $response )\n {\n $res = json_decode($response);\n if( isset($res->access_token) )\n {\n $this->setExpiresAtFromTimeStamp($res->expires);\n $this->session->write('access_token',$res->access_token);\n $this->session->write('expires', $this->expiresAt);\n\n $read = $this->session->read('access_token');\n session_write_close();\n }\n elseif( isset($res->error) )\n {\n die($response);\n }\n }\n }", "public function getAccessToken()\n {\n // maybe the token will expire in next 10 seconds\n $expiryCutoff = new \\DateTime('+10 seconds');\n\n // if the token expires try to reauthenticate\n if (!$this->accessToken or $this->getExpires() < $expiryCutoff->getTimestamp()) {\n $this->authenticate();\n }\n\n return $this->accessToken->getToken();\n }", "public function getAccessToken(): string {\n\t\tif(!$this->_accessToken || $this->isAccessTokenExpired()) {\n\t\t\t$json = $this->request->authorize($this->getClientId(), $this->getClientSecret());\n\n\t\t\t$data = $json['data'];\n\n\t\t\t$expireDateTime = new DateTime($data['expireDateTime']);\n\n\t\t\t$this->setAccessToken($data['accessToken'], $data['accessTokenType'], $expireDateTime);\n\t\t}\n\n\t\treturn $this->_accessToken;\n\t}", "public function getAccessToken()\n\t{\n\t\tif ($this->makeRequest())\n\t\t{\n\t\t\tif ($token = isset($this->getJson()->access_token) ? $this->getJson()->access_token : null) {\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t}\n\t}", "public function getAccessToken()\n {\n return $this->access_token;\n }", "protected function get_access_token()\n\t{\n $result = array();\n\n try\n {\n $oauth_verifier = \\Session::get('evernote_oauthVerifier');\n\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token = $this->get_request_token();\n $request_token_secret = $this->get_request_secret();\n\n $oauth->setToken($request_token, $request_token_secret);\n $access_token_info = $oauth->getAccessToken($this->access_token_url, null, $oauth_verifier);\n\n echo '$access_token_info<pre>'.print_r($access_token_info, 1).'</pre>';\n\n if ( $access_token_info ){\n $this->set_access_key( $access_token_info['oauth_token'] );\n $this->set_access_secret( $access_token_info['oauth_token_secret'] );\n\n $this->tokens['oauth_token'] = $access_token_info['oauth_token'];\n $this->tokens['oauth_token_secret'] = $access_token_info['oauth_token_secret'];\n $this->tokens['shard_id'] = $access_token_info['edam_shard'];\n $this->tokens['evernote_user_id'] = $access_token_info['edam_userId'];\n $this->tokens['expires'] = $access_token_info['edam_expires'];\n\n return $this->tokens;\n }\n return false;\n }catch ( \\Exception $e ){\n return false;\n }\n\n\t}", "public function getTokenFromServer()\n {\n $params = [\n 'component_appid' => $this->component_token->getAppId(),\n 'authorizer_appid' => $this->appId,\n 'authorizer_refresh_token' => $this->refresh_token,\n ];\n\n $http = $this->getHttp();\n $url = sprintf(self::API_AUTHORIZER_TOKEN, $this->component_token->getToken());\n $token = $http->parseJSON($http->json($url, $params));\n\n if (empty($token['authorizer_access_token'])) {\n throw new HttpException('Request AccessToken fail. response: '.json_encode($token, JSON_UNESCAPED_UNICODE));\n }\n\n return $token;\n }", "private function getAccessToken()\n {\n if (time() < $this->get_option('paypal_access_token_expires_at')) {\n return $this->get_option('paypal_access_token');\n }\n\n $response = wp_remote_retrieve_body(wp_remote_post('https://api.sandbox.paypal.com/v1/oauth2/token', [\n 'method' => 'POST',\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'Authorization' => 'Basic ' . base64_encode($this->get_option('client_id') . ':' . $this->get_option('client_secret'))\n ],\n 'body' => [\n 'client_id' => $this->get_option('client_id'),\n 'client_secret' => $this->get_option('client_secret'),\n 'grant_type' => 'client_credentials'\n ]\n ]));\n\n $response = json_decode($response, true);\n\n add_option('paypal_access_token', $response['access_token']);\n add_option('paypal_access_token_expires_at', time() + $response['expires_in']);\n\n return $response['access_token'];\n }", "public function getAccessTokenFromClientCredentials(): AccessToken;", "function getAccessToken($token = NULL) {\n\t\t$r = $this->oAuthRequest ( $this->accessTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "public function getBearerToken() \n {\n $headers = $this->getAuthorizationHeader(); \n \n if (!empty($headers)) {\n $token = explode(\" \", $headers, 2);\n if (!empty($token[1])) {\n //echo (\"Token: \" . $token[1] .\"\\n\"); //debug\n return $token[1];\n } \n $this->throwException(COULD_NOT_GET_AUTHORIZATION_FROM_HEADER, 'Could not parse access token from authorization header'); \n }\n }", "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "private function _requestToken() \n {\n $requestUrl = $this->config->getHost() . \"/oauth2/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n $response = $this->client->send(new Request('POST', $requestUrl, [], $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n $this->config->setRefreshToken($result[\"refresh_token\"]);\n }", "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "public function run()\n {\n $accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzMjkiLCJqdGkiOiI5NDdjODdlMWI0MTU1N2Q1NzRiMmIzOTgzM2ViZWJjZWY3NjZmZTA3Yjc5NjllYTI3NTc1NTgwNTYzNTBlOGUyMjBlMDhhZTA0ZjhlYzM3MyIsImlhdCI6MTYyNTI0MjM0MywibmJmIjoxNjI1MjQyMzQzLCJleHAiOjE2NTY3NzgzNDMsInN1YiI6IjE0NjEiLCJzY29wZXMiOltdfQ.RjIAPcd6oSptTTKM0HhDIp8vA_xqhI5iccoxw1whZRvCzYHVii-WHiHU3JwRQDtJXKzRheqqcioUKkpoHH2SZQ1biWX0S5mqmunITFLoIHXhi61YYp4ctvlfvxud-9EGeQ4agqLazGDwxgCAwbo5dJRhvSX_SLcq0XLIdHU-_WqYXyb1Cy7vejsfR2Tx26vDqKsneHOiOTji7RT8TRg0Ej222WivgfBfcB-FzKPlFoKp6kYoSeLBvd5hZLERzFjfeWDVd38S4zxTFoSZH6Sg-WqZ5s3472CJ36_zWsh3R3Ebu0S7s-0uriCkdrVlzNY1xZABkVAedd-JyNgmKgA-zVb4AsNUXOqKJ-S7Nn3uVZmdbBWYjMPJBomsjt3xSSP4zq3-aJGJabG-GMvzWSGMxBDQeYlzFy_B3JLK0ZWaWLFN8eLJsHuHhF2zjypcPZkOajuQvrXNSFgm69_x57SSveM0eFkcbcvYzfHDcw6EvBrwPcvGE9RDajqBz3_So57WJRx2P_S7DJm64O_1m53AsmJz34MQxwCcDSUc7ZKwEX8mRRcu2RjWWoCLvOtA3mWx7v8nuREKXweBeHgSoPwXAJLIlsLT0yWVT603mseTVZ1MDSdtr46demlr_FGwqsKHyu5Fz54SBMpUEsqD3qIkFDT4VMc6Ge8v3ll_WVRui3M';\n\n $client = new ClientGuzzle([\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer '.$accessToken,\n 'Content-Type' => 'application/json'\n ],\n ]);\n\n $response = $client->get('https://www.lioren.cl/api/ciudades');\n $responseBody = json_decode((string) $response->getBody(), true);\n foreach($responseBody as $ciudad){\n Ciudad::create([\n 'nombre' => $ciudad['nombre'],\n 'codigo' => $ciudad['id'],\n ]);\n }\n }", "public function get_request_token($callback);", "public function getToken()\n\t{\n\n\t}", "function get_access_token() {\n\n global $api_clientId, $api_secret, $host;\n\n $postFields = 'grant_type=client_credentials';\n $url = $host.'/v1/oauth2/token';\n\n // curl documentation -> http://php.net/manual/en/book.curl.php\n\n $curl = curl_init($url); // Initializes a new session and return a cURL handle for use with the curl_setopt(), curl_exec(), and curl_close() functions.\n\n // curl_setopt documentation -> http://php.net/manual/en/function.curl-setopt.php\n\n curl_setopt($curl, CURLOPT_POST, true); // TRUE to do a regular HTTP POST.\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // FALSE to stop cURL from verifying the peer's certificate.\n curl_setopt($curl, CURLOPT_USERPWD, $api_clientId . \":\" . $api_secret); // A username and password formatted as \"[username]:[password]\" to use for the connection.\n curl_setopt($curl, CURLOPT_HEADER, false); // TRUE to include the header in the output.\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields); //The full data to post in a HTTP \"POST\" operation.\n #curl_setopt($curl, CURLOPT_VERBOSE, TRUE); // TRUE to output verbose information. Writes output to STDERR, or the file specified using CURLOPT_STDERR.\n\n $response = curl_exec( $curl ); // Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.\n\n if (empty($response)) {\n // Some kind of an error happened\n die(curl_error($curl)); // The die() function prints a message and exits the current script. This function is an alias of the exit() function.\n curl_close($curl); // Closes a cURL session and frees all resources. The cURL handle, $curl, is also deleted.\n } else {\n $info = curl_getinfo($curl); // Gets information about the last transfer.\n curl_close($curl); // Closes a cURL session and frees all resources. The cURL handle, $curl, is also deleted.\n \n if ($info['http_code'] != 200 && $info['http_code'] != 201 ) {\n echo \"Received error: \" . $info['http_code']. \"\\n\";\n echo \"Raw response:\".$response.\"\\n\";\n die();\n }\n \n }\n\n // Convert the result from JSON format to a PHP array\n $jsonResponse = json_decode( $response );\n return $jsonResponse->access_token;\n\n}", "abstract protected function token_url();", "private function getAccessToken() {\n\n // set the request token and secret we have stored\n $this->tmhOAuth->config['user_token'] = $_SESSION['authtoken'];\n $this->tmhOAuth->config['user_secret'] = $_SESSION['authsecret'];\n\n\n // send request for an access token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/access_token', ''), array(\n\n // pass the oauth_verifier received from Twitter\n 'oauth_verifier' => $_GET['oauth_verifier']\n ));\n\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get the access token and store it in a cookie\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n setcookie('access_token', $response['oauth_token'], time()+3600*24*30);\n setcookie('access_token_secret', $response['oauth_token_secret'], time()+3600*24*30);\n\n // state is now 2\n $_SESSION['authstate'] = 2;\n\n // redirect user to clear leftover GET variables\n header('Location: ' . $this->tmhOAuth->php_self());\n\n exit;\n }\n\n return false;\n }", "public function getAccessToken() {\n return $this->authenticate();\n }", "protected function getAccessToken($oauth_token) {\n\n\t}", "public function GetToken($data){ \n \n return $this->token;\n \n }", "public static function getAccessToken()\n {\n $authorization = request()->header('Authorization');\n // $authorization = @getallheaders()['Authorization'];\n // before running unit tests...\n //$authorization = '$2y$10$tSM.PiN9BnMfyonqjHlwTONa1DPHbyQSAMOtmt4chJYXenGeYySHC';\n return (isset($authorization))?$authorization:null;\n }" ]
[ "0.72512627", "0.6779216", "0.6668294", "0.65947384", "0.6391276", "0.63574797", "0.63574797", "0.63574797", "0.63574797", "0.6272261", "0.6230864", "0.6230864", "0.6230864", "0.6230864", "0.6230864", "0.6214809", "0.6214547", "0.6204841", "0.61824656", "0.6182268", "0.6179494", "0.6168348", "0.6051909", "0.6047205", "0.60344464", "0.60344464", "0.60344464", "0.60344464", "0.5993231", "0.5987178", "0.5955767", "0.5942224", "0.59350204", "0.58991313", "0.58437383", "0.5839107", "0.58252853", "0.5822184", "0.58111167", "0.5804238", "0.5801333", "0.57978284", "0.5793309", "0.5780345", "0.5774118", "0.57644594", "0.5732901", "0.57222843", "0.5717953", "0.57129246", "0.57105833", "0.57090604", "0.5705934", "0.5704455", "0.5683676", "0.56669784", "0.56638914", "0.56626225", "0.56610703", "0.56378067", "0.5614655", "0.5613636", "0.5605407", "0.5603318", "0.55869305", "0.55799", "0.55771995", "0.55668575", "0.5561417", "0.5551992", "0.5547178", "0.5545514", "0.5538078", "0.5529257", "0.55184096", "0.5517001", "0.55114585", "0.54988164", "0.54878587", "0.5483939", "0.5480708", "0.547365", "0.5467571", "0.54622585", "0.546025", "0.5457633", "0.54569125", "0.5452381", "0.5447254", "0.54420704", "0.5438274", "0.54373354", "0.5435577", "0.5432186", "0.54267836", "0.5426344", "0.54178333", "0.54151756", "0.54085684", "0.5400026" ]
0.69147575
1
Set Request Link To Rakuten
public function setLink($endpoint, $name = null) { if (!isset($name)) { $name = self::API_NAME_LINK_LOCATOR; } $link = Rakuten::BASE_API_URL.'/'.$name.'/'.self::API_VERSION.'/'; $this->link = $link.$endpoint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUrl() {\r\n\t\t$this->url = htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), ENT_QUOTES);\r\n\t}", "public function setLink($link);", "public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if ($this->link) {\n return $this->link;\n }\n\n $pageid = static::makeParameterId($this->for);\n $parameters = $this->app['request']->query->all();\n if (array_key_exists($pageid, $parameters)) {\n unset($parameters[$pageid]);\n } else {\n unset($parameters['page']);\n }\n\n $parameters[$pageid] = '';\n $link = '?' . http_build_query($parameters);\n\n return $link;\n }", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "public function setLink($link){\n\t\t$this->link = $link;\n\t}", "function setLink($url)\n\t{\n\t\t$this->link = $url;\n\t}", "public function getLink(){\n return $this->link;\n }", "public function setLink($link){\n $this->link = $link;\n return $this;\n }", "public function getLink() {}", "function getLink() {return $this->_link;}", "function getLink() {return $this->_link;}", "function UstawLinkRezygnacji($Link) {\n\t\t$this->LinkRezygnacji = $Link;\n\t}", "public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "public function getLink();", "public function getLink();", "private function setUrl()\n {\n curl_setopt($this->curl, CURLOPT_URL, $this->server);\n }", "public function setRequestUrl($url) {}", "public function link($setting_key = 'default')\n {\n }", "public function set_link($link) \n\t{\n\t\tif($this->version == RSS2 || $this->version == RSS1)\n\t\t{\n\t\t\t$this->add_element('link', $link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->add_element('link','',array('href'=>$link));\n\t\t\t$this->add_element('id', zajlib_feed::uuid($link,'urn:uuid:'));\n\t\t} \n\t\t\n\t}", "function setLink(&$link)\n {\n $this->_link = $link;\n }", "function setHeadLink($var)\n\t{\n\t\t$this -> head_link = $var;\n\t}", "function getLink() {\r\n return $this->_link;\r\n }", "function getLink() {\r\n return $this->_link;\r\n }", "protected function _setSelfSubmitUri()\n {\n\t\t$uriSelfSubmit = preg_replace('/\\?.*/', '', $_SERVER['REQUEST_URI']);\n\t\t#$this->getEnv()->setUriSelfSubmit($uriSelfSubmit);\n }", "protected function set_url_this_add($val){ $this->input ['add_url'] = $val ; }", "public function set_link($link){\n\t\t$this->set_channel_element('link', $link);\n\t}", "public function getRequestUrl() {\n\t}", "public function link();", "public function approveLink() \n {\n }", "public function setLink(string $link): void\n {\n $this->link = $link;\n }", "function setURL($url){\n $this->urltoopen = $url;\n }", "public function get_link() {\r\n return $this->link;\r\n }", "public function setReentryURL( $aURL )\n\t{ $this->myReentryURL = $aURL ; return $this ; }", "public function link() { return site_url().'/'.$this->post->post_name; }", "function getLink($ref)\n {\n\n $this->link = \"https://www.oxforddictionaries.com\";\n return $this->link;\n }", "public function setExternalJumpUrl() {}", "protected function set_url_this_view($val){ $this->input ['table_url'] = $val ; }", "function setLinksource($linksource)\r\n\t{\r\n\t\t$this->linksource = $linksource;\r\n\t}", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function getReentryURL()\n\t{ return $this->myReentryURL ; }", "function getLink(): string;", "private function setUrl(): void\n {\n $completeUrl = $_SERVER['REQUEST_URI'];\n $explodedUrl = \\explode('?', $completeUrl);\n $this->url = trim($explodedUrl[0], '/'); // Cleaned URL\n }", "function setLinks($link) \n {\n $this->links = $link;\n }", "public function href();", "function getEditUrl()\r\n\t{\r\n\t\tglobal $config;\r\n\r\n\t\t// need full url for links placed inside email messages\r\n\t\t$link = \"http://\". $config[\"http_host\"] . \"/survey_response_form?survey_id={$this->survey_id}\";\r\n\t\tif($this->token)\r\n\t\t\t$link .= \"&token={$this->token}\";\r\n\t\t\t\r\n\t\treturn $link;\r\n\t}", "function setRequestUrl($url) {\n\t\treturn $this->requestUrl = $url;\n\t}", "public function setLink($link) {\n\t\t$this->addChannelTag('link', $link);\n\t}", "public static function setUrl(): void\n\t{\n\n\t\tif (strpos(static::$fullUrl, '?')) {\n\t\t\tstatic::$url = substr(static::$fullUrl, 0, strpos(static::$fullUrl, '?'));\n\t\t} else {\n\t\t\tstatic::$url = static::$fullUrl;\n\t\t}\n\n\t}", "function link() {\n $this->title = \"link\";\n }", "public function getLink(): string;", "public function getLink(): string;", "function qa_set_request($request, $relativeroot, $usedformat = null)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_request, $qa_root_url_relative, $qa_used_url_format;\n\n\t$qa_request = $request;\n\t$qa_root_url_relative = $relativeroot;\n\t$qa_used_url_format = $usedformat;\n}", "public function getOfficialLink();", "public function setLink(?string $link)\n {\n $this->link = $link;\n\n return $this;\n }", "public function getLink():string;", "public function makeReturnUrl() {}", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function get_link()\n\t{\n\t\treturn $this->link;\n\t}", "public function setLink($link)\n\t{\n\t\t$this->link = $link;\n\t\treturn $this;\n\t}", "public function get_link()\n {\n\n return $this->link;\n }", "function getLink () {\n\t\t$baseLink = 'index.php';\n\t\tif ($this->getAction ()) {\n\t\t\treturn $baseLink .= '?action='.$this->getAction ();\n\t\t}\n\t\telseif ($this->isAdminPage ()) {\n\t\t\treturn $baseLink .= '?action=admin&pageID='.$this->getID ();\n\t\t} else {\n\t\t\treturn $baseLink .= '?action=viewPage&pageID='.$this->getID ();\n\t\t}\n\t}", "function setUrl($url);", "protected function set_url_this_edit($val){ $this->input ['edit_url'] = $val ; }", "function show_metabox_link_externo($post) {\r\n\t\t$link = get_post_meta($post->ID, 'link_externo', true);\r\n\t\twp_nonce_field(__FILE__, 'link_externo_nonce');\r\n\t\techo \"<input type='url' name='link_externo' class='widefat' value='$link'>\";\r\n\t}", "public function createUserLink($request)\n {\n return $this->start()->uri(\"/api/identity-provider/link\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function setSiteUrl()\n {\n }", "public function setURL($uRL)\n {\n $this->uRL = $uRL;\n return $this;\n }", "public function setURL($uRL)\n {\n $this->uRL = $uRL;\n return $this;\n }", "function tck_add_new_link( $return, $url, $keyword, $title ) {\n if ( $return['status'] == 'success' ) {\n $fkeyword = tck_get_keyword($keyword);\n $return['url']['keyword'] = $fkeyword;\n $return['shorturl'] = yourls_site_url(false) . '/' . $fkeyword;\n }\n \n return $return;\n }", "public function getViewLink() {\n return getConfig(\"public_url\").\"?\".$this->shareID;\n }", "private function setRqueUri(){\n }", "public function getLink() {\n return $this->link;\n }", "public function get_link($setting_key = 'default')\n {\n }", "function setTitlelink($v) {\n\t\t$this->set(\"titlelink\",$v);\n\t}", "function sopac_put_request_link($bnum, $avail = 0, $holds = 0, $mattype = 'item') {\n if (variable_get('sopac_catalog_disabled', 0)) {\n $class = 'button red';\n $text = 'Requesting Disabled';\n if ($message = variable_get('sopac_catalog_disabled_message', FALSE)) {\n $text = \"<a title=\\\"$message\\\">$text</a>\";\n }\n }\n else {\n global $user;\n $class = 'button green';\n\n if ($user->uid) {\n if ($user->bcode_verified) {\n // User is logged in and has a verified card number\n if ($mattype == 'Magazine') {\n $text = 'Request an Issue';\n $options = array('alias' => TRUE); // no lightbox on links\n }\n else if ($mattype == 'Music Download') {\n $locum = sopac_get_locum();\n $bib = $locum->get_bib_item($bnum);\n $size = round(($bib['zipsize'] / 1048576), 2);\n $text = 'Download MP3 Album (' . $size . 'MB)';\n }\n else {\n $text = 'Request this';\n $options = array('query' => array('lightbox' => 1), 'attributes' => array('rel' => 'lightframe'), 'alias' => TRUE);\n }\n\n if (variable_get('sopac_multi_branch_enable', 0) && $mattype != 'Music Download' && $mattype != 'Stream' && $mattype != 'Download') {\n $locum = sopac_get_locum();\n $branches = $locum->locum_config['branches'];\n $class .= ' hassub';\n\n $text .= \"<ul class=\\\"submenu\\\"><li>for pickup at</li>\";\n if ($user->profile_pref_home_branch) {\n $home_branch_code = array_search($user->profile_pref_home_branch, $branches);\n $text .= '<li>' .\n l($user->profile_pref_home_branch,\n variable_get('sopac_url_prefix', 'cat/seek') . '/request/' . $bnum . '/' . $home_branch_code,\n $options) .\n '</li>';\n $text .= '<li>Other Location...</li>';\n }\n foreach ($branches as $branch_code => $branch_name) {\n if ($branch_name != $user->profile_pref_home_branch) {\n $text .= '<li>' .\n l($branch_name,\n variable_get('sopac_url_prefix', 'cat/seek') . '/request/' . $bnum . '/' . $branch_code,\n $options) .\n '</li>';\n }\n }\n $text .= \"</ul><span></span>\";\n }\n else if($mattype == 'Music Download') {\n $text = '<a href=\"/'.variable_get('sopac_url_prefix', 'cat/seek').'/record/'.$bnum.'/download?type=album\">'.$text.'</a>';\n }\n else if ($mattype == 'Stream') {\n $text = 'View Online Below';\n }\n else if (strpos($mattype,'Download') !== FALSE) {\n $text = 'Download Below';\n }\n else {\n $text = l($text, variable_get('sopac_url_prefix', 'cat/seek') . '/request/' . $bnum, array('alias' => TRUE));\n }\n }\n elseif ($user->profile_pref_cardnum) {\n // User is logged in but does not have a verified card number\n $text = l(t('Verify card to request'), 'user/' . $user->uid);\n }\n else {\n // User is logged in but does not have a card number.\n $text = l(t('Register card to request'), 'user/' . $user->uid);\n }\n }\n else if($mattype == 'Music Download'){\n $text = l(t('Log in to Download'), 'user/login', array('query' => drupal_get_destination()));\n }\n else if ($mattype == 'Stream')\n $text = l(t('Login to Watch'), 'user/login', array('query' => drupal_get_destination()));\n else {\n $text = l(t('Log in to request'), 'user/login', array('query' => drupal_get_destination()));\n }\n }\n return \"<li class=\\\"$class\\\">$text</li>\";\n}", "function getLink()\n {\n $url = $this->getPaypal();\n $link = 'https://'.$url.'/cgi-bin/webscr?';\n foreach($this->VARS as $item => $sub){\n $link .= $sub[0].'='.$sub[1].'&';\n }\n return $link;\n }", "protected function addLinks()\n {\n }", "public function getSponsorlink() {}", "function getLinkTarget() {return $this->_linktarget;}", "function settings_link($args){\n array_unshift($args, '<a href=\"tools.php?page=checksum-generator\">Settings</a>');\n return $args;\n }", "function href() {\n\t\t$usemodrewrite = polarbear_setting('usemodrewrite');\n\t\tif ($usemodrewrite) {\n\t\t\treturn $this->fullpath();\n\t\t} else {\n\t\t\treturn $this->templateToUse() . '?polarbear-page=' . $this->getId();\n\t\t}\n\t}", "public function setUrl( $url );" ]
[ "0.6703281", "0.6532161", "0.63464415", "0.63004166", "0.62923783", "0.62923783", "0.62511885", "0.62069297", "0.61534464", "0.61513525", "0.6136585", "0.61322844", "0.61322844", "0.6115157", "0.6099858", "0.6079605", "0.6079605", "0.60401684", "0.5976108", "0.5899346", "0.5865433", "0.5862523", "0.5845956", "0.5805798", "0.5805798", "0.5798154", "0.57935137", "0.57780343", "0.5777558", "0.5775095", "0.5760163", "0.57598996", "0.57514304", "0.573358", "0.5711513", "0.570079", "0.5692091", "0.568224", "0.5679723", "0.56726664", "0.56720924", "0.5670974", "0.5670714", "0.56698674", "0.56698674", "0.5658249", "0.5630505", "0.5629419", "0.562818", "0.56248695", "0.56247395", "0.5609423", "0.5608771", "0.55990815", "0.5587846", "0.5574485", "0.5574485", "0.55733985", "0.5571041", "0.556928", "0.5568521", "0.5565911", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5564907", "0.5556856", "0.55567914", "0.5554614", "0.5552954", "0.5549045", "0.5545746", "0.5543129", "0.554026", "0.5536644", "0.55291265", "0.55291265", "0.5528139", "0.55260605", "0.55238885", "0.5518734", "0.55161023", "0.5514665", "0.55094373", "0.55014145", "0.54997367", "0.5494872", "0.54910034", "0.5489139", "0.5486578", "0.5486084" ]
0.0
-1